org.apache.axis2.om.impl.dom
Class AttrImpl

java.lang.Object
  extended byorg.apache.axis2.om.impl.dom.NodeImpl
      extended byorg.apache.axis2.om.impl.dom.AttrImpl
All Implemented Interfaces:
Attr, Cloneable, Node, NodeList, org.apache.ws.commons.om.OMAttribute, org.apache.ws.commons.om.OMNode, org.apache.ws.commons.om.impl.OMNodeEx

public class AttrImpl
extends NodeImpl
implements org.apache.ws.commons.om.OMAttribute, Attr

Implementation of org.w3c.dom.Attr and org.apache.ws.commons.om.OMAttribute


Field Summary
protected  ParentNode parent
          Owner of this attribute
 
Fields inherited from class org.apache.axis2.om.impl.dom.NodeImpl
builder, done, factory, FIRSTCHILD, flags, nodeType, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIED
 
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
 
Fields inherited from interface org.apache.ws.commons.om.OMNode
CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODE
 
Constructor Summary
protected AttrImpl(DocumentImpl ownerDocument, org.apache.ws.commons.om.OMFactory factory)
           
  AttrImpl(DocumentImpl ownerDocument, String name, org.apache.ws.commons.om.OMFactory factory)
           
  AttrImpl(DocumentImpl ownerDocument, String localName, org.apache.ws.commons.om.OMNamespace namespace, org.apache.ws.commons.om.OMFactory factory)
           
  AttrImpl(DocumentImpl ownerDocument, String localName, org.apache.ws.commons.om.OMNamespace ns, String value, org.apache.ws.commons.om.OMFactory factory)
           
  AttrImpl(DocumentImpl ownerDocument, String name, String value, org.apache.ws.commons.om.OMFactory factory)
           
 
Method Summary
 Node cloneNode(boolean deep)
           
 org.apache.ws.commons.om.OMNode detach()
          Not supported: Cannot detach attributes.
 void discard()
          Not supported: Cannot discard attributes.
 String getAttributeValue()
          Returns the attribute value.
 String getLocalName()
          Returns the attribute name.
 String getName()
           
 org.apache.ws.commons.om.OMNamespace getNamespace()
          Returns the namespace of the attribute as an OMNamespace.
 String getNamespaceURI()
          Returns the namespace URI of this attr node.
 String getNodeName()
          Returns the name of this attribute.
 short getNodeType()
          Returns the node type.
 String getNodeValue()
          Returns the value of this attribute.
 Element getOwnerElement()
          Returns the owner element.
 org.apache.ws.commons.om.OMContainer getParent()
          Returns the parent node of this attribute.
 String getPrefix()
          Returns the namespace prefix of this attr node.
 QName getQName()
          Returns a qname representing the attribute.
 TypeInfo getSchemaTypeInfo()
           
 boolean getSpecified()
           
 int getType()
          Returns the type of this attribute node.
 String getValue()
          Returns the value of this attribute.
 boolean isId()
           
protected  boolean isUsed()
           
 void serialize(org.apache.ws.commons.om.impl.OMOutputImpl omOutput)
          This is not supported since attributes serialization is handled by the serialization of the owner nodes.
 void serializeAndConsume(org.apache.ws.commons.om.impl.OMOutputImpl omOutput)
          This is not supported since attributes serialization is handled by the serialization of the owner nodes.
 void setAttributeValue(String value)
          Sets the attribute value.
 void setLocalName(String localName)
          Sets the name of attribute.
 void setOMNamespace(org.apache.ws.commons.om.OMNamespace omNamespace)
          Sets the namespace of this attribute node.
 void setParent(org.apache.ws.commons.om.OMContainer element)
          Sets the parent element to the given OMContainer.
 void setType(int nodeType)
          Sets the type.
protected  void setUsed(boolean used)
           
 void setValue(String value)
          Sets the value of the attribute.
 String toString()
           
 
Methods inherited from class org.apache.axis2.om.impl.dom.NodeImpl
appendChild, build, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLength, getNextOMSibling, getNextSibling, getOMFactory, getOwnerDocument, getParentNode, getPreviousOMSibling, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, insertSiblingAfter, insertSiblingBefore, isComplete, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeWithCache, setComplete, setNextOMSibling, setNodeValue, setOwnerDocument, setPrefix, setPreviousOMSibling, setTextContent, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.ws.commons.om.OMAttribute
getOMFactory
 
Methods inherited from interface org.w3c.dom.Node
appendChild, getAttributes, getChildNodes, getFirstChild, getLastChild, getNextSibling, getOwnerDocument, getParentNode, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 

Field Detail

parent

protected ParentNode parent
Owner of this attribute

Constructor Detail

AttrImpl

protected AttrImpl(DocumentImpl ownerDocument,
                   org.apache.ws.commons.om.OMFactory factory)

AttrImpl

public AttrImpl(DocumentImpl ownerDocument,
                String localName,
                org.apache.ws.commons.om.OMNamespace ns,
                String value,
                org.apache.ws.commons.om.OMFactory factory)

AttrImpl

public AttrImpl(DocumentImpl ownerDocument,
                String name,
                String value,
                org.apache.ws.commons.om.OMFactory factory)

AttrImpl

public AttrImpl(DocumentImpl ownerDocument,
                String name,
                org.apache.ws.commons.om.OMFactory factory)

AttrImpl

public AttrImpl(DocumentImpl ownerDocument,
                String localName,
                org.apache.ws.commons.om.OMNamespace namespace,
                org.apache.ws.commons.om.OMFactory factory)
Method Detail

getNodeName

public String getNodeName()
Returns the name of this attribute.

Specified by:
getNodeName in interface Node

getNodeType

public short getNodeType()
Returns the node type.

Specified by:
getNodeType in interface Node
See Also:
Node.getNodeType()

getNodeValue

public String getNodeValue()
                    throws DOMException
Returns the value of this attribute.

Specified by:
getNodeValue in interface Node
Overrides:
getNodeValue in class NodeImpl
Throws:
DOMException
See Also:
Node.getNodeValue()

getValue

public String getValue()
Returns the value of this attribute.

Specified by:
getValue in interface Attr
See Also:
Attr.getValue()

getName

public String getName()
Specified by:
getName in interface Attr

getOwnerElement

public Element getOwnerElement()
Returns the owner element.

Specified by:
getOwnerElement in interface Attr
See Also:
Attr.getOwnerElement()

getSpecified

public boolean getSpecified()
Specified by:
getSpecified in interface Attr

detach

public org.apache.ws.commons.om.OMNode detach()
                                       throws org.apache.ws.commons.om.OMException
Not supported: Cannot detach attributes. Use the operations available in the owner node.

Specified by:
detach in interface org.apache.ws.commons.om.OMNode
Overrides:
detach in class NodeImpl
Throws:
org.apache.ws.commons.om.OMException
See Also:
OMNode.detach()

discard

public void discard()
             throws org.apache.ws.commons.om.OMException
Not supported: Cannot discard attributes. Use the operations available in the owner node.

Specified by:
discard in interface org.apache.ws.commons.om.OMNode
Throws:
org.apache.ws.commons.om.OMException
See Also:
OMNode.discard()

getType

public int getType()
Returns the type of this attribute node.

Specified by:
getType in interface org.apache.ws.commons.om.OMNode
See Also:
OMNode.getType()

serialize

public void serialize(org.apache.ws.commons.om.impl.OMOutputImpl omOutput)
               throws XMLStreamException
This is not supported since attributes serialization is handled by the serialization of the owner nodes.

Specified by:
serialize in interface org.apache.ws.commons.om.impl.OMNodeEx
Throws:
XMLStreamException
See Also:
(org.apache.ws.commons.om.impl.OMOutputImpl)

serializeAndConsume

public void serializeAndConsume(org.apache.ws.commons.om.impl.OMOutputImpl omOutput)
                         throws XMLStreamException
This is not supported since attributes serialization is handled by the serialization of the owner nodes.

Specified by:
serializeAndConsume in interface org.apache.ws.commons.om.impl.OMNodeEx
Throws:
XMLStreamException
See Also:
(org.apache.ws.commons.om.impl.OMOutputImpl)

getNamespace

public org.apache.ws.commons.om.OMNamespace getNamespace()
Returns the namespace of the attribute as an OMNamespace.

Specified by:
getNamespace in interface org.apache.ws.commons.om.OMAttribute
See Also:
OMAttribute.getNamespace()

getQName

public QName getQName()
Returns a qname representing the attribute.

Specified by:
getQName in interface org.apache.ws.commons.om.OMAttribute
See Also:
OMAttribute.getQName()

getAttributeValue

public String getAttributeValue()
Returns the attribute value.

Specified by:
getAttributeValue in interface org.apache.ws.commons.om.OMAttribute
See Also:
OMAttribute.getAttributeValue()

setLocalName

public void setLocalName(String localName)
Sets the name of attribute.

Specified by:
setLocalName in interface org.apache.ws.commons.om.OMAttribute
See Also:
OMAttribute.setLocalName(java.lang.String)

setOMNamespace

public void setOMNamespace(org.apache.ws.commons.om.OMNamespace omNamespace)
Sets the namespace of this attribute node.

Specified by:
setOMNamespace in interface org.apache.ws.commons.om.OMAttribute
See Also:
(org.apache.ws.commons.om.OMNamespace)

setAttributeValue

public void setAttributeValue(String value)
Sets the attribute value.

Specified by:
setAttributeValue in interface org.apache.ws.commons.om.OMAttribute
See Also:
OMAttribute.setAttributeValue(java.lang.String)

setParent

public void setParent(org.apache.ws.commons.om.OMContainer element)
Sets the parent element to the given OMContainer.

Specified by:
setParent in interface org.apache.ws.commons.om.impl.OMNodeEx
See Also:
(org.apache.ws.commons.om.OMContainer)

setType

public void setType(int nodeType)
             throws org.apache.ws.commons.om.OMException
Sets the type. NOT IMPLEMENTED: Unnecessary.

Specified by:
setType in interface org.apache.ws.commons.om.impl.OMNodeEx
Throws:
org.apache.ws.commons.om.OMException
See Also:
OMNodeEx.setType(int)

isUsed

protected boolean isUsed()
Returns:
Returns boolean.

setUsed

protected void setUsed(boolean used)
Parameters:
used - The used to set.

setValue

public void setValue(String value)
              throws DOMException
Sets the value of the attribute.

Specified by:
setValue in interface Attr
Throws:
DOMException
See Also:
Attr.setValue(java.lang.String)

getParent

public org.apache.ws.commons.om.OMContainer getParent()
Returns the parent node of this attribute.

Specified by:
getParent in interface org.apache.ws.commons.om.OMNode
Overrides:
getParent in class NodeImpl
See Also:
OMNode.getParent()

getLocalName

public String getLocalName()
Returns the attribute name.

Specified by:
getLocalName in interface org.apache.ws.commons.om.OMAttribute
Overrides:
getLocalName in class NodeImpl
See Also:
Node.getLocalName()

getNamespaceURI

public String getNamespaceURI()
Returns the namespace URI of this attr node.

Specified by:
getNamespaceURI in interface Node
Overrides:
getNamespaceURI in class NodeImpl
See Also:
Node.getNamespaceURI()

getPrefix

public String getPrefix()
Returns the namespace prefix of this attr node.

Specified by:
getPrefix in interface Node
Overrides:
getPrefix in class NodeImpl
See Also:
Node.getPrefix()

cloneNode

public Node cloneNode(boolean deep)
Specified by:
cloneNode in interface Node
Overrides:
cloneNode in class NodeImpl

getSchemaTypeInfo

public TypeInfo getSchemaTypeInfo()

isId

public boolean isId()

toString

public String toString()