Package com.highdeal.rangetable.hci
Class RangeTableRangeModel
java.lang.Object
com.highdeal.rangetable.hci.RangeTableRangeModel
- All Implemented Interfaces:
IXMLMarshallable,XMLMapping,XMLMarshallable
This
Java class represents a range in a range set.
It contains an upper bound and output columns.
The upper bound is a number strictly positive. When the upper bound is not set, it is considered as unbounded.
- See Also:
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:complexType name="RangeTableRangeType">
<xs:sequence>
<xs:element name="outColumn" type="RangeTableColumnType" minOccurs="1" maxOccurs="15" /> <!-- output data values in the range -->
</xs:sequence>
<xs:attribute name="upperBound" type="xs:decimal" use="optional" />
</xs:complexType>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.Class<?>getClass(String nsUri, String tag, XMLAttributes atts) Returns theJava classfor a specifiedXML tagand its attributes in a namespace.getOutColumnByName(String targetedName) Gets the output column that has the specified name.Gets all theoutput columnscontained in the range.Gets the upper bound of the range.booleanChecks if the range is unbounded.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.voidmarshalAttributes(XMLOutputter output) Gives an XML representation of the attributes of an object.voidmarshalChildren(XMLOutputter output) Gives an XML representation of the child objects of an object.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.voidSets the range as unbounded.voidsetUpperBound(BigDecimal upperBound) Sets the upper bound of the range.
-
Field Details
-
TAG_NAME
The tag name of the range of a range set- See Also:
-
RANGE_TABLE_OUTPUT_COLUMN_TAG_NAME
The tag name of the range table output column- See Also:
-
RANGE_TABLE_UPPER_BOUND_ATTRIBUTE_NAME
The attribute name of the upper bound- See Also:
-
-
Constructor Details
-
RangeTableRangeModel
public RangeTableRangeModel()Default range table range model.
-
-
Method Details
-
getUpperBound
Gets the upper bound of the range.- Returns:
- The upper bound of the range
-
setUpperBound
Sets the upper bound of the range.- Parameters:
upperBound- The upper bound of the range
-
isUnbounded
public boolean isUnbounded()Checks if the range is unbounded.- Returns:
trueif the range is unbounded,falseotherwise
-
setUnbounded
public void setUnbounded()Sets the range as unbounded. -
getOutColumns
Gets all theoutput columnscontained in the range.- Returns:
- A list that contains all the output columns of the range
-
getOutColumnByName
Gets the output column that has the specified name.- Parameters:
targetedName- name of the output column to retrieve- Returns:
- the requested output column (or
nullif it is not present)
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Specified by:
addCharacterDatain interfaceXMLMarshallable- Parameters:
cData- The character data to be added
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Specified by:
setAttributesin interfaceXMLMarshallable- Parameters:
atts- TheXML attributesof the current element
-
marshalAttributes
Description copied from interface:IXMLMarshallableGives an XML representation of the attributes of an object.- Specified by:
marshalAttributesin interfaceIXMLMarshallable- Parameters:
output- TheXML outputto marshal the object attributes into
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Specified by:
addChildin interfaceXMLMarshallable- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
marshalChildren
Description copied from interface:IXMLMarshallableGives an XML representation of the child objects of an object.- Specified by:
marshalChildrenin interfaceIXMLMarshallable- Parameters:
output- TheXML outputto marshal the child objects into
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Specified by:
marshalin interfaceIXMLMarshallable- Specified by:
marshalin interfaceXMLMarshallable- Parameters:
output- TheXML outputto marshal the object into
-
getClass
Description copied from interface:XMLMappingReturns theJava classfor a specifiedXML tagand its attributes in a namespace.- Specified by:
getClassin interfaceXMLMapping- Parameters:
nsUri- The unique resource identifier of the namespace of the XML tagtag- The local part of the XML tagatts- The attributes of the XML tag- Returns:
- A
Java classwith a default constructor
-