|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--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.
Constructor Summary | |
BasicDomParser()
|
Method Summary | |
void |
addMappingParser(java.lang.String mapperName,
MappingParser mappingParser)
Adds a MappingParser object. |
Logger |
getLogger()
Returns a logger to an component that wants to log things. |
LoggerFactory |
getLoggerFactory()
Returns a logger factory that allows the creation of new loggers. |
MappingParser |
getMappingParser(java.lang.String mapperName)
Returns a MappingParser object. |
ParserErrorHandler |
getParserErrorHandler()
allows to know the list of error the parser encounters. |
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 |
setLoggerFactory(LoggerFactory loggerfactory)
Defines the logger factory to obtain new loggers. |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 ParserErrorHandler getParserErrorHandler()
getParserErrorHandler
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
logger
- the logger objectpublic void setLoggerFactory(LoggerFactory loggerfactory)
setLoggerFactory
in interface Loggable
loggerfactory
- The LoggerFactory object to obtain a logger objectpublic Logger getLogger()
Loggable
getLogger
in interface Loggable
public LoggerFactory getLoggerFactory()
Loggable
getLoggerFactory
in interface Loggable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |