org.dbforms.dom
Class AbstractDOMFactoryImpl

java.lang.Object
  extended by org.dbforms.dom.AbstractDOMFactoryImpl
All Implemented Interfaces:
IDOMFactory
Direct Known Subclasses:
DOMFactoryXALANImpl

public abstract class AbstractDOMFactoryImpl
extends Object
implements IDOMFactory

abstract class to hide the implemtation details of the various dom implementations.

Author:
Henner Kollmann

Constructor Summary
AbstractDOMFactoryImpl()
           
 
Method Summary
abstract  String DOM2String(Document doc)
          Creates a string representation of the given DOMDocument
abstract  Document newDOMDocument()
          Creates a new empty DOMDocument
abstract  org.w3c.dom.xpath.XPathEvaluator newXPathEvaluator()
          returns an new created XPathEvaluator
abstract  Document read(InputStream in)
          Reads a DOMDocument from given InputStream
 Document read(String url)
          Reads a DOMDocument from given url
abstract  Document String2DOM(String data)
          Creates an new DOMDocument from the given string
 void write(OutputStream out, Document doc)
          Writes a DOMDocument into an OutputStream
abstract  void write(OutputStream out, Element root)
          Writes a DOMElement into an OutputStream
 void write(String url, Document doc)
          Writes an DOMDocument into a file
 void write(String url, Element root)
          Writes an DOMElement into a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDOMFactoryImpl

public AbstractDOMFactoryImpl()
Method Detail

DOM2String

public abstract String DOM2String(Document doc)
Creates a string representation of the given DOMDocument

Specified by:
DOM2String in interface IDOMFactory
Parameters:
doc - The document to transform
Returns:
string representation

String2DOM

public abstract Document String2DOM(String data)
Creates an new DOMDocument from the given string

Specified by:
String2DOM in interface IDOMFactory
Parameters:
data - the string to parse
Returns:
The new DOMDocument

newDOMDocument

public abstract Document newDOMDocument()
Creates a new empty DOMDocument

Specified by:
newDOMDocument in interface IDOMFactory
Returns:
An empty DOMDocument

read

public abstract Document read(InputStream in)
Reads a DOMDocument from given InputStream

Specified by:
read in interface IDOMFactory
Parameters:
in - The InputStream to read
Returns:
The new parsed DOMDocument

read

public Document read(String url)
Reads a DOMDocument from given url

Specified by:
read in interface IDOMFactory
Parameters:
url - the url to read from
Returns:
The new parsed DOMDocument

write

public abstract void write(OutputStream out,
                           Element root)
                    throws IOException
Writes a DOMElement into an OutputStream

Specified by:
write in interface IDOMFactory
Parameters:
out - OutputStream to write into
root - root element to start writing
Throws:
IOException

write

public final void write(OutputStream out,
                        Document doc)
                 throws IOException
Writes a DOMDocument into an OutputStream

Specified by:
write in interface IDOMFactory
Parameters:
out - OutputStream to write into
doc - doc to write
Throws:
IOException

write

public final void write(String url,
                        Document doc)
                 throws IOException
Writes an DOMDocument into a file

Specified by:
write in interface IDOMFactory
Parameters:
url - The url to write to
doc - The document to write
Throws:
IOException

write

public final void write(String url,
                        Element root)
                 throws IOException
Writes an DOMElement into a file

Specified by:
write in interface IDOMFactory
Parameters:
url - The url to write to
root - root element to start writing
Throws:
IOException

newXPathEvaluator

public abstract org.w3c.dom.xpath.XPathEvaluator newXPathEvaluator()
returns an new created XPathEvaluator

Specified by:
newXPathEvaluator in interface IDOMFactory
Returns:
the new XPathEvaluator


Copyright © 2002-2006 DbForms. All Rights Reserved.