Class ParsedCapsule

java.lang.Object
com.seeq.link.sdk.utilities.ParsedCapsule

public class ParsedCapsule extends Object
A Capsule with parsed property values. This is necessary to deduplicate and serialize Capsules. Most methods in this class were ported from datasource-proxy and seriesdata.
  • Constructor Details

  • Method Details

    • parse

      public static ParsedCapsule parse(Capsule capsule, UnitParser unitParser)
    • enforceCapsulePropertyMetadata

      public ParsedCapsule enforceCapsulePropertyMetadata(ParsedCapsule.CapsulePropertyMetadata metadata)
      This is similar to Capsule.enforceCapsulePropertyMetadata, except we always remove properties with different units from the Condition metadata. This was decided because "it is a tenet of our system that we should not combine metadata and data, therefore, if units change, it requires a reindex". Enforce the given on this capsule: - Filter out any capsule properties that aren't given in the metadata - Filter out any capsule properties that have ParsedCapsule.ParsedPropertyValue.INVALID values - Remove capsule properties having different units from the ones given in the metadata The above rules are enforced case-insensitively with respect to property names.