net.openmarkup
Interface Document

All Superinterfaces:
Document, Node

public interface Document
extends Document

Extension of the DOM Document interface with utility methods.

Author:
Ramesh Gupta

Field Summary
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Method Summary
 Realizable getElement(String uriString)
          Returns the Element identified by the specified URI string.
 ObjectRealizer getObjectRealizer()
          Returns the object realizer that created this document.
 URL getResolvedURL(String uri)
          Resolves the specified URI string against this document's base URL, and returns the resulting URL.
 
Methods inherited from interface org.w3c.dom.Document
createAttribute, createAttributeNS, createCDATASection, createComment, createDocumentFragment, createElement, createElementNS, createEntityReference, createProcessingInstruction, createTextNode, getDoctype, getDocumentElement, getElementById, getElementsByTagName, getElementsByTagNameNS, getImplementation, importNode
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 

Method Detail

getResolvedURL

public URL getResolvedURL(String uri)
Resolves the specified URI string against this document's base URL, and returns the resulting URL.

Parameters:
uri - an absolute or relative URI string
Returns:
URL obtained by resolving the specified URI string against this document's base URL
See Also:
XML Base, Establishing a Base URI (Section 5.1 of RFC 2396)

getElement

public Realizable getElement(String uriString)
Returns the Element identified by the specified URI string. This is semantically equivalent to ObjectRealizer.getElement(String) but is designed to short-circuit the object realization process for certain types of URIs. If the URI string starts with the fragment identifier '#', this document interprets the remainder of the uri string as the ID of an element in this document. Implementations may also support arbitrary XPath expressions in addition to the "bare names" scheme described here. If the URI string does not identify a specific element, the first significant element under the document's root element is returned. What constitutes a "significant" element depends on the specific vocabularies that the ObjectRealizer is configured with.

Parameters:
uriString - absolute or relative uri identifying the element description
Returns:
the Element identified by the specified uri string

getObjectRealizer

public ObjectRealizer getObjectRealizer()
Returns the object realizer that created this document.

Returns:
the object realizer that created this document


Copyright 2003-2004 eNode, Inc. All rights reserved.