net.openmarkup
Interface Realizable

All Superinterfaces:
Element, Node

public interface Realizable
extends Element

Run-time representation of an element.

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
 AttributeHandler getAttributeHandler(String namespaceURI, String attrName)
          Returns the AttributeHandler for the specified attribute name if the attribute name is recognized; otherwise, this method returns null.
 String getAttributeNSOptional(String namespaceURI, String localName)
          Returns the value of the specified attribute, using the given namepsace, if possible.
 Realizable getDelegate()
          Returns the object that this Realizable delegates object realization tasks to.
 ElementHandler getElementHandler(String namespaceURI, String elemName)
          Returns the ElementHandler for the specified element name if the element name is recognized by this Realizable; otherwise, this method returns null.
 ElementType getElementType()
          Returns the element type of this Realizable.
 Object getObject()
          Returns the object that is realized from this element.
 String getObjectClassName()
          Returns the class name of the object that is realized from this Realizable, taking into account the class name specified through the class attribute of this element.
 ObjectRealizer getObjectRealizer()
          Returns the object realizer that created this document.
 URL getResolvedURL(String uri)
          Resolves the specified URI string against the xml:base attributes, if any.
 
Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS
 
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

getElementType

public ElementType getElementType()
Returns the element type of this Realizable.

Returns:
the element type of this Realizable

getElementHandler

public ElementHandler getElementHandler(String namespaceURI,
                                        String elemName)
Returns the ElementHandler for the specified element name if the element name is recognized by this Realizable; otherwise, this method returns null.

Parameters:
namespaceURI - element namespace URI
elemName - element name
Returns:
the ElementHandler for the specified element name if the element name is recognized; otherwise, return null

getAttributeNSOptional

public String getAttributeNSOptional(String namespaceURI,
                                     String localName)
Returns the value of the specified attribute, using the given namepsace, if possible. If the attribute is not found in the given namespace, this method tries to search for an attribute with the same local name, but with no namespace, and returns its value if found.

This is because the absence of a namespace prefix in an attribute means that the attribute is not associated with any namespace at all. The convention for such an attribute is that it belongs to the same namespace as the element containing it.

Parameters:
namespaceURI - namespace URI of the attribute
localName - local name of the attribute
Returns:
the value of the specified attribute

getAttributeHandler

public AttributeHandler getAttributeHandler(String namespaceURI,
                                            String attrName)
Returns the AttributeHandler for the specified attribute name if the attribute name is recognized; otherwise, this method returns null.

Parameters:
namespaceURI - attribute namespace URI
attrName - attribute name
Returns:
the AttributeHandler for the specified attribute name if the attribute name is recognized; otherwise, return null

getObjectClassName

public String getObjectClassName()
Returns the class name of the object that is realized from this Realizable, taking into account the class name specified through the class attribute of this element.

Returns:
the class name of the object that is realized from this Realizable

getObject

public Object getObject()
Returns the object that is realized from this element.

Returns:
the object that is realized from this element

getDelegate

public Realizable getDelegate()
Returns the object that this Realizable delegates object realization tasks to. Typically, but not necessarily, the returned object is the same as this Realizable element.

Returns:
the object that this Realizable delegates object realization tasks to

getResolvedURL

public URL getResolvedURL(String uri)
Resolves the specified URI string against the xml:base attributes, if any. If no xml:base attribute has been defined in the document, the specified URI string is resolved against the document's base URL.

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

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.