Class RangeTableRangeModel

java.lang.Object
com.highdeal.rangetable.hci.RangeTableRangeModel
All Implemented Interfaces:
IXMLMarshallable, XMLMapping, XMLMarshallable

public class RangeTableRangeModel extends Object implements IXMLMarshallable, XMLMapping
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 Details

    • TAG_NAME

      public static final String TAG_NAME
      The tag name of the range of a range set
      See Also:
    • RANGE_TABLE_OUTPUT_COLUMN_TAG_NAME

      public static final String RANGE_TABLE_OUTPUT_COLUMN_TAG_NAME
      The tag name of the range table output column
      See Also:
    • RANGE_TABLE_UPPER_BOUND_ATTRIBUTE_NAME

      public static final String 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

      public BigDecimal getUpperBound()
      Gets the upper bound of the range.
      Returns:
      The upper bound of the range
    • setUpperBound

      public void setUpperBound(BigDecimal upperBound)
      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:
      true if the range is unbounded, false otherwise
    • setUnbounded

      public void setUnbounded()
      Sets the range as unbounded.
    • getOutColumns

      public List<RangeTableColumnModel> getOutColumns()
      Gets all the output columns contained in the range.
      Returns:
      A list that contains all the output columns of the range
    • getOutColumnByName

      public RangeTableColumnModel getOutColumnByName(String targetedName)
      Gets the output column that has the specified name.
      Parameters:
      targetedName - name of the output column to retrieve
      Returns:
      the requested output column (or null if it is not present)
    • addCharacterData

      public void addCharacterData(String cData)
      Description copied from interface: XMLMarshallable
      Adds character data to the content element.
      Specified by:
      addCharacterData in interface XMLMarshallable
      Parameters:
      cData - The character data to be added
    • setAttributes

      public void setAttributes(XMLAttributes atts)
      Description copied from interface: XMLMarshallable
      Sets the attributes of the XML representation of the element being processed.
      Specified by:
      setAttributes in interface XMLMarshallable
      Parameters:
      atts - The XML attributes of the current element
    • marshalAttributes

      public void marshalAttributes(XMLOutputter output)
      Description copied from interface: IXMLMarshallable
      Gives an XML representation of the attributes of an object.
      Specified by:
      marshalAttributes in interface IXMLMarshallable
      Parameters:
      output - The XML output to marshal the object attributes into
    • addChild

      public void addChild(String tagName, XMLMarshallable child)
      Description copied from interface: XMLMarshallable
      Adds a child to the object, the child representing the marshallable object which must be added to the element.
      Specified by:
      addChild in interface XMLMarshallable
      Parameters:
      tagName - The name of tag for the child
      child - The child to be added
    • marshalChildren

      public void marshalChildren(XMLOutputter output)
      Description copied from interface: IXMLMarshallable
      Gives an XML representation of the child objects of an object.
      Specified by:
      marshalChildren in interface IXMLMarshallable
      Parameters:
      output - The XML output to marshal the child objects into
    • marshal

      public void marshal(XMLOutputter output)
      Description copied from interface: XMLMarshallable
      Gives an XML representation of this object, including its children.
      Specified by:
      marshal in interface IXMLMarshallable
      Specified by:
      marshal in interface XMLMarshallable
      Parameters:
      output - The XML output to marshal the object into
    • getClass

      public Class<?> getClass(String nsUri, String tag, XMLAttributes atts)
      Description copied from interface: XMLMapping
      Returns the Java class for a specified XML tag and its attributes in a namespace.
      Specified by:
      getClass in interface XMLMapping
      Parameters:
      nsUri - The unique resource identifier of the namespace of the XML tag
      tag - The local part of the XML tag
      atts - The attributes of the XML tag
      Returns:
      A Java class with a default constructor