Class DeepEyeData

java.lang.Object
org.opensextant.annotations.DeepEyeData
Direct Known Subclasses:
Annotation, Record

public abstract class DeepEyeData extends Object
A base class for Record, Annotation and other structures. Common fields include: id, value, and attributes, which may be empty.
Author:
ubaldino
  • Field Details

    • id

      public String id
      A base class to keep all data organized
    • attrs

      public jodd.json.JsonObject attrs
    • value

      public String value
  • Constructor Details

    • DeepEyeData

      public DeepEyeData()
  • Method Details

    • addAttribute

      public void addAttribute(String k, Object v)
    • newAttributes

      public void newAttributes()
    • getAttributes

      public Map<String,Object> getAttributes()
      Converts internal JSON store to a key/value map.
    • isValue

      public boolean isValue(Map<?,?> v)
    • isValue

      public boolean isValue(Collection<?> v)
    • list

      public static List<Object> list(jodd.json.JsonArray arr)
      utility -- get list from jsonarray.
      Parameters:
      arr - JSON array
      Returns:
    • list

      public static List<String> list(jodd.json.JsonObject arr)
    • asMap

      public static Map<String,Object> asMap(jodd.json.JsonArray obj)
      Convert an array to a trivial map, [i1, i2, i3,...] ==> { i1:"1", i2:"1", ...} UNUSED.
      Parameters:
      obj - JSON array
      Returns:
      map representation of array
    • map

      public static Map<String,Object> map(jodd.json.JsonObject obj)
    • getAttributeNames

      public Collection<String> getAttributeNames()
    • getMap

      public abstract Map<String,Object> getMap()