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
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()
Retrieves the associated timestamp.void
setExtendsSchemaId
(String extendsSchemaId) void
void
void
Methods inherited from class org.apache.unomi.api.Item
equals, getItemId, getItemType, getItemType, getScope, getSystemMetadata, getVersion, hashCode, setItemId, setItemType, setScope, setSystemMetadata, setVersion
-
Field Details
-
ITEM_TYPE
- See Also:
-
-
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 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 Details
-
getSchema
-
setSchema
-
getTarget
-
setTarget
-
getName
-
setName
-
getExtendsSchemaId
-
setExtendsSchemaId
-
getTimeStamp
Description copied from interface:TimestampedItem
Retrieves the associated timestamp.- Specified by:
getTimeStamp
in interfaceTimestampedItem
- Returns:
- the associated timestamp
-