org.objectweb.jorm.mi2xml.lib
Class BasicDomWriter

java.lang.Object
  extended byorg.objectweb.jorm.mi2xml.lib.BasicDomWriter
All Implemented Interfaces:
Loggable, Writer

public class BasicDomWriter
extends java.lang.Object
implements Writer, Loggable

BasicDomWriter implements the Writer interface. BasicDomWriter generates the .pd file of a Class or a CompositeName object.


Field Summary
static java.lang.String XML_INDENT
          Default indentation for xml viewer.
 
Constructor Summary
BasicDomWriter()
           
 
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.
 void init(JormConfigurator compilerConfigurator)
          Initializes a BasicDomWriter object.
 void setLogger(Logger logger)
          Defines a logger object.
 void setLoggerFactory(LoggerFactory loggerfactory)
          Defines the logger factory to obtain new loggers.
 void write(MetaObject mo, TargetHolder holder)
          This method first builds the DOMTree of a Class or a CompositeName object and then generates the .pd file by delegation to the XMLSerializer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XML_INDENT

public static final java.lang.String XML_INDENT
Default indentation for xml viewer.

See Also:
Constant Field Values
Constructor Detail

BasicDomWriter

public BasicDomWriter()
Method Detail

init

public void init(JormConfigurator compilerConfigurator)
          throws PException
Initializes a BasicDomWriter object.

Specified by:
init in interface Writer
Parameters:
compilerConfigurator - a JormConfiguratorImpl object.
Throws:
PException

write

public void write(MetaObject mo,
                  TargetHolder holder)
           throws PException
This method first builds the DOMTree of a Class or a CompositeName object and then generates the .pd file by delegation to the XMLSerializer.

Specified by:
write in interface Writer
Parameters:
mo - a Class or a CompositeName object.
holder - The target holder which allows to create files.
Throws:
PException - if an error occurs during the generation.

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