|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jorm.xml2mi.lib.ParserHelper
org.objectweb.jorm.xml2mi.lib.BasicDomParser
The BasicDomParser class implements the Parser interface. It uses the DOM trees associated to the XML files that are parsed in order to build the meta-objects.
Field Summary |
Fields inherited from class org.objectweb.jorm.xml2mi.lib.ParserHelper |
logger, loggerFactory, motable |
Constructor Summary | |
BasicDomParser()
|
Method Summary | |
void |
addMappingParser(java.lang.String mapperName,
MappingParser mappingParser)
Adds a MappingParser object. |
MappingParser |
getMappingParser(java.lang.String mapperName)
Returns a MappingParser object. |
java.lang.Exception |
getParserException()
returns the exception which is reached during the parsing of a file |
void |
init(boolean dtdVerify,
java.util.ArrayList dtds)
Main constructor for BasicDomParser. |
boolean |
isGenDep()
Allows to know if the dependances must be generated or not. |
java.util.Collection |
parse(java.util.Iterator files)
Launches the parsing process. |
MetaObject |
parse(java.lang.String file)
Launches the parsing process. |
void |
parseMapping(org.w3c.dom.Element mappingElem,
ClassProject classProject)
Parses the mapping part of the XML file and builds the corresponding meta-information for a given Class object. |
void |
setGenDep(boolean gendep)
Enables or disables the generation of the dependances. |
void |
setLogger(Logger logger)
Defines a logger object. |
void |
setMetaInfoManager(Manager mim)
Assigns a meta-information manager to a parser in order from it to create the meta-information related to the XML files it parses. |
void |
setPathExplorer(PathExplorer pathexpl)
Assigns a PathExplorer object for locating files that have to be parsed. |
Methods inherited from class org.objectweb.jorm.xml2mi.lib.ParserHelper |
getIdNameDef, getIdNameDef, getLogger, getLoggerFactory, setLoggerFactory |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.jorm.util.api.Loggable |
getLogger, getLoggerFactory, setLoggerFactory |
Constructor Detail |
public BasicDomParser()
Method Detail |
public void init(boolean dtdVerify, java.util.ArrayList dtds)
init
in interface Parser
dtdVerify
- true, the dtd must be used to validate xml files, else falsedtds
- A list of usefull DTD.public void addMappingParser(java.lang.String mapperName, MappingParser mappingParser) throws PException
addMappingParser
in interface Parser
mapperName
- a mapper name, mappingParser a MappingParser object.mappingParser
- the parser which parses the mapping object
PException
public MappingParser getMappingParser(java.lang.String mapperName)
getMappingParser
in interface Parser
mapperName
- a mapper name,
public java.util.Collection parse(java.util.Iterator files) throws PException
parse
in interface Parser
files
- an iterator over the name the XML files to be parsed
PException
public MetaObject parse(java.lang.String file) throws PException
parse
in interface Parser
file
- the name of the XML file to be parsed
PException
public void setMetaInfoManager(Manager mim)
setMetaInfoManager
in interface Parser
mim
- the meta-information Manager to be associated to this parserpublic void setPathExplorer(PathExplorer pathexpl)
setPathExplorer
in interface Parser
pathexpl
- the PathExplorer to be used for file locationpublic void setGenDep(boolean gendep)
gendep
- true, the dependances are generated, else falsepublic boolean isGenDep()
public java.lang.Exception getParserException()
getParserException
in interface Parser
public void parseMapping(org.w3c.dom.Element mappingElem, ClassProject classProject) throws PException
parseMapping
in interface Parser
mappingElem
- the node to treat
PException
public void setLogger(Logger logger)
setLogger
in interface Loggable
setLogger
in class ParserHelper
logger
- the logger object
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |