Interface Namespaceable

  • All Known Implementing Classes:
    Attribute, Element

    public interface Namespaceable
    Represents a class that supports namespace. It is usually implemented by a class that also implements Item or Group. Currently, only Element and Attribute implement it.
    Author:
    tomyeh
    See Also:
    Item, Group, Attributable, Binable
    • Method Detail

      • getNamespace

        Namespace getNamespace()
        Gets the namespace.
        Returns:
        the namespace; never null
      • setNamespace

        void setNamespace​(Namespace ns)
        Sets the namespace. A null namespace will be converted to Namespace.NO_NAMESPACE.
      • getTagName

        java.lang.String getTagName()
        Gets the tag name of this item. The tag name is also called the fully qualified name -- the name with the namespace prefix, e.g., prefix:name.

        To get the local name (the name without prefix), Namespaceable.getLocalName could be used.

      • setTagName

        void setTagName​(java.lang.String tname)
        Sets the tag name of this item.
      • getLocalName

        java.lang.String getLocalName()
        Gets the local name of this item. The local name is the name without prefix.

        To get the tag name (the name with prefix), Namespaceable.getTagName could be used.

      • setLocalName

        void setLocalName​(java.lang.String lname)
        Sets the local name of this item.