java.lang.Object
io.github.tonywasher.joceanus.prometheus.data.PrometheusDataValues

public class PrometheusDataValues extends Object
Arguments class for DataItem.
Author:
Tony Washer
  • Field Details

    • ATTR_TYPE

      protected static final String ATTR_TYPE
      List type attribute.
    • ATTR_SIZE

      protected static final String ATTR_SIZE
      List size attribute.
    • ATTR_VERS

      protected static final String ATTR_VERS
      Data Version attribute.
  • Constructor Details

    • PrometheusDataValues

      protected PrometheusDataValues(PrometheusDataItem pItem, String pItemName)
      Constructor.
      Parameters:
      pItem - the Item to obtain values from
      pItemName - the item name
    • PrometheusDataValues

      public PrometheusDataValues(Element pElement, MetisFieldItem.MetisFieldSetDef pFields)
      Constructor.
      Parameters:
      pElement - the Item to obtain values from
      pFields - the field definitions
    • PrometheusDataValues

      protected PrometheusDataValues(Element pElement, MetisFieldItem.MetisFieldSetDef pFields, String pItemName)
      Constructor.
      Parameters:
      pElement - the Item to obtain values from
      pFields - the field definitions
      pItemName - the item name
    • PrometheusDataValues

      public PrometheusDataValues(String pName)
      Constructor.
      Parameters:
      pName - the Item type
    • PrometheusDataValues

      public PrometheusDataValues(PrometheusDataItem pItem)
      Constructor.
      Parameters:
      pItem - the Item to obtain values from
  • Method Details

    • getItemType

      public final String getItemType()
      Obtain Item Type.
      Returns:
      the Item Type
    • fieldIterator

      public final Iterator<Map.Entry<MetisDataItem.MetisDataFieldId,Object>> fieldIterator()
      Obtain Field iterator.
      Returns:
      the Field iterator
    • hasInfoItems

      public final boolean hasInfoItems()
      Does this item have InfoItems?
      Returns:
      true/false
    • infoIterator

      public final Iterator<PrometheusDataValues.PrometheusInfoItem> infoIterator()
      Obtain InfoItems iterator.
      Returns:
      the iterator
    • hasChildren

      public final boolean hasChildren()
      Does this item have children?
      Returns:
      true/false
    • childIterator

      public final Iterator<PrometheusDataValues> childIterator()
      Obtain Child iterator.
      Returns:
      the iterator
    • addValue

      public void addValue(MetisDataItem.MetisDataFieldId pField, Object pValue)
      Add value.
      Parameters:
      pField - the Field definition
      pValue - the field value
    • getValue

      public Object getValue(MetisDataItem.MetisDataFieldId pField)
      Obtain value.
      Parameters:
      pField - the Field definition
      Returns:
      the field value
    • getValue

      public <T> T getValue(MetisDataItem.MetisDataFieldId pField, Class<T> pClass)
      Obtain value of specified class.
      Type Parameters:
      T - the item type
      Parameters:
      pField - the Field definition
      pClass - the class
      Returns:
      the field value
    • createXML

      protected Element createXML(Document pDocument, OceanusDataFormatter pFormatter, boolean pStoreIds)
      Create XML element for item.
      Parameters:
      pDocument - the document to hold the item.
      pFormatter - the data formatter
      pStoreIds - do we include IDs in XML
      Returns:
      the new element