net.sf.doolin.oxml
Class OXMLReader<T>

java.lang.Object
  extended by net.sf.doolin.oxml.OXMLReader<T>
Type Parameters:
T - Expected type of the root object

public class OXMLReader<T>
extends Object

OXML reader.

Author:
Damien Coraboeuf

Constructor Summary
OXMLReader(OXMLConfig cfg)
          Initialization of the reader.
OXMLReader(OXMLConfig cfg, Map<String,Object> contextMap)
          Initialization of the reader.
 
Method Summary
 T read(OXMLSource source)
          Reads an XML source and returns the root object.
 T read(OXMLSource source, OXMLReaderOutput output, OXMLContextConfig contextConfig)
          Reads an XML source and returns the root object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OXMLReader

public OXMLReader(OXMLConfig cfg)
Initialization of the reader.

Parameters:
cfg - Configuration to use

OXMLReader

public OXMLReader(OXMLConfig cfg,
                  Map<String,Object> contextMap)
Initialization of the reader.

Parameters:
cfg - Configuration to use
contextMap - Map of objects for the context
Method Detail

read

public T read(OXMLSource source)
       throws IOException
Reads an XML source and returns the root object.

Parameters:
source - XML source
Returns:
Root object
Throws:
IOException - If the source cannot be read.

read

public T read(OXMLSource source,
              OXMLReaderOutput output,
              OXMLContextConfig contextConfig)
       throws IOException
Reads an XML source and returns the root object.

Parameters:
source - XML source
output - Output of meta information after the reading is complete
contextConfig - Context configuration (can be null if default configuration is to be used).
Returns:
Root object
Throws:
IOException - If the source cannot be read.


Copyright © 2011. All Rights Reserved.