org.pasoa.dommap
Class MappedDocument

java.lang.Object
  extended by org.pasoa.dommap.SimpleNode
      extended by org.pasoa.dommap.SimpleDocument
          extended by org.pasoa.dommap.MappedDocument
All Implemented Interfaces:
Document, Node
Direct Known Subclasses:
QStructureActivityDocument

public abstract class MappedDocument
extends SimpleDocument


Field Summary
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
protected MappedDocument(Map initialNamespaces)
           
 
Method Summary
protected  SimpleAttr buildAttribute(Node parent, String qname, String value)
           
protected  Node buildElement(SimpleNode parent, int childIndex, String qname, Map context)
           
protected  SimpleText buildText(SimpleNode parent, int childIndex, String value)
           
 String getAttribute(String name)
           
 Attr getAttributeNode(String name)
           
 String getAttributeNS(String namespaceURI, String localName)
           
protected abstract  List getAttributes(String parentName, Node parent, Map context)
           
protected abstract  Node getChild(String parentName, SimpleNode parent, int index, Map context)
           
protected abstract  int getNumberOfChildren(String name, Map context)
           
protected abstract  String getRootElement()
           
 TypeInfo getSchemaTypeInfo()
           
 boolean hasAttribute(String name)
           
 boolean hasAttributeNS(String namespaceURI, String localName)
           
 int hashCode()
           
protected  void initialise(Map initialContext)
           
 void removeAttribute(String name)
           
 Attr removeAttributeNode(Attr oldAttr)
           
 void removeAttributeNS(String namespaceURI, String localName)
           
 void setAttribute(String name, String value)
           
 Attr setAttributeNode(Attr newAttr)
           
 void setIdAttribute(String name, boolean isId)
           
 void setIdAttributeNode(Attr idAttr, boolean isId)
           
 void setIdAttributeNS(String namespaceURI, String localName, boolean isId)
           
 
Methods inherited from class org.pasoa.dommap.SimpleDocument
adoptNode, cloneNode, compareDocumentPosition, createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, getAttributes, getBaseURI, getDoctype, getDocumentElement, getDocumentURI, getDomConfig, getElementById, getElementsByTagName, getElementsByTagNameNS, getFeature, getImplementation, getInputEncoding, getLocalName, getNamespaceURI, getNodeType, getNodeValue, getOwnerDocument, getPreviousSibling, getStrictErrorChecking, getTextContent, getUserData, getXmlEncoding, getXmlStandalone, getXmlVersion, hasAttributes, importNode, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, normalizeDocument, removeChild, renameNode, replaceChild, setDocumentURI, setNodeValue, setPrefix, setStrictErrorChecking, setTextContent, setUserData, setXmlStandalone, setXmlVersion
 
Methods inherited from class org.pasoa.dommap.SimpleNode
addNamespace, appendChild, cloneChildren, cloneNode, equals, getAllNamespaces, getAttributeNodeNS, getChildCount, getChildNodes, getFirstChild, getLastChild, getNamespaceForPrefix, getNextSibling, getNodeName, getParentNode, getPrefix, getPrefixForNamespace, getTagName, hasChildNodes, importInto, incorporateChild, setAttributeNodeNS, setAttributeNS, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, getChildNodes, getFirstChild, getLastChild, getNextSibling, getNodeName, getParentNode, getPrefix, hasChildNodes
 

Constructor Detail

MappedDocument

protected MappedDocument(Map initialNamespaces)
Method Detail

buildAttribute

protected SimpleAttr buildAttribute(Node parent,
                                    String qname,
                                    String value)

buildElement

protected Node buildElement(SimpleNode parent,
                            int childIndex,
                            String qname,
                            Map context)
                     throws UnderlyingModelException
Throws:
UnderlyingModelException

buildText

protected SimpleText buildText(SimpleNode parent,
                               int childIndex,
                               String value)

getAttributes

protected abstract List getAttributes(String parentName,
                                      Node parent,
                                      Map context)
                               throws UnderlyingModelException
Throws:
UnderlyingModelException

getChild

protected abstract Node getChild(String parentName,
                                 SimpleNode parent,
                                 int index,
                                 Map context)
                          throws UnderlyingModelException
Throws:
UnderlyingModelException

getNumberOfChildren

protected abstract int getNumberOfChildren(String name,
                                           Map context)
                                    throws UnderlyingModelException
Throws:
UnderlyingModelException

getRootElement

protected abstract String getRootElement()
                                  throws UnderlyingModelException
Throws:
UnderlyingModelException

initialise

protected void initialise(Map initialContext)
                   throws UnderlyingModelException
Throws:
UnderlyingModelException

hashCode

public int hashCode()
Overrides:
hashCode in class Object

setIdAttributeNode

public void setIdAttributeNode(Attr idAttr,
                               boolean isId)
                        throws DOMException
Throws:
DOMException

setAttributeNode

public Attr setAttributeNode(Attr newAttr)
                      throws DOMException
Throws:
DOMException

removeAttributeNode

public Attr removeAttributeNode(Attr oldAttr)
                         throws DOMException
Throws:
DOMException

getAttribute

public String getAttribute(String name)

getAttributeNode

public Attr getAttributeNode(String name)

hasAttribute

public boolean hasAttribute(String name)

removeAttribute

public void removeAttribute(String name)
                     throws DOMException
Throws:
DOMException

setIdAttributeNS

public void setIdAttributeNS(String namespaceURI,
                             String localName,
                             boolean isId)
                      throws DOMException
Throws:
DOMException

setIdAttribute

public void setIdAttribute(String name,
                           boolean isId)
                    throws DOMException
Throws:
DOMException

setAttribute

public void setAttribute(String name,
                         String value)
                  throws DOMException
Throws:
DOMException

getAttributeNS

public String getAttributeNS(String namespaceURI,
                             String localName)
                      throws DOMException
Throws:
DOMException

getSchemaTypeInfo

public TypeInfo getSchemaTypeInfo()

hasAttributeNS

public boolean hasAttributeNS(String namespaceURI,
                              String localName)
                       throws DOMException
Throws:
DOMException

removeAttributeNS

public void removeAttributeNS(String namespaceURI,
                              String localName)
                       throws DOMException
Throws:
DOMException