public abstract class Attribute extends Object
Constructor and Description |
---|
Attribute(String qName,
String value)
Instantiates an attribute, with the given attribute value.
|
Attribute(String NS,
String localName,
String qName,
String value)
Instantiates an attribute, with the given attribute parameters.
|
Modifier and Type | Method and Description |
---|---|
String |
getAttrValue()
Gets this attribute's value.
|
String |
getLocalName()
Gets this attribute's local name.
|
String |
getName()
Gets this attribute's local name.
|
String |
getNS()
Gets this attribute's namespace.
|
String |
getPrefix()
Gets this attribute's namespace prefix.
|
String |
getQName()
Gets this attribute's qualified name.
|
boolean |
isEmpty()
Determines if this attribute's value is empty (or null).
|
boolean |
isNameSpaceAttr()
Determines if this attribute is a name space attribute.
|
boolean |
isSchemaAttr()
Determine if an attribute is a schema attribute.
|
boolean |
isXSINilAttr()
the URI for xsi has many variants by date e.g.
|
abstract Attribute |
newAttribute(String value)
Create a new attribute, given a new value
|
abstract Attribute |
newAttribute(String NS,
String localName,
String qName,
String value)
Create a new attribute, given all attribute parameters
|
abstract Attribute |
newAttribute(String NS,
String localName,
String qName,
String value,
boolean internSymbols)
Create a new attribute, given all attribute parameters
|
void |
normalize()
Normalizes this attribute.
|
String |
toString()
Generates this attribute's value as a string.
|
public Attribute(String qName, String value)
qName
- the attribute name.value
- the attribute value.public Attribute(String NS, String localName, String qName, String value)
NS
- the namespace of this attribute.localName
- the local name of this attribute.qName
- the qualified name of this attribute.value
- the value of this attribute.public final String getAttrValue()
public final String getLocalName()
public final String getName()
public String getNS()
public final String getPrefix()
public final String getQName()
public final boolean isEmpty()
public final boolean isNameSpaceAttr()
public final boolean isXSINilAttr()
public boolean isSchemaAttr()
public abstract Attribute newAttribute(String value)
value
- the string to use to create the new attributepublic abstract Attribute newAttribute(String NS, String localName, String qName, String value)
NS
- the namespace for this attributelocalName
- the local name for this attributeqName
- the qualified name for this attributevalue
- the string to use to create the new attributepublic abstract Attribute newAttribute(String NS, String localName, String qName, String value, boolean internSymbols)
NS
- the namespace for this attributelocalName
- the local name for this attributeqName
- the qualified name for this attributevalue
- the string to use to create the new attributeinternSymbols
- indicates whether the symbols in other parameters need to be interned.public void normalize()
public String toString()
toString
in class Object
Object.toString()
Copyright © 2010 - 2020 Adobe. All Rights Reserved