Package org.apache.unomi.schema.api
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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JsonSchemaWrapper()
Instantiates a new JSON schemaJsonSchemaWrapper(String id, String schema, String target, String name, String extendsSchemaId, Date timeStamp)
Instantiates a new JSON schema
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getExtendsSchemaId()
String
getName()
String
getSchema()
String
getTarget()
Date
getTimeStamp()
Retrieves the associated timestamp.void
setExtendsSchemaId(String extendsSchemaId)
void
setName(String name)
void
setSchema(String schema)
void
setTarget(String target)
-
Methods inherited from class org.apache.unomi.api.Item
equals, getItemId, getItemType, getItemType, getScope, getSystemMetadata, getVersion, hashCode, setItemId, setItemType, setScope, setSystemMetadata, setVersion
-
-
-
-
Field Detail
-
ITEM_TYPE
public static final String ITEM_TYPE
- See Also:
- Constant Field Values
-
-
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 schemaschema
- as stringtarget
- 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)
-
getTimeStamp
public Date getTimeStamp()
Description copied from interface:TimestampedItem
Retrieves the associated timestamp.- Specified by:
getTimeStamp
in interfaceTimestampedItem
- Returns:
- the associated timestamp
-
-