Interface IEpcClassRetriever

All Known Implementing Classes:
DefaultEpcClassRetriever

public interface IEpcClassRetriever
Implementations of this interface will be called to find relevant EPCClasses based on concrete EPCs. Typically this is done via some kind of pattern matching, but could be implemented in what ever way is meaningful. It is possible to have multiple of these registered, and therefore it is important that if no EPCClass can be found the implementation should return Optional.empty().
  • Method Details

    • getEpcClass

      Optional<ElementUri> getEpcClass(String epc)
      Invoked to find the corresponding EPCClass for an EPC.
      Parameters:
      epc - the epc for which we try to find a relevant EPCClass
      Returns:
      the EPCClass or Optional.empty()
    • getEpcClass

      default Optional<ElementUri> getEpcClass(QuantityElement quantity)
      Invoked to find the corresponding EPCClass for a Quantity element.
      Parameters:
      quantity - - the quantity element for which we try to find a relevant EPCClass
      Returns:
      the EPCClass or Optional.empty()