com.smallx.xml.infoset.memory
Class MemoryDocument
java.lang.Object
com.smallx.xml.infoset.memory.MemoryItem
com.smallx.xml.infoset.memory.MemoryParent
com.smallx.xml.infoset.memory.MemoryDocument
- All Implemented Interfaces:
- Child, Document, Item, Location, Parent
- public class MemoryDocument
- extends MemoryParent
- implements Document
Fields inherited from interface com.smallx.xml.infoset.Document |
TYPE |
Fields inherited from interface com.smallx.xml.infoset.Item |
ANCESTOR_AXIS, ANCESTOR_OR_SELF_AXIS, ATTRIBUTE, ATTRIBUTE_AXIS, CHARACTERS, CHILD_AXIS, COMMENT, DESCENDANT_AXIS, DESCENDANT_OR_SELF_AXIS, DOCUMENT, DOCUMENT_END, ELEMENT, ELEMENT_END, FOLLOWING_AXIS, FOLLOWING_SIBLING_AXIS, N_TYPES, NAMESPACE, NAMESPACE_AXIS, PARENT_AXIS, PRECEDING_AXIS, PRECEDING_SIBLING_AXIS, PROCESSING_INSTRUCTION, SELF_AXIS |
Methods inherited from class com.smallx.xml.infoset.memory.MemoryParent |
getAxis, getChildAt, getChildren, getChildrenByType, getNumberOfChildren, getParent, hasChildren, insertChildBefore, removeChild, removeChildAt, swapChild |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
standalone
protected int standalone
version
protected java.lang.String version
docElement
protected Element docElement
elementMap
protected java.util.Map elementMap
MemoryDocument
public MemoryDocument(java.net.URI base,
Infoset context)
getBaseURI
public java.net.URI getBaseURI()
- Description copied from interface:
Parent
- Returns the base URI of the document.
- Specified by:
getBaseURI
in interface Parent
- Overrides:
getBaseURI
in class MemoryParent
setBaseURI
public void setBaseURI(java.net.URI base)
- Specified by:
setBaseURI
in interface Parent
- Overrides:
setBaseURI
in class MemoryParent
setIndex
protected void setIndex(int index)
- Specified by:
setIndex
in class MemoryItem
getType
public byte getType()
- Description copied from interface:
Item
- Returns the type of type node.
- Specified by:
getType
in interface Item
getDocumentElement
public Element getDocumentElement()
- Description copied from interface:
Document
- Returns the document element.
- Specified by:
getDocumentElement
in interface Document
getNamespaceScope
public NamespaceScope getNamespaceScope()
createDocumentElement
public Element createDocumentElement(Name name)
- Description copied from interface:
Document
- Create the document element with the specified name.
- Specified by:
createDocumentElement
in interface Document
- Parameters:
name
- The name to use for the document element.
- Returns:
- An instance of Element which represents the document element created.
createDocumentElement
public Element createDocumentElement(java.lang.String localName)
- Description copied from interface:
Document
- Create the document element with the specified name.
- Specified by:
createDocumentElement
in interface Document
- Parameters:
localName
- The name to use for the document element.
- Returns:
- An instance of Element which represents the document element created.
appendChild
public void appendChild(Child n)
- Description copied from interface:
Parent
- Appends a child to the parents children list.
- Specified by:
appendChild
in interface Parent
- Overrides:
appendChild
in class MemoryParent
getElementWithId
public Element getElementWithId(java.lang.String id)
- Description copied from interface:
Document
- Returns an element with a specified id.
- Specified by:
getElementWithId
in interface Document
getFollowingSibling
public Child getFollowingSibling()
- Description copied from interface:
Child
- Returns the following sibling of this node.
- Specified by:
getFollowingSibling
in interface Child
- Returns:
- An instance of Item or null.
getPrecedingSibling
public Child getPrecedingSibling()
- Description copied from interface:
Child
- Returns the preceeding sibling to this node.
- Specified by:
getPrecedingSibling
in interface Child
getFollowingSiblings
public java.util.Iterator getFollowingSiblings()
- Specified by:
getFollowingSiblings
in interface Child
getPrecedingSiblings
public java.util.Iterator getPrecedingSiblings()
- Specified by:
getPrecedingSiblings
in interface Child
getColumn
public int getColumn()
- Specified by:
getColumn
in interface Location
getLine
public int getLine()
- Specified by:
getLine
in interface Location
setColumn
public void setColumn(int column)
- Specified by:
setColumn
in interface Location
setLine
public void setLine(int line)
- Specified by:
setLine
in interface Location