org.jscience.ml.cml.dom.pmr
Class PMRDocumentBuilder

java.lang.Object
  extended by javax.xml.parsers.DocumentBuilder
      extended by org.jscience.ml.cml.dom.pmr.PMRDocumentBuilder

public class PMRDocumentBuilder
extends javax.xml.parsers.DocumentBuilder

DOCUMENT ME!


Field Summary
protected  javax.xml.parsers.DocumentBuilder documentBuilder
          DOCUMENT ME!
 
Constructor Summary
protected PMRDocumentBuilder()
          no-arg
  PMRDocumentBuilder(javax.xml.parsers.DocumentBuilder documentBuilder)
          the default DocumentBuilder
  PMRDocumentBuilder(java.lang.String className)
          default unimplemented
 
Method Summary
 org.w3c.dom.DOMImplementation getDOMImplementation()
          Obtain an instance of a PMRDOMImplementation object.
 boolean isNamespaceAware()
          Indicates whether or not this parser is configured to understand namespaces.
 boolean isValidating()
          Indicates whether or not this parser is configured to validate XML documents.
 org.w3c.dom.Document newDocument()
          Obtain a new instance of a DOM PMRDocument object to build a DOM tree with.
 org.w3c.dom.Document parse(java.io.File f)
          Parse the content of the given file as an XML document and return a new DOM Document object.
 org.w3c.dom.Document parse(org.xml.sax.InputSource is)
          Parse the content of the given input source as an XML document and return a new DOM Document object.
 org.w3c.dom.Document parse(java.io.InputStream is)
          Parse the content of the given InputStream as an XML document and return a new DOM Document object.
 org.w3c.dom.Document parse(java.io.InputStream is, java.lang.String systemId)
          Parse the content of the given InputStream as an XML document and return a new DOM Document object.
 org.w3c.dom.Document parse(java.lang.String uri)
          Parse the content of the given URI as an XML document and return a new DOM Document object.
 void setEntityResolver(org.xml.sax.EntityResolver er)
          Specify the EntityResolver to be used to resolve entities present in the XML document to be parsed.
 void setErrorHandler(org.xml.sax.ErrorHandler eh)
          Specify the ErrorHandler to be used to report errors present in the XML document to be parsed.
 
Methods inherited from class javax.xml.parsers.DocumentBuilder
getSchema, isXIncludeAware, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

documentBuilder

protected javax.xml.parsers.DocumentBuilder documentBuilder
DOCUMENT ME!

Constructor Detail

PMRDocumentBuilder

protected PMRDocumentBuilder()
no-arg


PMRDocumentBuilder

public PMRDocumentBuilder(javax.xml.parsers.DocumentBuilder documentBuilder)
the default DocumentBuilder

Parameters:
documentBuilder - DOCUMENT ME!

PMRDocumentBuilder

public PMRDocumentBuilder(java.lang.String className)
default unimplemented

Parameters:
className - DOCUMENT ME!
Method Detail

setEntityResolver

public void setEntityResolver(org.xml.sax.EntityResolver er)
Specify the EntityResolver to be used to resolve entities present in the XML document to be parsed. Setting this to null will result in the underlying implementation using it's own default implementation and behavior. Parameters: er - The EntityResolver to be used to resolve entities present in the XML document to be parsed.

Specified by:
setEntityResolver in class javax.xml.parsers.DocumentBuilder
Parameters:
er - DOCUMENT ME!

setErrorHandler

public void setErrorHandler(org.xml.sax.ErrorHandler eh)
Specify the ErrorHandler to be used to report errors present in the XML document to be parsed. Setting this to null will result in the underlying implementation using it's own default implementation and behavior. Parameters: eh - The ErrorHandler to be used to report errors present in the XML document to be parsed.

Specified by:
setErrorHandler in class javax.xml.parsers.DocumentBuilder
Parameters:
eh - DOCUMENT ME!

parse

public org.w3c.dom.Document parse(java.io.InputStream is)
                           throws org.xml.sax.SAXException,
                                  java.io.IOException
Parse the content of the given InputStream as an XML document and return a new DOM Document object. Parameters: is - InputStream containing the content to be parsed. Throws: java.io.IOException - If any IO errors occur. SAXException - If any parse errors occur. java.lang.IllegalArgumentException - If the InputStream is null See Also: DocumentHandler

Overrides:
parse in class javax.xml.parsers.DocumentBuilder
Parameters:
is - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
org.xml.sax.SAXException - DOCUMENT ME!
java.io.IOException

parse

public org.w3c.dom.Document parse(java.io.InputStream is,
                                  java.lang.String systemId)
                           throws org.xml.sax.SAXException,
                                  java.io.IOException
Parse the content of the given InputStream as an XML document and return a new DOM Document object. Parameters: is - InputStream containing the content to be parsed. systemId - Provide a base for resolving relative URIs. Returns: A new DOM Document object. Throws: java.io.IOException - If any IO errors occur. SAXException - If any parse errors occur. java.lang.IllegalArgumentException - If the InputStream is null. See Also: DocumentHandler

Overrides:
parse in class javax.xml.parsers.DocumentBuilder
Parameters:
is - DOCUMENT ME!
systemId - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
org.xml.sax.SAXException - DOCUMENT ME!
java.io.IOException

parse

public org.w3c.dom.Document parse(java.lang.String uri)
                           throws org.xml.sax.SAXException,
                                  java.io.IOException
Parse the content of the given URI as an XML document and return a new DOM Document object. Parameters: uri - The location of the content to be parsed. Returns: A new DOM Document object. Throws: java.io.IOException - If any IO errors occur. SAXException - If any parse errors occur. java.lang.IllegalArgumentException - If the URI is null. See Also: DocumentHandler

Overrides:
parse in class javax.xml.parsers.DocumentBuilder
Parameters:
uri - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
org.xml.sax.SAXException - DOCUMENT ME!
java.io.IOException

parse

public org.w3c.dom.Document parse(java.io.File f)
                           throws org.xml.sax.SAXException,
                                  java.io.IOException
Parse the content of the given file as an XML document and return a new DOM Document object. Parameters: f - The file containing the XML to parse. Returns: A new DOM Document object. Throws: java.io.IOException - If any IO errors occur. SAXException - If any parse errors occur. java.lang.IllegalArgumentException - If the file is null. See Also: DocumentHandler

Overrides:
parse in class javax.xml.parsers.DocumentBuilder
Parameters:
f - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
org.xml.sax.SAXException - DOCUMENT ME!
java.io.IOException

parse

public org.w3c.dom.Document parse(org.xml.sax.InputSource is)
                           throws org.xml.sax.SAXException,
                                  java.io.IOException
Parse the content of the given input source as an XML document and return a new DOM Document object. Parameters: is - InputSource containing the content to be parsed. Returns: A new DOM Document object. Throws: java.io.IOException - If any IO errors occur. SAXException - If any parse errors occur. java.lang.IllegalArgumentException - If the InputSource is null. See Also: DocumentHandler

Specified by:
parse in class javax.xml.parsers.DocumentBuilder
Parameters:
is - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
org.xml.sax.SAXException - DOCUMENT ME!
java.io.IOException

isNamespaceAware

public boolean isNamespaceAware()
Indicates whether or not this parser is configured to understand namespaces. Returns: true if this parser is configured to understand namespaces; false otherwise.

Specified by:
isNamespaceAware in class javax.xml.parsers.DocumentBuilder
Returns:
DOCUMENT ME!

isValidating

public boolean isValidating()
Indicates whether or not this parser is configured to validate XML documents. Returns: true if this parser is configured to validate XML documents; false otherwise.

Specified by:
isValidating in class javax.xml.parsers.DocumentBuilder
Returns:
DOCUMENT ME!

newDocument

public org.w3c.dom.Document newDocument()
Obtain a new instance of a DOM PMRDocument object to build a DOM tree with. An alternative way to create a DOM Document object is to use the getDOMImplementation method to get a DOM Level 2 DOMImplementation object and then use DOM Level 2 methods on that object to create a DOM Document object. Returns: A new instance of a DOM PMRDocument object.

Specified by:
newDocument in class javax.xml.parsers.DocumentBuilder
Returns:
DOCUMENT ME!

getDOMImplementation

public org.w3c.dom.DOMImplementation getDOMImplementation()
Obtain an instance of a PMRDOMImplementation object.

Specified by:
getDOMImplementation in class javax.xml.parsers.DocumentBuilder
Returns:
A new instance of a PMRDOMImplementation.