org.objectweb.jorm.mi2xml.lib
Class BasicMappingDomtreeBuilder

java.lang.Object
  extended byorg.objectweb.jorm.mi2xml.lib.BasicMappingDomtreeBuilder
All Implemented Interfaces:
Loggable, MappingDomtreeBuilder
Direct Known Subclasses:
FosDomtreeBuilder, MemDomtreeBuilder, RdbDomtreeBuilder

public abstract class BasicMappingDomtreeBuilder
extends java.lang.Object
implements MappingDomtreeBuilder, Loggable

BasicMappingDomtreeBuilder implements the MappingDomtreeBuilder interface.


Field Summary
protected  Class currentClass
          The current Class object.
protected  Logger logger
          a simple logger to log
protected  LoggerFactory loggerFactory
          a logger factory to create other loggers if needed
protected  java.util.Map metaobject2idvalue
          This HashTable associates a MetaObject with an id value.
 
Constructor Summary
BasicMappingDomtreeBuilder()
           
 
Method Summary
 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.
abstract  void processClassMapping(org.w3c.dom.Document document, org.w3c.dom.Element mappingElement, ClassMapping classMapping)
          Adds a class mapping element to a mapping element.
abstract  void processGenClassMapping(org.w3c.dom.Document document, org.w3c.dom.Element mappingElement, GenClassMapping genClassMapping)
          Adds a generic class mapping element to a mapping element.
 void setCurrentClass(Class currentClass)
          Assigns the current Class object to the MappingDomtreeBuilder object.
 void setLogger(Logger logger)
          Defines a logger object.
 void setLoggerFactory(LoggerFactory loggerfactory)
          Defines the logger factory to obtain new loggers.
 void setmetaobject2idvalue(java.util.Map metaobject2idvalue)
          Assigns an HashTable object to the MappingDomtreeBuilder object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentClass

protected Class currentClass
The current Class object.


metaobject2idvalue

protected java.util.Map metaobject2idvalue
This HashTable associates a MetaObject with an id value.


logger

protected Logger logger
a simple logger to log


loggerFactory

protected LoggerFactory loggerFactory
a logger factory to create other loggers if needed

Constructor Detail

BasicMappingDomtreeBuilder

public BasicMappingDomtreeBuilder()
Method Detail

setCurrentClass

public void setCurrentClass(Class currentClass)
Assigns the current Class object to the MappingDomtreeBuilder object.

Specified by:
setCurrentClass in interface MappingDomtreeBuilder
Parameters:
currentClass - the Jorm meta-object associated to the parsed class.

setmetaobject2idvalue

public void setmetaobject2idvalue(java.util.Map metaobject2idvalue)
Assigns an HashTable object to the MappingDomtreeBuilder object.

Specified by:
setmetaobject2idvalue in interface MappingDomtreeBuilder
Parameters:
metaobject2idvalue - an HashTable that associates a MetaObject with an id value.

processClassMapping

public abstract void processClassMapping(org.w3c.dom.Document document,
                                         org.w3c.dom.Element mappingElement,
                                         ClassMapping classMapping)
                                  throws PException
Adds a class mapping element to a mapping element.

Specified by:
processClassMapping in interface MappingDomtreeBuilder
Parameters:
document - an org.w3c.dom.Document object, mappingElement a mapping element, classMapping a ClassMapping object.
Throws:
PException

processGenClassMapping

public abstract void processGenClassMapping(org.w3c.dom.Document document,
                                            org.w3c.dom.Element mappingElement,
                                            GenClassMapping genClassMapping)
                                     throws PException
Adds a generic class mapping element to a mapping element.

Specified by:
processGenClassMapping in interface MappingDomtreeBuilder
Parameters:
document - an org.w3c.dom.Document object, mappingElement a mapping element, genClassMapping a GenClassMapping object.
Throws:
PException

setLogger

public void setLogger(Logger logger)
Defines a logger object.

Specified by:
setLogger in interface Loggable
Parameters:
logger - the logger object

setLoggerFactory

public void setLoggerFactory(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 Logger getLogger()
Description copied from interface: Loggable
Returns a logger to an component that wants to log things.

Specified by:
getLogger in interface Loggable

getLoggerFactory

public LoggerFactory getLoggerFactory()
Description copied from interface: Loggable
Returns a logger factory that allows the creation of new loggers.

Specified by:
getLoggerFactory in interface Loggable