org.objectweb.jorm.xml2mi.rdb
Class RDBParser

java.lang.Object
  |
  +--org.objectweb.jorm.xml2mi.rdb.RDBParser
All Implemented Interfaces:
Loggable, MappingParser

public class RDBParser
extends java.lang.Object
implements MappingParser, Loggable

RDBParser is an implementation of the Parser interface. This object defines a parser which is able to parse meta information related to an RDB system, and able to build the corresponding meta information.

Author:
X. Spengler

Constructor Summary
RDBParser()
          Builds a new rdb parser.
 
Method Summary
 org.objectweb.util.monolog.api.Logger getLogger()
          Returns a logger to an component that wants to log things.
 org.objectweb.util.monolog.api.LoggerFactory getLoggerFactory()
          Returns a logger factory that allows the creation of new loggers.
 void parseMapping(org.w3c.dom.Element element, 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 element, 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 element, PrimitiveElement primitiveElement)
          Parses the mapping part of the XML file and builds the corresponding meta-information for a given PrimitiveElement object.
 void setLogger(org.objectweb.util.monolog.api.Logger logger)
          Defines a logger object.
 void setLoggerFactory(org.objectweb.util.monolog.api.LoggerFactory loggerfactory)
          Defines the logger factory to obtain new loggers.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RDBParser

public RDBParser()
Builds a new rdb parser. this class is loaded by a classloader.
Method Detail

parseMapping

public void parseMapping(org.w3c.dom.Element element,
                         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.
Specified by:
parseMapping in interface MappingParser
Parameters:
element - the node to treat
class_ - the class to complete

parseMapping

public void parseMapping(org.w3c.dom.Element element,
                         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.
Specified by:
parseMapping in interface MappingParser
Parameters:
element - the node to treat
primitiveElement - the primitive element to complete

parseMapping

public void parseMapping(org.w3c.dom.Element element,
                         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.
Specified by:
parseMapping in interface MappingParser
Parameters:
element - 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.
Specified by:
setMetaInfoManager in interface MappingParser
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.
Specified by:
setPathExplorer in interface MappingParser
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.
Specified by:
setMapperName in interface MappingParser
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.
Specified by:
setMappingName in interface MappingParser
Parameters:
mappingName - the name of the mapping

setLogger

public void setLogger(org.objectweb.util.monolog.api.Logger logger)
Defines a logger object.
Specified by:
setLogger in interface Loggable
Parameters:
logger - the logger object

setLoggerFactory

public void setLoggerFactory(org.objectweb.util.monolog.api.LoggerFactory loggerfactory)
Defines the logger factory to obtain new loggers.
Specified by:
setLoggerFactory in interface Loggable
Parameters:
loggerfactory - The LoggerFactory object to obtain a logger object

getLogger

public org.objectweb.util.monolog.api.Logger getLogger()
Description copied from interface: Loggable
Returns a logger to an component that wants to log things.
Specified by:
getLogger in interface Loggable
Following copied from interface: org.objectweb.jorm.util.api.Loggable
Parameters:
logger - the logger object

getLoggerFactory

public org.objectweb.util.monolog.api.LoggerFactory getLoggerFactory()
Description copied from interface: Loggable
Returns a logger factory that allows the creation of new loggers.
Specified by:
getLoggerFactory in interface Loggable
Following copied from interface: org.objectweb.jorm.util.api.Loggable
Parameters:
loggerfactory - the LoggerFactory object to obtain new loggers