Class JsonSchemaWrapper

java.lang.Object
org.apache.unomi.api.Item
org.apache.unomi.schema.api.JsonSchemaWrapper
All Implemented Interfaces:
Serializable, TimestampedItem

public class JsonSchemaWrapper extends Item implements TimestampedItem
Object which represents a JSON schema, it's a wrapper because it contains some additional info used by the Service layer of Unomi like the id and the target. The JSON schema is store as String to avoid transformation during JSON schema resolution in the Unomi SchemaService. Also, it's extending MetadataItem so that it can be persisted like that in Unomi storage system.
See Also:
  • Field Details

  • Constructor Details

    • JsonSchemaWrapper

      public JsonSchemaWrapper()
      Instantiates a new JSON schema
    • JsonSchemaWrapper

      public JsonSchemaWrapper(String id, String schema, String target, String name, String extendsSchemaId, Date timeStamp)
      Instantiates a new JSON schema
      Parameters:
      id - id of the schema
      schema - as string
      target - of the schema (optional)
      extendsSchemaId - is the URI of another Schema to be extended by current one. (optional)
      timeStamp - of the schema
  • Method Details

    • getSchema

      public String getSchema()
    • setSchema

      public void setSchema(String schema)
    • getTarget

      public String getTarget()
    • setTarget

      public void setTarget(String target)
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getExtendsSchemaId

      public String getExtendsSchemaId()
    • setExtendsSchemaId

      public void setExtendsSchemaId(String extendsSchemaId)
    • getTimeStamp

      public Date getTimeStamp()
      Description copied from interface: TimestampedItem
      Retrieves the associated timestamp.
      Specified by:
      getTimeStamp in interface TimestampedItem
      Returns:
      the associated timestamp