|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The Parser interface defines the behaviour of a JORM component used to parse a set of JORM definition files. A parser is able to parse XML files (these files may be passed by the pmc command line), and build a schema of meta-objects, using a meta-information manager component.
| Method Summary | |
void |
addMappingParser(java.lang.String mappername,
MappingParser mappingParser)
Sets the parser which is able to parse the mapping part of the XML file. |
MappingParser |
getMappingParser(java.lang.String mapperName)
Returns a MappingParser object. |
org.objectweb.jorm.xml2mi.lib.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)
Initializes the Parser. |
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)
|
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(org.objectweb.jorm.util.io.api.PathExplorer pathexpl)
Assigns a PathExplorer object for locating files that have to be parsed. |
| Method Detail |
public java.util.Collection parse(java.util.Iterator files)
throws PException
files - an iterator over the name the XML files to be parsed
PException
public MetaObject parse(java.lang.String file)
throws PException
file - the name of the XML file to be parsed
PException
public void parseMapping(org.w3c.dom.Element mappingElem,
ClassProject classProject)
throws PException
PExceptionpublic void setMetaInfoManager(Manager mim)
mim - the meta-information Manager to be associated to this parserpublic void setPathExplorer(org.objectweb.jorm.util.io.api.PathExplorer pathexpl)
pathexpl - the PathExplorer to be used for file location
public void addMappingParser(java.lang.String mappername,
MappingParser mappingParser)
throws PException
mappername - the name of the mappermappingParser - the parser which parses the mapping object
PExceptionpublic MappingParser getMappingParser(java.lang.String mapperName)
mapperName - a mapper name,
public void init(boolean dtdVerify,
java.util.ArrayList dtds)
dtdVerify - true, the dtd must be used to validate xml files, else
falsedtds - A list of usefull DTD.public java.lang.Exception getParserException()
public org.objectweb.jorm.xml2mi.lib.ParserErrorHandler getParserErrorHandler()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||