java.lang.Object
com.inductiveautomation.ignition.gateway.history.HistoryFlavor
Direct Known Subclasses:
AnnotationHistoricalData.AnnotationHistoryFlavor, BasicHistoricalRecord.HistoricalRecordFlavor, TagHistoryFlavor

public class HistoryFlavor extends Object
The HistoryFlavor is used to distinguish different types of historical data. Different data sinks will specialize in handling different flavors.
  • Field Details

  • Constructor Details

    • HistoryFlavor

      public HistoryFlavor(String uid)
    • HistoryFlavor

      public HistoryFlavor(String uid, String subId, String descKey)
  • Method Details

    • typeId

      public String typeId()
      This is the broad type id. Different datasinks will look at this to decide if they support the data.
    • subTypeId

      public String subTypeId()
      This id is used as a finer grained identifying under the root flavor id. This will be used to find the correct codec for this type of data. For example, DatasourceData is a generic flavor for things that store to a connection. However, that is not enough information to support import/export, so implementors can register codecs for subtypes, and use those flavors, while still being "DatasourceData".
    • getDescription

      public LocalizedString getDescription()
    • isCompatible

      public boolean isCompatible(HistoryFlavor flavor)
      Kind of like equals, tells whether the incoming flavor is compatible with this one. Necessary because some subclass flavors can encompass other flavors. Base implementation just uses equals.
    • writeToXml

      public void writeToXml(SimpleXMLWriter writer, HistoricalData data) throws Exception
      Throws:
      Exception
    • getXmlImportHandler

      public SimpleXMLReader<HistoricalData> getXmlImportHandler(GatewayContext context)
      Gets the XML reader that can decode the output from writeToXml. The default implementation reads from base64. It is provided with the gateway context in case any special deserialization needs to occur.
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(Object obj, boolean includeSubtype)
    • toString

      public String toString()
      Overrides:
      toString in class Object