IT. Expert System.

Android Reference

AttrImpl


org.apache.harmony.xml.dom

Class AttrImpl

  • All Implemented Interfaces:
    Attr, Node


    public final class AttrImpl
    extends NodeImpl
    implements Attr
    Provides a straightforward implementation of the corresponding W3C DOM interface. The class is used internally only, thus only notable members that are not in the original interface are documented (the W3C docs are quite extensive). Hope that's ok.

    Some of the fields may have package visibility, so other classes belonging to the DOM implementation can easily access them while maintaining the DOM tree structure.

    • Method Detail

      • getLocalName

        public String getLocalName()
        Description copied from interface: Node
        Returns the local part of the qualified name of this node.
        For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as Document.createElement(), this is always null.
        Specified by:
        getLocalName in interface Node
        Overrides:
        getLocalName in class NodeImpl
      • getName

        public String getName()
        Description copied from interface: Attr
        Returns the name of this attribute. If Node.localName is different from null, this attribute is a qualified name.
        Specified by:
        getName in interface Attr
      • getNamespaceURI

        public String getNamespaceURI()
        Description copied from interface: Node
        The namespace URI of this node, or null if it is unspecified (see ).
        This is not a computed value that is the result of a namespace lookup based on an examination of the namespace declarations in scope. It is merely the namespace URI given at creation time.
        For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as Document.createElement(), this is always null.

        Note: Per the Namespaces in XML Specification [XML Namespaces] an attribute does not inherit its namespace from the element it is attached to. If an attribute is not explicitly given a namespace, it simply has no namespace.

        Specified by:
        getNamespaceURI in interface Node
        Overrides:
        getNamespaceURI in class NodeImpl
      • getNodeName

        public String getNodeName()
        Description copied from interface: Node
        The name of this node, depending on its type; see the table above.
        Specified by:
        getNodeName in interface Node
        Overrides:
        getNodeName in class NodeImpl
      • getNodeType

        public short getNodeType()
        Description copied from interface: Node
        A code representing the type of the underlying object, as defined above.
        Specified by:
        getNodeType in interface Node
        Specified by:
        getNodeType in class NodeImpl
      • getNodeValue

        public String getNodeValue()
        Description copied from interface: Node
        The value of this node, depending on its type; see the table above. When it is defined to be null, setting it has no effect, including if the node is read-only.
        Specified by:
        getNodeValue in interface Node
        Overrides:
        getNodeValue in class NodeImpl
      • getOwnerElement

        public Element getOwnerElement()
        Description copied from interface: Attr
        The Element node this attribute is attached to or null if this attribute is not in use.
        Specified by:
        getOwnerElement in interface Attr
      • getPrefix

        public String getPrefix()
        Description copied from interface: Node
        The namespace prefix of this node, or null if it is unspecified. When it is defined to be null, setting it has no effect, including if the node is read-only.
        Note that setting this attribute, when permitted, changes the nodeName attribute, which holds the qualified name, as well as the tagName and name attributes of the Element and Attr interfaces, when applicable.
        Setting the prefix to null makes it unspecified, setting it to an empty string is implementation dependent.
        Note also that changing the prefix of an attribute that is known to have a default value, does not make a new attribute with the default value and the original prefix appear, since the namespaceURI and localName do not change.
        For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.
        Specified by:
        getPrefix in interface Node
        Overrides:
        getPrefix in class NodeImpl
      • getSpecified

        public boolean getSpecified()
        Description copied from interface: Attr
        True if this attribute was explicitly given a value in the instance document, false otherwise. If the application changed the value of this attribute node (even if it ends up having the same value as the default value) then it is set to true. The implementation may handle attributes with default values from other schemas similarly but applications should use Document.normalizeDocument() to guarantee this information is up-to-date.
        Specified by:
        getSpecified in interface Attr
      • getValue

        public String getValue()
        Description copied from interface: Attr
        On retrieval, the value of the attribute is returned as a string. Character and general entity references are replaced with their values. See also the method getAttribute on the Element interface.
        On setting, this creates a Text node with the unparsed contents of the string, i.e. any characters that an XML processor would recognize as markup are instead treated as literal text. See also the method Element.setAttribute().
        Some specialized implementations, such as some [SVG 1.1] implementations, may do normalization automatically, even after mutation; in such case, the value on retrieval may differ from the value on setting.
        Specified by:
        getValue in interface Attr
      • setPrefix

        public void setPrefix(String prefix)
        Description copied from interface: Node
        The namespace prefix of this node, or null if it is unspecified. When it is defined to be null, setting it has no effect, including if the node is read-only.
        Note that setting this attribute, when permitted, changes the nodeName attribute, which holds the qualified name, as well as the tagName and name attributes of the Element and Attr interfaces, when applicable.
        Setting the prefix to null makes it unspecified, setting it to an empty string is implementation dependent.
        Note also that changing the prefix of an attribute that is known to have a default value, does not make a new attribute with the default value and the original prefix appear, since the namespaceURI and localName do not change.
        For nodes of any type other than ELEMENT_NODE and ATTRIBUTE_NODE and nodes created with a DOM Level 1 method, such as createElement from the Document interface, this is always null.
        Specified by:
        setPrefix in interface Node
        Overrides:
        setPrefix in class NodeImpl
      • setValue

        public void setValue(String value)
                      throws DOMException
        Description copied from interface: Attr
        On retrieval, the value of the attribute is returned as a string. Character and general entity references are replaced with their values. See also the method getAttribute on the Element interface.
        On setting, this creates a Text node with the unparsed contents of the string, i.e. any characters that an XML processor would recognize as markup are instead treated as literal text. See also the method Element.setAttribute().
        Some specialized implementations, such as some [SVG 1.1] implementations, may do normalization automatically, even after mutation; in such case, the value on retrieval may differ from the value on setting.
        Specified by:
        setValue in interface Attr
        Throws:
        DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
      • getSchemaTypeInfo

        public TypeInfo getSchemaTypeInfo()
        Description copied from interface: Attr
        The type information associated with this attribute. While the type information contained in this attribute is guarantee to be correct after loading the document or invoking Document.normalizeDocument(), schemaTypeInfo may not be reliable if the node was moved.
        Specified by:
        getSchemaTypeInfo in interface Attr
      • isId

        public boolean isId()
        Description copied from interface: Attr
        Returns whether this attribute is known to be of type ID (i.e. to contain an identifier for its owner element) or not. When it is and its value is unique, the ownerElement of this attribute can be retrieved using the method Document.getElementById . The implementation could use several ways to determine if an attribute node is known to contain an identifier:
        • If validation occurred using an XML Schema [XML Schema Part 1] while loading the document or while invoking Document.normalizeDocument(), the post-schema-validation infoset contributions (PSVI contributions) values are used to determine if this attribute is a schema-determined ID attribute using the schema-determined ID definition in [XPointer] .
        • If validation occurred using a DTD while loading the document or while invoking Document.normalizeDocument(), the infoset [type definition] value is used to determine if this attribute is a DTD-determined ID attribute using the DTD-determined ID definition in [XPointer] .
        • from the use of the methods Element.setIdAttribute(), Element.setIdAttributeNS(), or Element.setIdAttributeNode(), i.e. it is an user-determined ID attribute;

          Note: XPointer framework (see section 3.2 in [XPointer] ) consider the DOM user-determined ID attribute as being part of the XPointer externally-determined ID definition.

        • using mechanisms that are outside the scope of this specification, it is then an externally-determined ID attribute. This includes using schema languages different from XML schema and DTD.

        If validation occurred while invoking Document.normalizeDocument(), all user-determined ID attributes are reset and all attribute nodes ID information are then reevaluated in accordance to the schema used. As a consequence, if the Attr.schemaTypeInfo attribute contains an ID type, isId will always return true.
        Specified by:
        isId in interface Attr


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 3614 / . Delta: 0.05281 с