Class 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:
    Serialized Form
    • Constructor Detail

      • 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 Detail

      • 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)