com.softwareag.centrasite.appl.framework.parser
Class ParsedXMLDocument

java.lang.Object
  extended by com.softwareag.centrasite.appl.framework.parser.ParsedXMLDocument
All Implemented Interfaces:
NodeInfo

public class ParsedXMLDocument
extends java.lang.Object
implements NodeInfo

The ParsedXMLDocumentCreator creates instances of this class. This is basically a DOM document. The main advantage over native DOM documents is the possibility to query for a nodes location.


Constructor Summary
ParsedXMLDocument(org.w3c.dom.Document pDocument)
          Creates a new instance with the given document.
 
Method Summary
 void checkElement(org.w3c.dom.Node pNode, javax.xml.namespace.QName pQName)
          Checks, whether the given element has the given name.
 org.w3c.dom.Document getDocument()
          Returns the document, which has been created.
 org.xml.sax.Locator getLocator(org.w3c.dom.Node pNode)
          Returns the given nodes locator.
 javax.xml.namespace.QName getMandatoryQNameAttribute(org.w3c.dom.Element pElement, java.lang.String pAttr)
          Queries the given element for a mandatory attribute.
 java.lang.String getMandatoryStringAttribute(org.w3c.dom.Element pElement, java.lang.String pAttr)
          Queries the given element for a mandatory attribute.
 javax.xml.namespace.QName getQName(org.w3c.dom.Node pNode, java.lang.String pValue)
          Converts the given argument into a QName.
 boolean isElement(org.w3c.dom.Node pNode, javax.xml.namespace.QName pQName)
          Returns, whether the given node is an element with the given name.
 javax.xml.namespace.QName newQName(org.w3c.dom.Node pNode)
          Creates a new QName with the given nodes name.
 javax.xml.namespace.QName newQName(java.lang.String pURI, java.lang.String pLocalPart)
          Creates a new QName with the given URI, and local part.
 void registerNode(org.w3c.dom.Node pNode, org.xml.sax.Locator pLocator, com.softwareag.centrasite.appl.framework.parser.ParsedXMLDocument.PrefixLookup pPrefixLookup)
          Registers the given nodes locator.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParsedXMLDocument

public ParsedXMLDocument(org.w3c.dom.Document pDocument)
Creates a new instance with the given document.

Method Detail

registerNode

public void registerNode(org.w3c.dom.Node pNode,
                         org.xml.sax.Locator pLocator,
                         com.softwareag.centrasite.appl.framework.parser.ParsedXMLDocument.PrefixLookup pPrefixLookup)
Registers the given nodes locator.


getDocument

public org.w3c.dom.Document getDocument()
Returns the document, which has been created.


getLocator

public org.xml.sax.Locator getLocator(org.w3c.dom.Node pNode)
Returns the given nodes locator.

Specified by:
getLocator in interface NodeInfo

getQName

public javax.xml.namespace.QName getQName(org.w3c.dom.Node pNode,
                                          java.lang.String pValue)
Description copied from interface: NodeInfo
Converts the given argument into a QName.

Specified by:
getQName in interface NodeInfo

checkElement

public void checkElement(org.w3c.dom.Node pNode,
                         javax.xml.namespace.QName pQName)
                  throws CSAppFrameworkException
Checks, whether the given element has the given name.

Throws:
CSAppFrameworkException

isElement

public boolean isElement(org.w3c.dom.Node pNode,
                         javax.xml.namespace.QName pQName)
Returns, whether the given node is an element with the given name.


newQName

public javax.xml.namespace.QName newQName(org.w3c.dom.Node pNode)
Creates a new QName with the given nodes name.


newQName

public javax.xml.namespace.QName newQName(java.lang.String pURI,
                                          java.lang.String pLocalPart)
Creates a new QName with the given URI, and local part.


getMandatoryQNameAttribute

public javax.xml.namespace.QName getMandatoryQNameAttribute(org.w3c.dom.Element pElement,
                                                            java.lang.String pAttr)
                                                     throws CSAppFrameworkException
Queries the given element for a mandatory attribute.

Throws:
CSAppFrameworkException

getMandatoryStringAttribute

public java.lang.String getMandatoryStringAttribute(org.w3c.dom.Element pElement,
                                                    java.lang.String pAttr)
                                             throws CSAppFrameworkException
Queries the given element for a mandatory attribute.

Throws:
CSAppFrameworkException