Top Fields Constructors Methods
com.sun.org.apache.xerces.internal.impl.xs.opti

public Class ElementImpl

extends DefaultElement
Class Inheritance
Imports
org.w3c.dom.Attr, .Document, .NamedNodeMap, .Node

Authors
Rahul Srivastava, Sun Microsystems Inc., Sandy Gao, IBM

Field Summary

Modifier and TypeField and Description
pack-priv Attr[]
pack-priv int
pack-priv int
pack-priv int
pack-priv String
pack-priv String
pack-priv int
pack-priv int
pack-priv int
pack-priv SchemaDOM

Constructor Summary

AccessConstructor and Description
public
ElementImpl(int line, int column, int offset)

public
ElementImpl(int line, int column)

public
ElementImpl(String prefix, String localpart, String rawname, String uri, int line, int column, int offset)

public
ElementImpl(String prefix, String localpart, String rawname, String uri, int line, int column)

Method Summary

Modifier and TypeMethod and Description
public String
public String
getAttribute(String
The name of the attribute to retrieve.
name
)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultElement.getAttribute.

Implements org.w3c.dom.Element.getAttribute.

Retrieves an attribute value by name.

public Attr
getAttributeNode(String
The name (nodeName) of the attribute to retrieve.
name
)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultElement.getAttributeNode.

Implements org.w3c.dom.Element.getAttributeNode.

Retrieves an attribute node by name.

public Attr
getAttributeNodeNS(String
The namespace URI of the attribute to retrieve.
namespaceURI
,
String
The local name of the attribute to retrieve.
localName
)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultElement.getAttributeNodeNS.

Implements org.w3c.dom.Element.getAttributeNodeNS.

Retrieves an Attr node by local name and namespace URI.

public String
getAttributeNS(String
The namespace URI of the attribute to retrieve.
namespaceURI
,
String
The local name of the attribute to retrieve.
localName
)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultElement.getAttributeNS.

Implements org.w3c.dom.Element.getAttributeNS.

Retrieves an attribute value by local name and namespace URI.

public NamedNodeMap
getAttributes()

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultNode.getAttributes.

Implements org.w3c.dom.Node.getAttributes.

A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.

public int
getCharacterOffset()

Returns the character offset.

public int
getColumnNumber()

Returns the column number.

public Node
public Node
public int
getLineNumber()

Returns the line number.

public Node
public Document
public Node
public Node
public String
public String
public boolean
hasAttribute(String
The name of the attribute to look for.
name
)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultElement.hasAttribute.

Implements org.w3c.dom.Element.hasAttribute.

Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise.

public boolean
hasAttributeNS(String
The namespace URI of the attribute to look for.
namespaceURI
,
String
The local name of the attribute to look for.
localName
)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultElement.hasAttributeNS.

Implements org.w3c.dom.Element.hasAttributeNS.

Returns true when an attribute with a given local name and namespace URI is specified on this element or has a default value, false otherwise.

public boolean
hasAttributes()

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultNode.hasAttributes.

Implements org.w3c.dom.Node.hasAttributes.

Returns whether this node (if it is an element) has any attributes.

public boolean
private static boolean
nsEquals(String nsURI_1, String nsURI_2)

Compares two namespace URIs with an extra case for null entries

public void
setAttribute(String
The name of the attribute to create or alter.
name
,
String
Value to set in string form.
value
)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultElement.setAttribute.

Implements org.w3c.dom.Element.setAttribute.

Adds a new attribute.

Inherited from com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultElement:
getElementsByTagNamegetElementsByTagNameNSgetSchemaTypeInforemoveAttributeremoveAttributeNoderemoveAttributeNSsetAttributeNodesetAttributeNodeNSsetAttributeNSsetIdAttributesetIdAttributeNodesetIdAttributeNS

Field Detail

attrsback to summary
pack-priv Attr[] attrs
charOffsetback to summary
pack-priv int charOffset
colback to summary
pack-priv int col
columnback to summary
pack-priv int column
fAnnotationback to summary
pack-priv String fAnnotation
fSyntheticAnnotationback to summary
pack-priv String fSyntheticAnnotation
lineback to summary
pack-priv int line
parentRowback to summary
pack-priv int parentRow
rowback to summary
pack-priv int row
schemaDOMback to summary
pack-priv SchemaDOM schemaDOM

Constructor Detail

ElementImplback to summary
public ElementImpl(int line, int column, int offset)
ElementImplback to summary
public ElementImpl(int line, int column)
ElementImplback to summary
public ElementImpl(String prefix, String localpart, String rawname, String uri, int line, int column, int offset)
ElementImplback to summary
public ElementImpl(String prefix, String localpart, String rawname, String uri, int line, int column)

Method Detail

getAnnotationback to summary
public String getAnnotation()
getAttributeback to summary
public String getAttribute(String name)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultElement.getAttribute.

Implements org.w3c.dom.Element.getAttribute.

Doc from org.w3c.dom.Element.getAttribute.

Retrieves an attribute value by name.

Parameters
name:String

The name of the attribute to retrieve.

Returns:String

The Attr value as a string, or the empty string if that attribute does not have a specified or default value.

getAttributeNodeback to summary
public Attr getAttributeNode(String name)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultElement.getAttributeNode.

Implements org.w3c.dom.Element.getAttributeNode.

Doc from org.w3c.dom.Element.getAttributeNode.

Retrieves an attribute node by name.
To retrieve an attribute node by qualified name and namespace URI, use the getAttributeNodeNS method.

Parameters
name:String

The name (nodeName) of the attribute to retrieve.

Returns:Attr

The Attr node with the specified name ( nodeName) or null if there is no such attribute.

getAttributeNodeNSback to summary
public Attr getAttributeNodeNS(String namespaceURI, String localName)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultElement.getAttributeNodeNS.

Implements org.w3c.dom.Element.getAttributeNodeNS.

Doc from org.w3c.dom.Element.getAttributeNodeNS.

Retrieves an Attr node by local name and namespace URI.
Per [XML Namespaces] , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.

Parameters
namespaceURI:String

The namespace URI of the attribute to retrieve.

localName:String

The local name of the attribute to retrieve.

Returns:Attr

The Attr node with the specified attribute local name and namespace URI or null if there is no such attribute.

getAttributeNSback to summary
public String getAttributeNS(String namespaceURI, String localName)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultElement.getAttributeNS.

Implements org.w3c.dom.Element.getAttributeNS.

Doc from org.w3c.dom.Element.getAttributeNS.

Retrieves an attribute value by local name and namespace URI.
Per [XML Namespaces] , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.

Parameters
namespaceURI:String

The namespace URI of the attribute to retrieve.

localName:String

The local name of the attribute to retrieve.

Returns:String

The Attr value as a string, or the empty string if that attribute does not have a specified or default value.

getAttributesback to summary
public NamedNodeMap getAttributes()

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultNode.getAttributes.

Implements org.w3c.dom.Node.getAttributes.

Doc from org.w3c.dom.Node.getAttributes.

A NamedNodeMap containing the attributes of this node (if it is an Element) or null otherwise.

getCharacterOffsetback to summary
public int getCharacterOffset()

Returns the character offset.

getColumnNumberback to summary
public int getColumnNumber()

Returns the column number.

getFirstChildback to summary
public Node getFirstChild()

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultNode.getFirstChild.

Implements org.w3c.dom.Node.getFirstChild.

Doc from org.w3c.dom.Node.getFirstChild.

The first child of this node. If there is no such node, this returns null.

getLastChildback to summary
public Node getLastChild()

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultNode.getLastChild.

Implements org.w3c.dom.Node.getLastChild.

Doc from org.w3c.dom.Node.getLastChild.

The last child of this node. If there is no such node, this returns null.

getLineNumberback to summary
public int getLineNumber()

Returns the line number.

getNextSiblingback to summary
public Node getNextSibling()

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultNode.getNextSibling.

Implements org.w3c.dom.Node.getNextSibling.

Doc from org.w3c.dom.Node.getNextSibling.

The node immediately following this node. If there is no such node, this returns null.

getOwnerDocumentback to summary
public Document getOwnerDocument()

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultNode.getOwnerDocument.

Implements org.w3c.dom.Node.getOwnerDocument.

Doc from org.w3c.dom.Node.getOwnerDocument.

The Document object associated with this node. This is also the Document object used to create new nodes. When this node is a Document or a DocumentType which is not used with any Document yet, this is null.

getParentNodeback to summary
public Node getParentNode()

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultNode.getParentNode.

Implements org.w3c.dom.Node.getParentNode.

Doc from org.w3c.dom.Node.getParentNode.

The parent of this node. All nodes, except Attr, Document, DocumentFragment, Entity, and Notation may have a parent. However, if a node has just been created and not yet added to the tree, or if it has been removed from the tree, this is null.

getPreviousSiblingback to summary
public Node getPreviousSibling()

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultNode.getPreviousSibling.

Implements org.w3c.dom.Node.getPreviousSibling.

Doc from org.w3c.dom.Node.getPreviousSibling.

The node immediately preceding this node. If there is no such node, this returns null.

getSyntheticAnnotationback to summary
public String getSyntheticAnnotation()
getTagNameback to summary
public String getTagName()

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultElement.getTagName.

Implements org.w3c.dom.Element.getTagName.

Doc from org.w3c.dom.Element.getTagName.

The name of the element. If Node.localName is different from null, this attribute is a qualified name. For example, in:

 <elementExample id="demo"> ...
</elementExample> , 
tagName has the value "elementExample". Note that this is case-preserving in XML, as are all of the operations of the DOM. The HTML DOM returns the tagName of an HTML element in the canonical uppercase form, regardless of the case in the source HTML document.
hasAttributeback to summary
public boolean hasAttribute(String name)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultElement.hasAttribute.

Implements org.w3c.dom.Element.hasAttribute.

Doc from org.w3c.dom.Element.hasAttribute.

Returns true when an attribute with a given name is specified on this element or has a default value, false otherwise.

Parameters
name:String

The name of the attribute to look for.

Returns:boolean

true if an attribute with the given name is specified on this element or has a default value, false otherwise.

hasAttributeNSback to summary
public boolean hasAttributeNS(String namespaceURI, String localName)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultElement.hasAttributeNS.

Implements org.w3c.dom.Element.hasAttributeNS.

Doc from org.w3c.dom.Element.hasAttributeNS.

Returns true when an attribute with a given local name and namespace URI is specified on this element or has a default value, false otherwise.
Per [XML Namespaces] , applications must use the value null as the namespaceURI parameter for methods if they wish to have no namespace.

Parameters
namespaceURI:String

The namespace URI of the attribute to look for.

localName:String

The local name of the attribute to look for.

Returns:boolean

true if an attribute with the given local name and namespace URI is specified or has a default value on this element, false otherwise.

hasAttributesback to summary
public boolean hasAttributes()

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultNode.hasAttributes.

Implements org.w3c.dom.Node.hasAttributes.

Doc from org.w3c.dom.Node.hasAttributes.

Returns whether this node (if it is an element) has any attributes.

Returns:boolean

Returns true if this node has any attributes, false otherwise.

hasChildNodesback to summary
public boolean hasChildNodes()

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultNode.hasChildNodes.

Implements org.w3c.dom.Node.hasChildNodes.

Doc from org.w3c.dom.Node.hasChildNodes.

Returns whether this node has any children.

Returns:boolean

Returns true if this node has any children, false otherwise.

nsEqualsback to summary
private static boolean nsEquals(String nsURI_1, String nsURI_2)

Compares two namespace URIs with an extra case for null entries

setAttributeback to summary
public void setAttribute(String name, String value)

Overrides com.sun.org.apache.xerces.internal.impl.xs.opti.DefaultElement.setAttribute.

Implements org.w3c.dom.Element.setAttribute.

Doc from org.w3c.dom.Element.setAttribute.

Adds a new attribute. If an attribute with that name is already present in the element, its value is changed to be that of the value parameter. This value is a simple string; it is not parsed as it is being set. So any markup (such as syntax to be recognized as an entity reference) is treated as literal text, and needs to be appropriately escaped by the implementation when it is written out. In order to assign an attribute value that contains entity references, the user must create an Attr node plus any Text and EntityReference nodes, build the appropriate subtree, and use setAttributeNode to assign it as the value of an attribute.
To set an attribute with a qualified name and namespace URI, use the setAttributeNS method.

Parameters
name:String

The name of the attribute to create or alter.

value:String

Value to set in string form.