it.unimo.dbgroup.momis.odli3
Class VelocityTools

java.lang.Object
  extended byit.unimo.dbgroup.momis.odli3.VelocityTools

public class VelocityTools
extends java.lang.Object


Field Summary
private static java.text.DateFormat _italianDateFormat
          Date fomatter.
private static java.text.DateFormat _italianTimestampFormat
          Timestamp fomatter.
private static java.text.DateFormat _SYSTEM_TIME_TEST_FORMATTER
          Timestamp fomatter.
private static VelocityTools _velocityTools
          The server object
 
Constructor Summary
VelocityTools()
           
 
Method Summary
 java.lang.String applyMacro(org.apache.velocity.VelocityContext context, java.lang.String templateFileName)
          Prints setters for variable defined in the given class
 java.lang.String applyMacroGlobalSchema(Schema schema, java.lang.String templateFileName)
          Prints setters for variable defined in the given class
static java.lang.String encodeXmlString(java.lang.String value)
          encodes a string according to the Xml specification
Characters other than those in the "reserved" and "unsafe" sets (see section 3.2) are equivalent to their ""%" HEX HEX" encodings.
static java.lang.String formatDate(java.lang.Object date)
          Retrieve the given parameter as Timestamp.
static java.lang.String formatTimestamp(java.lang.Object date)
          Retrieve the given parameter as Timestamp.
static java.lang.String getDottedLastField(java.lang.String sin)
          Given a string in dot notation returns last field
static VelocityTools getInstance()
          Main procedure
This is a command line parser :-)
static java.lang.String getObjectInfo(java.lang.Class c)
          Return information about the given object
Information are:
- class name
- list of public methods
static java.sql.Timestamp parseTimestamp(java.lang.String stringTimestamp)
          Parses the given string as Timestamp.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_velocityTools

private static VelocityTools _velocityTools
The server object


_italianDateFormat

private static java.text.DateFormat _italianDateFormat
Date fomatter.


_italianTimestampFormat

private static java.text.DateFormat _italianTimestampFormat
Timestamp fomatter.


_SYSTEM_TIME_TEST_FORMATTER

private static java.text.DateFormat _SYSTEM_TIME_TEST_FORMATTER
Timestamp fomatter.

Constructor Detail

VelocityTools

public VelocityTools()
Method Detail

applyMacroGlobalSchema

public java.lang.String applyMacroGlobalSchema(Schema schema,
                                               java.lang.String templateFileName)
                                        throws java.lang.Exception
Prints setters for variable defined in the given class

Throws:
java.lang.Exception

applyMacro

public java.lang.String applyMacro(org.apache.velocity.VelocityContext context,
                                   java.lang.String templateFileName)
                            throws java.lang.Exception
Prints setters for variable defined in the given class

Throws:
java.lang.Exception

getInstance

public static VelocityTools getInstance()
                                 throws java.lang.Exception
Main procedure
This is a command line parser :-)

Throws:
java.lang.Exception

getObjectInfo

public static java.lang.String getObjectInfo(java.lang.Class c)
Return information about the given object
Information are:
- class name
- list of public methods


getDottedLastField

public static java.lang.String getDottedLastField(java.lang.String sin)
Given a string in dot notation returns last field


encodeXmlString

public static java.lang.String encodeXmlString(java.lang.String value)
encodes a string according to the Xml specification
Characters other than those in the "reserved" and "unsafe" sets (see section 3.2) are equivalent to their ""%" HEX HEX" encodings.


formatTimestamp

public static java.lang.String formatTimestamp(java.lang.Object date)
                                        throws java.lang.Exception
Retrieve the given parameter as Timestamp.

Throws:
java.lang.Exception

formatDate

public static java.lang.String formatDate(java.lang.Object date)
                                   throws java.lang.Exception
Retrieve the given parameter as Timestamp.

Throws:
java.lang.Exception

parseTimestamp

public static java.sql.Timestamp parseTimestamp(java.lang.String stringTimestamp)
                                         throws java.lang.Exception
Parses the given string as Timestamp.

Throws:
java.lang.Exception


Universita' di Modena e Reggio Emilia