Class Attribute

java.lang.Object
ro.sync.outline.xml.Attribute

@API(type=NOT_EXTENDABLE, src=PRIVATE) public class Attribute extends Object
An attribute representation used mainly in the content completion process.
  • Constructor Details

    • Attribute

      public Attribute(String qName, String value, String namespace, String prefix)
      Creates an attribute with a specified qualified name, value, namespace and prefix.
      Parameters:
      qName - The attribute fully qualified name.
      value - The attribute value.
      namespace - The attribute namespace.
      prefix - The attribute prefix.
  • Method Details

    • getQName

      public String getQName()
      Gets the attribute fully qualified name.
      Returns:
      The attribute qualified name of the attribute.
    • getValue

      public String getValue()
      Gets for the attribute value.
      Returns:
      The value. Not null.
    • getNamespace

      public String getNamespace()
      Gets the attribute namespace.
      Returns:
      The attribute namespace.
    • getLocalName

      public String getLocalName()
      Gets the attribute local name.
      Returns:
      The attribute local name.
    • toString

      public String toString()
      Return the string representation of the attribute. It contains the attribute qualified name, the namespace and the attribute value.
      Overrides:
      toString in class Object
    • getNameEndOffset

      public int getNameEndOffset()
      Returns:
      The end offset of the name.
    • getNameStartOffset

      public int getNameStartOffset()
      Returns:
      The start offset of the name.
    • getValueEndOffset

      public int getValueEndOffset()
      Returns:
      The end offset of the value.
    • getValueStartOffset

      public int getValueStartOffset()
      Returns:
      The start offset of the value.
    • isNamespaceDeclaration

      public boolean isNamespaceDeclaration()
      Returns:
      If true the attribute is namespace declaration.
    • getPrefix

      public String getPrefix()
      Returns:
      Returns the attribute prefix.
    • setNamespace

      public void setNamespace(String namespace)
      Parameters:
      namespace - The attribute namespace to set.
    • setNameStartOffset

      public void setNameStartOffset(int nameStartOffset)
      Parameters:
      nameStartOffset - The attribute name start offset to set.
    • setNameEndOffset

      public void setNameEndOffset(int nameEndOffset)
      Parameters:
      nameEndOffset - The attribute name end offset to set.
    • setValueStartOffset

      public void setValueStartOffset(int valueStartOffset)
      Parameters:
      valueStartOffset - The value start offset to set.
    • setValueEndOffset

      public void setValueEndOffset(int valueEndOffset)
      Parameters:
      valueEndOffset - The value end offset to set.
    • isDefaultNamespaceDeclaration

      public boolean isDefaultNamespaceDeclaration()
      Returns:
      Returns the default namespace declaration.
    • hasValue

      public boolean hasValue()
      Check if the attribute has a value, or is empty attribute.
      Returns:
      true if it has a value, false for empty attributes.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
      See Also: