Utility class for reading and writing some mundane objects like SQLObjects
author: Ritesh Adval author: Sudhi Seshachala author: Ahimanikya Satapathy version: $Revision$
parseXMLObjectRefTag(SQLContainerObject definition, Element xmlElement) Reads in and resolves, if possible, from the given SQLDefinition instance the
reference to an SQLObject contained in the given XML Element.
toXMLObjectRefTag(SQLObject object, String prefix) Writes out an XML document element representing a reference to the given SQLObject,
using the given string as a prefix for each output line.
Gets ancestral SQLDefinition instance for the given SQLExpresionObject.
Parameters: sqlObj - SQLConnectableObject whose ancestor SQLDefinition is sought SQLDefinition instance throws: BaseException - if ancestral SQLDefinition could not be located
getDisplayStringFor
public static String getDisplayStringFor(int type) throws BaseException(Code)
Gets the displayable representation of SQLObject type for given int type.
Parameters: type - int representation of SQLObject type String representation of type throws: BaseException - thrown while getting the type
getIntType
public static int getIntType(String type) throws BaseException(Code)
Gets the int representation for given SQLObject string type.
Parameters: type - String representation of SQLObject type int representation of type throws: BaseException - thrown while getting the type
Returns node attribute value
Parameters: node - Parameters: attName - value of the attribute
getNodeAttributes
public static Map getNodeAttributes(Node node)(Code)
Returns all the attributes name value of Node in a Map.
Parameters: node - map containing name/value of all Node attributes.
getStringType
public static String getStringType(int type) throws BaseException(Code)
Gets the String representation of SQLObject type for given int type.
Parameters: type - int representation of SQLObject type String representation of type throws: BaseException - thrown while getting the type
parseAttribute
public static Attribute parseAttribute(Element elem) throws BaseException(Code)
parseAttributeList
public static void parseAttributeList(Map attributes, NodeList list) throws BaseException(Code)
Parses list of Nodes possibly containing input elements.
Parameters: sqlObj - SQLConnectableObject to contain the parsed input objects Parameters: inputArgList - NodeList with possible input elements throws: BaseException - if error occurs while parsing
Parser the tag . This should be called from any SQLObject which has input
tag
Parameters: sqlObj - to be parsed Parameters: elem - Element throws: BaseException - if error occurs while parsing
Parses the tag . This should be called from any SQLObject which has input
tag
Parameters: sqlObj - to be parsed Parameters: inputArgList - NodeList throws: BaseException - if error occurs while parsing
Reads in and resolves, if possible, from the given SQLDefinition instance the
reference to an SQLObject contained in the given XML Element.
Parameters: definition - definition from which to attempt to resolve the SQLObjectreference Parameters: xmlElement - Element representing the SQLObject reference SQLObject referenced by xmlElement; null if object has not yet been parsedand registered with definition. throws: BaseException - if errors occur during parsing
Generates XML elements representing this object's associated attributes.
Parameters: prefix - Prefix string to be prepended to each element String containing XML representation of attributes
toXMLInputTag
public static String toXMLInputTag(String prefix, List inputs) throws BaseException(Code)
Writer for tag. This should be called from any SQLObject which needs to
write out input child elements from a List.
Parameters: prefix - Prefix string to be appended to each line of the generated XMLdocument Parameters: inputs - List of SQLInputObject instances to be written out XML element containing input reference information
Writer for tag. This should be called from any SQLObject which needs to
write out input child elements from a Map.
Parameters: prefix - Prefix string to be appended to each line of the generated XMLdocument Parameters: inputs - Map of SQLInputObject instances to be written out XML element containing references to SQLObjects as contained in inputs
Writes out an XML document element representing a reference to the given SQLObject,
using the given string as a prefix for each output line.
Parameters: object - SQLObject to be referenced in the XML element Parameters: prefix - String to prepend to each new line in the String XML document element referencing object throws: BaseException - if object is null or errors occur during writing