Interface KlvHandler

All Known Implementing Classes:
BaseKlvHandler, GeoBoxHandler, LatitudeLongitudeHandler, LoggingKlvHandler

public interface KlvHandler
The KlvHandler receives STANAG 4609 data with the accept(KlvDataElement) method and generates an optional Attribute with the asAttribute() method.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(org.codice.ddf.libs.klv.KlvDataElement klvDataElement)
    The handler accepts the incoming KLV metadata.
    Optional<ddf.catalog.data.Attribute>
    After accept(KlvDataElement) has been called with all of the incoming data, this method will convert it to an Attribute.
    Get the name of the metacard attribute that is associated with this handler.
    void
    Reset the handler to its initial state.
  • Method Details

    • getAttributeName

      String getAttributeName()
      Get the name of the metacard attribute that is associated with this handler.
      Returns:
      name of metacard attribute
    • asAttribute

      Optional<ddf.catalog.data.Attribute> asAttribute()
      After accept(KlvDataElement) has been called with all of the incoming data, this method will convert it to an Attribute. If there is insufficient data to create an Attribute, then the Optional will be empty.
      Returns:
      optional attribute
    • accept

      void accept(org.codice.ddf.libs.klv.KlvDataElement klvDataElement)
      The handler accepts the incoming KLV metadata. If the incoming KLV metadata is not the datatype expected by this handler, then the handler should log a warning and return.
      Parameters:
      klvDataElement - incoming klv metadata
    • reset

      void reset()
      Reset the handler to its initial state.