Package com.highdeal.hci
Interface XMLAttributes
- All Known Implementing Classes:
XMLAttributesImpl
public interface XMLAttributes
This
Java interface allows to access to the attributes of an XML tag.-
Method Summary
Modifier and TypeMethodDescriptionfreeze()Returns a frozen copy of the XML attributes.String[]Returns all the attributes names.getBigIntegerValue(String attName) Gets the value of an XML attribute of big integer type.booleangetBooleanValue(String attName) Deprecated.getDateValue(String attName) Gets the value of an XML attribute of date type; Dates are encoded using ISO 8601 date and time formats.getDecimalValue(String attName) Gets the value of an XML attribute of decimal type.getIntegerValue(String attName) Gets the value of an XML attribute of integer type.getLongValue(String attName) Gets the value of an XML attribute of long type.booleangetStrictBooleanValue(String attName) Gets the value of an XML attribute of boolean type.Gets the value of an XML attribute.registerHandler(String attName, ReferenceHandler handler) Registers an ID reference on an attribute and returns the value of the attribute.
-
Method Details
-
getValue
Gets the value of an XML attribute.- Parameters:
attName- The attribute to get the value for- Returns:
- The value of the attribute as a string
-
getDateValue
Gets the value of an XML attribute of date type; Dates are encoded using ISO 8601 date and time formats.- Parameters:
attName- The name of the attribute- Returns:
- The value of the attribute as a date
- Throws:
XMLIllegalArgumentException- when the attribute value is not a ISO 8601 date
-
getDecimalValue
Gets the value of an XML attribute of decimal type.- Parameters:
attName- The name of the attribute- Returns:
- The value of the attribute as a decimal
- Throws:
XMLIllegalArgumentException- when the attribute value is not a decimal
-
getBooleanValue
Deprecated.Gets the value of an XML attribute of boolean type.- Parameters:
attName- The name of the attribute- Returns:
trueif the value ofattNameis "true",falseotherwise
-
getStrictBooleanValue
Gets the value of an XML attribute of boolean type.- Parameters:
attName- The name of the attribute- Returns:
trueif the value ofattNameis "true",falseotherwise- Throws:
XMLIllegalArgumentException- when the attribute value is not a boolean
-
getIntegerValue
Gets the value of an XML attribute of integer type.- Parameters:
attName- The name of the attribute- Returns:
- The value of the attribute as an integer
- Throws:
XMLIllegalArgumentException- when the attribute value is not a integer
-
getLongValue
Gets the value of an XML attribute of long type.- Parameters:
attName- The name of the attribute- Returns:
- The value of the attribute as a long
- Throws:
XMLIllegalArgumentException- when the attribute value is not a long
-
getBigIntegerValue
Gets the value of an XML attribute of big integer type.- Parameters:
attName- The name of the attribute- Returns:
- The value of the attribute as a big integer
- Throws:
XMLIllegalArgumentException- when the attribute value is not abig integer
-
getAttributesNames
String[] getAttributesNames()Returns all the attributes names.- Returns:
- The attributes names
-
registerHandler
Registers an ID reference on an attribute and returns the value of the attribute.- Parameters:
attName- The name of the referencehandler- Thehandler for references- Returns:
- The value of the attribute
-
freeze
XMLAttributes freeze()Returns a frozen copy of the XML attributes.- Returns:
- The frozen copy of the XML attributes
-