com.highdeal.hci
Class XMLAttributesImpl

java.lang.Object
  extended by com.highdeal.hci.XMLAttributesImpl
All Implemented Interfaces:
XMLAttributes

public class XMLAttributesImpl
extends java.lang.Object
implements XMLAttributes

Implementation of HCI XML attributes from a SAX 2 parser.


Constructor Summary
XMLAttributesImpl(org.xml.sax.Attributes attributes, ReferenceResolver r)
           
XMLAttributesImpl(java.util.Hashtable<java.lang.String,java.lang.String> map)
           
 
Method Summary
 XMLAttributes freeze()
          Returns a frozen copy of the XML attributes.
 java.lang.String[] getAttributesNames()
          Returns all the attributes names.
 java.math.BigInteger getBigIntegerValue(java.lang.String attName)
          Gets the value of an XML attribute of big integer type.
 boolean getBooleanValue(java.lang.String attName)
          Gets the value of an XML attribute of boolean type.
 java.util.Date getDateValue(java.lang.String attName)
          Gets the value of an XML attribute of date type; Dates are encoded using ISO 8601 date and time formats.
 java.math.BigDecimal getDecimalValue(java.lang.String attName)
          Gets the value of an XML attribute of decimal type.
 java.lang.Integer getIntegerValue(java.lang.String attName)
          Gets the value of an XML attribute of integer type.
 java.lang.Long getLongValue(java.lang.String attName)
          Gets the value of an XML attribute of long type.
 boolean getStrictBooleanValue(java.lang.String attName)
          Gets the value of an XML attribute of boolean type.
 java.lang.String getValue(java.lang.String attName)
          Gets the value of an XML attribute.
 java.lang.String registerHandler(java.lang.String attName, ReferenceHandler handler)
          Registers an ID reference on an attribute and returns the value of the attribute.
 void reset(org.xml.sax.Attributes attributes, ReferenceResolver r)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLAttributesImpl

public XMLAttributesImpl(org.xml.sax.Attributes attributes,
                         ReferenceResolver r)

XMLAttributesImpl

public XMLAttributesImpl(java.util.Hashtable<java.lang.String,java.lang.String> map)
Method Detail

getValue

public java.lang.String getValue(java.lang.String attName)
Description copied from interface: XMLAttributes
Gets the value of an XML attribute.

Specified by:
getValue in interface XMLAttributes
Parameters:
attName - The attribute to get the value for
Returns:
The value of the attribute as a string

getDecimalValue

public java.math.BigDecimal getDecimalValue(java.lang.String attName)
Description copied from interface: XMLAttributes
Gets the value of an XML attribute of decimal type.

Specified by:
getDecimalValue in interface XMLAttributes
Parameters:
attName - The name of the attribute
Returns:
The value of the attribute as a decimal

getDateValue

public java.util.Date getDateValue(java.lang.String attName)
Description copied from interface: XMLAttributes
Gets the value of an XML attribute of date type; Dates are encoded using ISO 8601 date and time formats.

Specified by:
getDateValue in interface XMLAttributes
Parameters:
attName - The name of the attribute
Returns:
The value of the attribute as a date

getBooleanValue

public boolean getBooleanValue(java.lang.String attName)
Description copied from interface: XMLAttributes
Gets the value of an XML attribute of boolean type.

Specified by:
getBooleanValue in interface XMLAttributes
Parameters:
attName - The name of the attribute
Returns:
true if the value of attName is "true", false otherwise

getStrictBooleanValue

public boolean getStrictBooleanValue(java.lang.String attName)
Description copied from interface: XMLAttributes
Gets the value of an XML attribute of boolean type.

Specified by:
getStrictBooleanValue in interface XMLAttributes
Parameters:
attName - The name of the attribute
Returns:
true if the value of attName is "true", false otherwise

getIntegerValue

public java.lang.Integer getIntegerValue(java.lang.String attName)
Description copied from interface: XMLAttributes
Gets the value of an XML attribute of integer type.

Specified by:
getIntegerValue in interface XMLAttributes
Parameters:
attName - The name of the attribute
Returns:
The value of the attribute as an integer

getLongValue

public java.lang.Long getLongValue(java.lang.String attName)
Description copied from interface: XMLAttributes
Gets the value of an XML attribute of long type.

Specified by:
getLongValue in interface XMLAttributes
Parameters:
attName - The name of the attribute
Returns:
The value of the attribute as a long

getBigIntegerValue

public java.math.BigInteger getBigIntegerValue(java.lang.String attName)
Description copied from interface: XMLAttributes
Gets the value of an XML attribute of big integer type.

Specified by:
getBigIntegerValue in interface XMLAttributes
Parameters:
attName - The name of the attribute
Returns:
The value of the attribute as a big integer

getAttributesNames

public java.lang.String[] getAttributesNames()
Description copied from interface: XMLAttributes
Returns all the attributes names.

Specified by:
getAttributesNames in interface XMLAttributes
Returns:
The attributes names

registerHandler

public java.lang.String registerHandler(java.lang.String attName,
                                        ReferenceHandler handler)
Description copied from interface: XMLAttributes
Registers an ID reference on an attribute and returns the value of the attribute.

Specified by:
registerHandler in interface XMLAttributes
Parameters:
attName - The name of the reference
handler - The handler for references
Returns:
The value of the attribute

freeze

public XMLAttributes freeze()
Description copied from interface: XMLAttributes
Returns a frozen copy of the XML attributes.

Specified by:
freeze in interface XMLAttributes
Returns:
The frozen copy of the XML attributes

reset

public void reset(org.xml.sax.Attributes attributes,
                  ReferenceResolver r)

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)