org.objectweb.jorm.xml2mi.api
Interface MappingParser

All Known Implementing Classes:
ProxyParser, FosParser, RDBParser, MemoryParser, FosParser, MemoryParser, RDBParser

public interface MappingParser

The MappingParser interface has methods to parse specific mapping information from an Element object. The methods use a basic MetaObject, and fill-in it with corresponding mapping information.

Author:
X. Spengler

Method Summary
 void parseMapping(org.w3c.dom.Element node, Class class_)
          Parses the mapping part of the XML file and builds the corresponding meta-information for a given Class object.
 void parseMapping(org.w3c.dom.Element node, GenClassRef genClassRef)
          Parses the mapping part of the XML file and builds the corresponding meta-information for a given GenClassRef object.
 void parseMapping(org.w3c.dom.Element node, PrimitiveElement primitiveElement)
          Parses the mapping part of the XML file and builds the corresponding meta-information for a given PrimitiveElement object.
 void setMapperName(java.lang.String mapperName)
          Sets the name of the mapper to use.
 void setMappingName(java.lang.String mappingName)
          Sets the name of the mapping to use.
 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.util.io.api.PathExplorer pathexpl)
          Assigns a PathExplorer object for locating files that have to be parsed.
 

Method Detail

parseMapping

public void parseMapping(org.w3c.dom.Element node,
                         Class class_)
Parses the mapping part of the XML file and builds the corresponding meta-information for a given Class object. Manager, PathExplorer, MapperName and MappingName must be set before the call of this method.
Parameters:
node - the node to treat
class_ - the class to complete

parseMapping

public void parseMapping(org.w3c.dom.Element node,
                         PrimitiveElement primitiveElement)
Parses the mapping part of the XML file and builds the corresponding meta-information for a given PrimitiveElement object. Manager, PathExplorer, MapperName and MappingName must be set before the call of this method.
Parameters:
node - the node to treat
primitiveElement - the primitive element to complete

parseMapping

public void parseMapping(org.w3c.dom.Element node,
                         GenClassRef genClassRef)
Parses the mapping part of the XML file and builds the corresponding meta-information for a given GenClassRef object. Manager, PathExplorer, MapperName and MappingName must be set before the call of this method.
Parameters:
node - the node to treat
genClassRef - the generic class reference to complete

setMetaInfoManager

public 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.
Parameters:
mim - the meta-information Manager to be associated to this parser

setPathExplorer

public void setPathExplorer(org.objectweb.util.io.api.PathExplorer pathexpl)
Assigns a PathExplorer object for locating files that have to be parsed.
Parameters:
pathexpl - The PathExplorer to be used for file location

setMapperName

public void setMapperName(java.lang.String mapperName)
Sets the name of the mapper to use. This name is passed on the command line or defined in a properties file.
Parameters:
mapperName - the name of the mapper

setMappingName

public void setMappingName(java.lang.String mappingName)
Sets the name of the mapping to use. This name is passed on the command line or defined in a properties file.
Parameters:
mappingName - the name of the mapping