LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.info
Class LyInfoFactory

java.lang.Object
  extended by leon.info.LyInfoFactory
All Implemented Interfaces:
LyXMLElementFactory
Direct Known Subclasses:
LyInfoAppFactory, LyInfoBindFactory, LyInfoDataFactory, LyInfoGuiFactory, LyInfoNodeFactory

public abstract class LyInfoFactory
extends java.lang.Object
implements LyXMLElementFactory

This class builds instances corresponding to XML tags read from the data description file. Almost all objects built during parsing inherit from LyInfo (except very elementary objects).

See Also:
LyInfoParser

Field Summary
static java.lang.String __VERSION
           
static java.lang.String NULL_VALUE
           
static java.lang.String OLD_NULL_VALUE
           
 
Constructor Summary
LyInfoFactory(LyInfoParser parser, LyApplication application)
          Constructor of the factory for an application.
 
Method Summary
 java.lang.Object buildElement(LyInfoNode node, java.lang.String tag)
          Builds node corresponding to an element read from the XML data description file.
 java.lang.Object buildElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes, java.lang.Object parent)
          Builds node corresponding to an element read from the XML data description file.
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, java.lang.Object parent, java.lang.Object current)
          End of building a node.
 LyInfo getInfo(java.lang.String id)
          Retrieves an info from its id.
 java.lang.String getParsingErrors()
          Gets parsing errors if any.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values

NULL_VALUE

public static final java.lang.String NULL_VALUE
See Also:
Constant Field Values

OLD_NULL_VALUE

public static final java.lang.String OLD_NULL_VALUE
See Also:
Constant Field Values
Constructor Detail

LyInfoFactory

public LyInfoFactory(LyInfoParser parser,
                     LyApplication application)
Constructor of the factory for an application. All objects built by this factory will belong to the given application.

Parameters:
parser - Parser that builts this factory.
application - Application for which the factory is built.
Method Detail

getInfo

public LyInfo getInfo(java.lang.String id)
Retrieves an info from its id.

Parameters:
id - Id of searched info.
Returns:
The info if it was found, null otherwise.

buildElement

public final java.lang.Object buildElement(java.lang.String uri,
                                           java.lang.String localName,
                                           java.lang.String qName,
                                           org.xml.sax.Attributes attributes,
                                           java.lang.Object parent)
                                    throws org.xml.sax.SAXException
Builds node corresponding to an element read from the XML data description file. The result associated to the built node depends on the node tag. This method is invoked by SAXParser at the beginning of each new tag.

Specified by:
buildElement in interface LyXMLElementFactory
Parameters:
uri - The Namespace URI.
localName - The Namespace local name.
qName - The qualified (prefixed) name.
attributes - The SAX2 attributes.
parent - The parent node (created by #buildElement(String, String, String, Attributes))
Returns:
The object built corresponding to the given tag and attributes.
Throws:
org.xml.sax.SAXException - if the result could not have been built.

buildElement

public java.lang.Object buildElement(LyInfoNode node,
                                     java.lang.String tag)
                              throws org.xml.sax.SAXException
Builds node corresponding to an element read from the XML data description file. The result associated to the built node depends on the node tag. This method is invoked by SAXParser at the beginning of each new tag.

Parameters:
node - Current node.
tag - Current tag.
Returns:
The object built corresponding to the given tag and attributes.
Throws:
org.xml.sax.SAXException - if the result could not have been built.

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName,
                       java.lang.Object parent,
                       java.lang.Object current)
                throws org.xml.sax.SAXException
End of building a node. Starts last step of parsing - resolve references to other objects, - check result consistency. The result depends on the node tag. This method is invoked by SAXParser at the end of each new tag.

Specified by:
endElement in interface LyXMLElementFactory
Parameters:
uri - The Namespace URI.
localName - The Namespace local name.
qName - The qualified (prefixed) name.
parent - - The parent node (created by buildElement)
current - - The current node (created by buildElement)
Throws:
org.xml.sax.SAXException - if the result could not have been built. LyInfoDataFactory#endParse LyInfoDataFactory#checkResult

getParsingErrors

public java.lang.String getParsingErrors()
Gets parsing errors if any.

Returns:
parsing errors if any, null otherwise.

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com