org.jbind.xml.dom3.core
Class DomAttr

java.lang.Object
  extended byorg.jbind.xml.dom3.core.DomObject
      extended byorg.jbind.xml.dom3.core.DomNode
          extended byorg.jbind.xml.dom3.core.DomAttrOrElm
              extended byorg.jbind.xml.dom3.core.DomAttr
All Implemented Interfaces:
org.w3c.dom.Attr, IAttributeImpl, IDataImpl, IDomAttr, IDomAttrOrElm, IDomNode, IDomObject, IHasLocation, IImpl, IImplChild, IImplWithText, org.w3c.dom.Node

public class DomAttr
extends DomAttrOrElm
implements IDomAttr


Field Summary
 
Fields inherited from class org.jbind.xml.dom3.core.DomNode
myChildNodes, myParentNode
 
Fields inherited from class org.jbind.xml.dom3.core.DomObject
myOwnerDocument
 
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
 
Constructor Summary
protected DomAttr(IDomAttr aDomAttr, boolean aDeep)
           
  DomAttr(IDomDocument aDomDocument, java.lang.String aName)
           
  DomAttr(IDomDocument aDomDocument, java.lang.String aNamespaceUri, java.lang.String aQName)
           
 
Method Summary
 void accept(IDataImplVisitor aVisitor)
           
 org.w3c.dom.Node cloneNode(boolean aDeep)
           
protected  void doAfterAccept(IDomVisitor aDomVisitor)
           
protected  void doBeforeAccept(IDomVisitor aDomVisitor)
           
 IDomNodeList doCloneChildNodes(IDomNodeList aDomNodeList, boolean aDeep)
          Hook method for cloning the child nodes.
protected  org.w3c.dom.Node getAncestor()
          Gets the parent or owner element.
 IAnyTypeData getAttributeData(java.lang.String aNamespace, java.lang.String aLocalName)
          Gets the data object of an attribute.
 org.w3c.dom.NamedNodeMap getAttributes()
           
 java.lang.String getName()
           
 short getNodeType()
           
 java.lang.String getNodeValue()
           
 org.w3c.dom.Element getOwnerElement()
           
 IElementImpl getOwnerElementImpl()
           
 IDomAttrsMap getOwnerMap()
           
 boolean getSpecified()
           
 java.lang.String getValue()
           
 boolean hasAttributes()
           
 boolean hasTextContent()
          Checks if the implementation has textual content.
 boolean isNil()
          Indicates if the data implementation was assigned "nil".
 java.util.Iterator iterAttributes(java.lang.String aNamespace, java.lang.String aName)
          Iterates the attribute data objects for the specified namespace and name.
 java.util.ListIterator iterElementData(java.lang.String aNamespace, java.lang.String aLocalName)
          Iterates the data objects for the specified namespace and element name.
 void setNodeValue(java.lang.String aString)
           
 void setOwnerMap(IDomAttrsMap anOwnerMap)
           
 void setValue(java.lang.String aString)
           
 
Methods inherited from class org.jbind.xml.dom3.core.DomAttrOrElm
getData, getLocalName, getNamespace, getNamespaceURI, getNodeName, getPartName, getPrefix, getTextContent, isDefault, setData, setPrefix
 
Methods inherited from class org.jbind.xml.dom3.core.DomNode
accept, addElement, addElement, addText, appendChild, collectTextContent, collectTextContent, compareTreePosition, getBaseURI, getChild, getChildByClass, getChildNodes, getFirstChild, getInterface, getLastChild, getLocation, getNamespaceForPrefix, getNbChildren, getNextSibling, getNonDefaultedNbChildren, getParentImpl, getParentNode, getPrefixForNamespace, getPrefixToNamespaceMapping, getPreviousSibling, getUserData, hasChildNodes, insertAfter, insertBefore, isEqualNode, isSameNode, isSupported, iterChildren, lookupNamespacePrefix, lookupNamespaceURI, normalize, removeChild, replaceChild, restoreTextContent, saveTextContent, setChildNodes, setLocation, setPrefixToNamespaceMapping, setTextContent, setTextContent, visitChildren
 
Methods inherited from class org.jbind.xml.dom3.core.DomObject
checkMutability, checkOwnerDocument, getOwnerDocument, isReadOnly
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
appendChild, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setPrefix
 
Methods inherited from interface org.jbind.xml.dom3.types.IDomAttrOrElm
getNamespaceForPrefix
 
Methods inherited from interface org.jbind.xml.dom3.types.IDomNode
accept, getTextContent, insertAfter, lookupNamespaceURI, setLocation, setPrefixToNamespaceMapping, setTextContent, setTextContent
 
Methods inherited from interface org.jbind.xml.dom3.types.IDomObject
getOwnerDocument, isReadOnly
 
Methods inherited from interface org.jbind.xml.base.IHasLocation
getLocation
 
Methods inherited from interface org.jbind.xml.core.bridge.IDataImpl
getData, getNamespace, getPartName, setData
 
Methods inherited from interface org.jbind.xml.core.data.IImpl
getPrefixToNamespaceMapping, iterChildren
 
Methods inherited from interface org.jbind.xml.core.bridge.IImplChild
getParentImpl
 
Methods inherited from interface org.jbind.xml.core.bridge.IImplWithText
getTextContent, isDefault, restoreTextContent, saveTextContent, setTextContent, setTextContent
 

Constructor Detail

DomAttr

public DomAttr(IDomDocument aDomDocument,
               java.lang.String aNamespaceUri,
               java.lang.String aQName)

DomAttr

public DomAttr(IDomDocument aDomDocument,
               java.lang.String aName)

DomAttr

protected DomAttr(IDomAttr aDomAttr,
                  boolean aDeep)
Method Detail

getNodeType

public short getNodeType()
Specified by:
getNodeType in interface org.w3c.dom.Node

getAttributes

public org.w3c.dom.NamedNodeMap getAttributes()
Specified by:
getAttributes in interface org.w3c.dom.Node

hasAttributes

public boolean hasAttributes()
Specified by:
hasAttributes in interface org.w3c.dom.Node

iterAttributes

public java.util.Iterator iterAttributes(java.lang.String aNamespace,
                                         java.lang.String aName)
Description copied from interface: IDataImpl
Iterates the attribute data objects for the specified namespace and name.

Specified by:
iterAttributes in interface IDataImpl
Parameters:
aNamespace - (optional).
aName - (optional).
Returns:
(required). An iterator of IAnyTypeData.

getName

public java.lang.String getName()
Specified by:
getName in interface org.w3c.dom.Attr

cloneNode

public org.w3c.dom.Node cloneNode(boolean aDeep)
Specified by:
cloneNode in interface org.w3c.dom.Node

doCloneChildNodes

public IDomNodeList doCloneChildNodes(IDomNodeList aDomNodeList,
                                      boolean aDeep)
Description copied from class: DomNode
Hook method for cloning the child nodes.

Specified by:
doCloneChildNodes in class DomNode

getOwnerElement

public org.w3c.dom.Element getOwnerElement()
Specified by:
getOwnerElement in interface org.w3c.dom.Attr

getOwnerElementImpl

public IElementImpl getOwnerElementImpl()

getSpecified

public boolean getSpecified()
Specified by:
getSpecified in interface org.w3c.dom.Attr

getValue

public java.lang.String getValue()
Specified by:
getValue in interface org.w3c.dom.Attr

setValue

public void setValue(java.lang.String aString)
Specified by:
setValue in interface org.w3c.dom.Attr

getNodeValue

public java.lang.String getNodeValue()
Specified by:
getNodeValue in interface org.w3c.dom.Node

setNodeValue

public void setNodeValue(java.lang.String aString)
Specified by:
setNodeValue in interface org.w3c.dom.Node

getOwnerMap

public IDomAttrsMap getOwnerMap()
Specified by:
getOwnerMap in interface IDomAttr

setOwnerMap

public void setOwnerMap(IDomAttrsMap anOwnerMap)
Specified by:
setOwnerMap in interface IDomAttr

isNil

public boolean isNil()
Description copied from interface: IImpl
Indicates if the data implementation was assigned "nil".

Specified by:
isNil in interface IImpl
Returns:
Returns true iff the data implementation was assigned "nil".

doBeforeAccept

protected void doBeforeAccept(IDomVisitor aDomVisitor)
Specified by:
doBeforeAccept in class DomNode

doAfterAccept

protected void doAfterAccept(IDomVisitor aDomVisitor)
Specified by:
doAfterAccept in class DomNode

getAncestor

protected org.w3c.dom.Node getAncestor()
Description copied from class: DomNode
Gets the parent or owner element.

Overrides:
getAncestor in class DomNode

getAttributeData

public IAnyTypeData getAttributeData(java.lang.String aNamespace,
                                     java.lang.String aLocalName)
Description copied from interface: IImpl
Gets the data object of an attribute.

Specified by:
getAttributeData in interface IImpl
Parameters:
aNamespace - (required).
aLocalName - (required).
Returns:
(optional).

iterElementData

public java.util.ListIterator iterElementData(java.lang.String aNamespace,
                                              java.lang.String aLocalName)
Description copied from interface: IImpl
Iterates the data objects for the specified namespace and element name.

Specified by:
iterElementData in interface IImpl
Parameters:
aNamespace - (required).
aLocalName - (required).
Returns:
(required). An iterator of IAnyTypeData.

hasTextContent

public boolean hasTextContent()
Description copied from interface: IImplWithText
Checks if the implementation has textual content. This method is used to decide if a default value should be used or not.

Attribute implementations will always return true because attributes take their default values only if they are not present in the instance.

Element implementation will return true iff their text content is null or equal to the empty string. In other words the default value of an element is used when the element is empty. (cf. the note at W3C XML-Schema-Structure specification section 3.1.1).

Specified by:
hasTextContent in interface IImplWithText
Returns:
Returns true iff there is textual content.

accept

public void accept(IDataImplVisitor aVisitor)
            throws XmlException
Specified by:
accept in interface IImpl
Throws:
XmlException