com.openharbor.beck
Class ObjectDOMReader

java.lang.Object
  extended bycom.openharbor.beck.ObjectDOMReader

public class ObjectDOMReader
extends java.lang.Object

Copies Java objects from DOM.


Field Summary
protected  org.apache.commons.logging.Log log
           
 
Constructor Summary
ObjectDOMReader(MapFromXML.Source mapperSource)
          Use mappers from the given Source.
ObjectDOMReader(MapFromXML mapper)
          Use the given mapper.
 
Method Summary
static void copy(org.w3c.dom.Node from, org.xml.sax.ContentHandler into)
          Copy data from a DOM Node into a SAX event stream.
 java.lang.Object read(org.w3c.dom.Node from)
          Map an object from a DOM Node (usually a Document or Element).
 void setEntityResolver(org.xml.sax.EntityResolver entityResolver)
          Set the SAX entity resolver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.apache.commons.logging.Log log
Constructor Detail

ObjectDOMReader

public ObjectDOMReader(MapFromXML mapper)
Use the given mapper. This is not thread-safe.


ObjectDOMReader

public ObjectDOMReader(MapFromXML.Source mapperSource)
Use mappers from the given Source.

Method Detail

copy

public static void copy(org.w3c.dom.Node from,
                        org.xml.sax.ContentHandler into)
                 throws java.lang.Exception
Copy data from a DOM Node into a SAX event stream.

Throws:
java.lang.Exception

setEntityResolver

public void setEntityResolver(org.xml.sax.EntityResolver entityResolver)
Set the SAX entity resolver. This can be useful for directing the parser to load DTD, schema documents or other external entities.


read

public java.lang.Object read(org.w3c.dom.Node from)
                      throws java.lang.Exception
Map an object from a DOM Node (usually a Document or Element).

Throws:
java.lang.Exception