Class HistoryFlavor
- java.lang.Object
-
- com.inductiveautomation.ignition.gateway.history.HistoryFlavor
-
- Direct Known Subclasses:
BasicHistoricalRecord.HistoricalRecordFlavor
,TagHistoryFlavor
public class HistoryFlavor extends java.lang.Object
The HistoryFlavor is used to distinguish different types of historical data. Different data sinks will specialize in handling different flavors.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
HistoryFlavor.Base64XmlReader
-
Field Summary
Fields Modifier and Type Field Description static HistoryFlavor
SQLTAG
-
Constructor Summary
Constructors Constructor Description HistoryFlavor(java.lang.String uid)
HistoryFlavor(java.lang.String uid, java.lang.String subId, java.lang.String descKey)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
boolean
equals(java.lang.Object obj, boolean includeSubtype)
LocalizedString
getDescription()
SimpleXMLReader<HistoricalData>
getXmlImportHandler(GatewayContext context)
Gets the XML reader that can decode the output from writeToXml.boolean
isCompatible(HistoryFlavor flavor)
Kind of like equals, tells whether the incoming flavor is compatible with this one.java.lang.String
subTypeId()
This id is used as a finer grained identifying under the root flavor id.java.lang.String
toString()
java.lang.String
typeId()
This is the broad type id.void
writeToXml(SimpleXMLWriter writer, HistoricalData data)
-
-
-
Field Detail
-
SQLTAG
public static final HistoryFlavor SQLTAG
-
-
Method Detail
-
typeId
public java.lang.String typeId()
This is the broad type id. Different datasinks will look at this to decide if they support the data.
-
subTypeId
public java.lang.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 java.lang.Exception
- Throws:
java.lang.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(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj, boolean includeSubtype)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-