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:
  • Method Details

    • 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

      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(String tname)
      Sets the tag name of this item.
    • getLocalName

      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(String lname)
      Sets the local name of this item.