Package org.codice.alliance.libs.klv
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 TypeMethodDescriptionvoidaccept(org.codice.ddf.libs.klv.KlvDataElement klvDataElement) The handler accepts the incoming KLV metadata.Optional<ddf.catalog.data.Attribute> Afteraccept(KlvDataElement)has been called with all of the incoming data, this method will convert it to anAttribute.Get the name of the metacard attribute that is associated with this handler.voidreset()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()Afteraccept(KlvDataElement)has been called with all of the incoming data, this method will convert it to anAttribute. 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.
-