org.objectweb.jorm.xml2mi.api
Interface MappingParser
public interface MappingParser
The MappingParser interface provides methods to parse specific mapping
information from an XML Element object and build the corresponding Jorm
metainformation.
void | parseMapping(Element mappingElem, Mapping mapping) - Parses the mapping information related to a particular mapper and builds
the corresponding Jorm meta-information.
|
void | setCurrentClass(Class aClass) - Assigns the current Class object to a parser in order from it to
retrieve the meta-objects (for example, PrimitiveElement objects)
that are referenced from XML mapping elements.
|
void | setMetaInfoManager(Manager manager) - 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 explorer) - Assigns a PathExplorer object for locating files that have to be parsed.
|
void | setidvalue2genclassref(Map idvalue2genclassref)
|
void | setmotable(Hashtable motable) - Assigns an HashTable object to the MappingParser object.
|
parseMapping
public void parseMapping(Element mappingElem,
Mapping mapping)
throws PException
Parses the mapping information related to a particular mapper and builds
the corresponding Jorm meta-information. It can be class-related or
generic class-related information.
Manager, PathExplorer and currentClass must be set before calling this
method.
mappingElem
- the current XML node.mapping
- a Mapping object.
setCurrentClass
public void setCurrentClass(Class aClass)
Assigns the current Class object to a parser in order from it to
retrieve the meta-objects (for example, PrimitiveElement objects)
that are referenced from XML mapping elements.
aClass
- the Jorm meta-object associated to the parsed class.
setMetaInfoManager
public void setMetaInfoManager(Manager manager)
Assigns a meta-information manager to a parser in order from it to
create the meta-information related to the XML files it parses.
manager
- the meta-information Manager to be associated to this
parser
setPathExplorer
public void setPathExplorer(org.objectweb.jorm.util.io.api.PathExplorer explorer)
Assigns a PathExplorer object for locating files that have to be parsed.
explorer
- The PathExplorer to be used for file location
setidvalue2genclassref
public void setidvalue2genclassref(Map idvalue2genclassref)
idvalue2genclassref
- an HashTable that associates an id value with a GenClassRef object.
setmotable
public void setmotable(Hashtable motable)
Assigns an HashTable object to the MappingParser object.
motable
- an HashTable that associates a pd file to its corresponding MetaObject.