Class DataDictionary

java.lang.Object
com.digimarc.dms.readers.DataDictionary

public class DataDictionary extends Object
DataDictionary is a map of strings to objects that is used to return arbitrary sets of data to an application from a reader.
  • Field Details

    • Scale

      public static final String Scale
      Scale is a value produced by the Digimarc Barcode detector that provides a general indication of how far away the image was from the camera. The actual meaning of the value is whether the decoded pattern was smaller or larger than expected. A scale of 1.0 means that they matched, while values < 1.0 indicate larger than expected (i.e. closer) and values > 1.0 indicate smaller (i.e. farther away.

      Type: Double

      See Also:
    • Rotation

      public static final String Rotation

      Rotation is a value produced by the Digimarc Barcode detector that indicates the angle of the decoded pattern relative to the camera. The value is in degrees.

      Type: Double

      See Also:
    • Decode

      public static final String Decode

      Decode is a prefix that is added to a reader name to store a decoded payload in the dictionary. Since dictionaries are used to return end of processing status as well as reads results we are storing a copy of each payload decoded along with the name of the reader it came from.

      The key name will be in the form "Decode_xxx", where xxx is one of the following:

         Decoder_ImageDigimarc - Digimarc Barcode detector
         Decoder_Barcode - Traditional Barcode detector
         Decoder_AudioDigimarc - Digimarc Barcode for Audio detector

      Type: String

      See Also:
    • Decoder_ImageDigimarc

      public static final String Decoder_ImageDigimarc
      See Also:
    • Decoder_Barcode

      public static final String Decoder_Barcode
      See Also:
    • Decoder_AudioDigimarc

      public static final String Decoder_AudioDigimarc
      See Also:
    • ReadRegion

      public static final String ReadRegion
      ReadRegion contains a set of points defining a bounding box around the decoded code. Location information is supported for both Digimarc Barcode codes as well as traditional 1D and 2D barcodes.

      The region can be transformed into an Android Path object for display using the Utility.convertRegionPointsToPath(List) method.

      Type: List<Point>

      See Also:
    • DistanceFromCenterSquared

      public static final String DistanceFromCenterSquared
      Distance from the center of the image detection region to the center of the code's ReadRegion as an exponential value. This value is in an undefined unit, and should only be treated as a general guide of which detects are closest to the center of the detection region. Smaller values are closer to the center of the detection region.

      Type: Integer

      See Also:
  • Constructor Details

    • DataDictionary

      public DataDictionary()
    • DataDictionary

      public DataDictionary(@NonNull DataDictionary dict)
  • Method Details

    • getMap

      @NonNull public Map<String,Object> getMap()
      Get the full dictionary to operate on it as a usual Java Map object.
      Returns:
      The Java Map object backing up the dictionary.
    • getKeys

      @NonNull public Set<String> getKeys()
      Get the key set from the DataDictionary object.
      Returns:
      Set of Strings containing all of the available keys.
    • getValue

      @Nullable public Object getValue(@NonNull String key)
      Get the value associated with a given key.
      Parameters:
      key - Key to search for.
      Returns:
      Value associated with the key or null if the key is not present.
    • setValue

      public void setValue(@NonNull String key, @NonNull Object value)
      Stores a key value pair in the options dictionary.
      Parameters:
      key - Key
      value - Value
    • clear

      public void clear()
      Remove all entries from the dictionary.
    • copy

      @NonNull public DataDictionary copy()
      Creates a shallow copy of the dictionary.
      Returns:
      New dictionary.