LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.info
Class LyInfoParser

java.lang.Object
  extended by leon.parser.LySAXParser
      extended by leon.info.LyInfoParser

public final class LyInfoParser
extends LySAXParser

This class represents our XML data info parser. It's the entry point to parse XML data info. Our parser is configured to build LyInfoNode nodes instead of standard ElementNode nodes.
A parser belongs to an application. It is used to build the tree of info objects as described in the XML file. The root of this tree is an instance of LyProject. All built objects belong to the application for which the parser was created.

See Also:
LyApplication, LyProject

Nested Class Summary
static class LyInfoParser.Type
           
 
Field Summary
static java.lang.String __VERSION
           
 
Fields inherited from class leon.parser.LySAXParser
COMMENTS_END_KEY, COMMENTS_START_KEY, RESOLVE_XML_ENTITIES
 
Constructor Summary
LyInfoParser(LyApplication application, java.lang.String xmlFile)
          Constructs a validating XML data info parser.
LyInfoParser(LyApplication application, java.lang.String xmlFile, boolean validating)
          Constructs a XML data info parser.
LyInfoParser(LyApplication application, java.lang.String xmlFile, LyInfoParser.Type type, boolean validating)
          Constructs a XML data info parser.
 
Method Summary
 LyApplication getApplication()
          Gets application.
 LyInfoList<LyInfo> getExternResults()
          Gets list of parsed infos.
 LyInfoList<LyInfo> getResults()
          Gets list of parsed infos.
 LyProject getRootProject()
          Returns root project found in data description XML file.
 boolean isExtern(LyInfo info)
          Checks if the given info is considered as external or not.
 
Methods inherited from class leon.parser.LySAXParser
getRootElement, isValidating
 
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
Constructor Detail

LyInfoParser

public LyInfoParser(LyApplication application,
                    java.lang.String xmlFile)
Constructs a validating XML data info parser.

Parameters:
application - Application for which a parser is built.
xmlFile - Path of the file that contains the Xml info.
Throws:
IllegalargumentException - If application is null.
SAXException - If an error occurs during parsing.

LyInfoParser

public LyInfoParser(LyApplication application,
                    java.lang.String xmlFile,
                    boolean validating)
Constructs a XML data info parser.

Parameters:
application - Application for which a parser is built.
xmlFile - Path of the file that contains the Xml info.
validating - Boolean indicating if the parser if validating or not.
Throws:
IllegalargumentException - If application is null.
SAXException - If an error occurs during parsing.

LyInfoParser

public LyInfoParser(LyApplication application,
                    java.lang.String xmlFile,
                    LyInfoParser.Type type,
                    boolean validating)
Constructs a XML data info parser.

Parameters:
application - Application for which a parser is built.
xmlFile - Path of the file that contains the Xml info.
validating - Boolean indicating if the parser if validating or not.
Throws:
IllegalargumentException - If application is null.
SAXException - If an error occurs during parsing.
Method Detail

getApplication

public LyApplication getApplication()
Gets application.

Returns:
Application for which the parser was built.

getRootProject

public LyProject getRootProject()
Returns root project found in data description XML file.

Returns:
Root project built by this parser.
Throws:
java.lang.IllegalStateException - If root result is null (this means that a fatal error occurred during parsing).
java.lang.IllegalStateException - If root result is not a project.

getResults

public LyInfoList<LyInfo> getResults()
Gets list of parsed infos.


getExternResults

public LyInfoList<LyInfo> getExternResults()
Gets list of parsed infos.


isExtern

public boolean isExtern(LyInfo info)
Checks if the given info is considered as external or not. The info could either be unknown by parser or registered as external.

Parameters:
info - Info to be checked.
Returns:
True if external, false otherwise.

(c) January 2013 - W4 S.A.

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