Class Schema

  • All Implemented Interfaces:
    java.io.Serializable, java.util.Map<java.lang.String,​java.lang.Object>, org.bson.conversions.Bson

    public class Schema
    extends VitamDocument<Schema>
    Defines a schema collection.
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Constructor Summary

      Constructors 
      Constructor Description
      Schema()
      Empty Constructor
      Schema​(com.fasterxml.jackson.databind.JsonNode content)  
      Schema​(java.lang.Integer tenantId)  
      Schema​(java.lang.String content)  
      Schema​(org.bson.Document document)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getCardinality()
      The schema cardinality
      java.lang.String getCollection()
      The schema collection of the element
      java.lang.String getCreationdate()  
      java.lang.String getDescription()
      The schema description
      boolean getIsObject()
      The schema IsObject
      java.lang.String getLastupdate()  
      java.lang.String getOrigin()
      The schema origin
      java.lang.String getPath()
      The schema path
      java.lang.String getShortName()
      The schema shortName
      VitamDocument<Schema> newInstance​(com.fasterxml.jackson.databind.JsonNode content)
      Make a new instance of the document with the given json
      Schema setCardinality​(java.lang.String cardinality)
      Set or change the schema cardinality
      Schema setCollection​(java.lang.String collection)
      Set or change the schema collection
      Schema setCreationdate​(java.lang.String creationdate)  
      Schema setDescription​(java.lang.String description)
      Set or change the schema description
      Schema setId​(java.lang.String id)  
      Schema setIsObject​(boolean isObject)
      Set or change the schema IsObject
      Schema setLastupdate​(java.lang.String lastupdate)  
      Schema setOrigin​(java.lang.String origin)
      Set or change the schema origin
      Schema setPath​(java.lang.String path)
      Set or change the schema path
      Schema setShortName​(java.lang.String shortName)
      Set or change the schema shortName
      • Methods inherited from class org.bson.Document

        append, clear, containsKey, containsValue, entrySet, equals, get, get, get, getBoolean, getBoolean, getDate, getDouble, getEmbedded, getEmbedded, getInteger, getInteger, getList, getList, getLong, getObjectId, getString, hashCode, isEmpty, keySet, parse, parse, put, putAll, remove, size, toBsonDocument, toJson, toJson, toJson, toJson, values
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.bson.conversions.Bson

        toBsonDocument
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
    • Field Detail

      • TAG_COLLECTION

        public static final java.lang.String TAG_COLLECTION
        Collections Tag
        See Also:
        Constant Field Values
      • TAG_DESCRIPTION

        public static final java.lang.String TAG_DESCRIPTION
        Description Tag
        See Also:
        Constant Field Values
      • TAG_SHORT_NAME

        public static final java.lang.String TAG_SHORT_NAME
        ShortName Tag
        See Also:
        Constant Field Values
      • TAG_IS_OBJECT_NAME

        public static final java.lang.String TAG_IS_OBJECT_NAME
        isObject Tag
        See Also:
        Constant Field Values
      • TAG_PATH_CARDINALITY

        public static final java.lang.String TAG_PATH_CARDINALITY
        pathCardinality tag
        See Also:
        Constant Field Values
      • CREATIONDATE

        public static final java.lang.String CREATIONDATE
        the creation date of the schema
        See Also:
        Constant Field Values
      • LAST_UPDATE

        public static final java.lang.String LAST_UPDATE
        the last update of schema
        See Also:
        Constant Field Values
    • Constructor Detail

      • Schema

        public Schema()
        Empty Constructor
      • Schema

        public Schema​(org.bson.Document document)
        Constructor
        Parameters:
        document - data in format Document to create Schema
      • Schema

        public Schema​(com.fasterxml.jackson.databind.JsonNode content)
        Parameters:
        content - in format JsonNode to create Schema
      • Schema

        public Schema​(java.lang.String content)
        Parameters:
        content - in format String to create Schema
      • Schema

        public Schema​(java.lang.Integer tenantId)
        Parameters:
        tenantId - the working tenant
    • Method Detail

      • newInstance

        public VitamDocument<Schema> newInstance​(com.fasterxml.jackson.databind.JsonNode content)
        Description copied from class: VitamDocument
        Make a new instance of the document with the given json
        Specified by:
        newInstance in class VitamDocument<Schema>
        Parameters:
        content - document structure as json
        Returns:
        new document with the json as content
      • setId

        public Schema setId​(java.lang.String id)
        Parameters:
        id - the id of schema
        Returns:
      • getDescription

        public java.lang.String getDescription()
        The schema description
        Returns:
        the description of the schema
      • setDescription

        public Schema setDescription​(java.lang.String description)
        Set or change the schema description
        Parameters:
        description -
        Returns:
        this
      • getCollection

        public java.lang.String getCollection()
        The schema collection of the element
        Returns:
        the collection of the schema element
      • setCollection

        public Schema setCollection​(java.lang.String collection)
        Set or change the schema collection
        Parameters:
        collection -
        Returns:
        this
      • getOrigin

        public java.lang.String getOrigin()
        The schema origin
        Returns:
        the origin of the schema
      • setOrigin

        public Schema setOrigin​(java.lang.String origin)
        Set or change the schema origin
        Parameters:
        origin -
        Returns:
        this
      • getShortName

        public java.lang.String getShortName()
        The schema shortName
        Returns:
        the shortName of the schema
      • setShortName

        public Schema setShortName​(java.lang.String shortName)
        Set or change the schema shortName
        Parameters:
        shortName -
        Returns:
        this
      • getIsObject

        public boolean getIsObject()
        The schema IsObject
        Returns:
        the IsObject of the schema
      • setIsObject

        public Schema setIsObject​(boolean isObject)
        Set or change the schema IsObject
        Parameters:
        isObject -
        Returns:
        this
      • getPath

        public java.lang.String getPath()
        The schema path
        Returns:
        the path of the schema
      • setPath

        public Schema setPath​(java.lang.String path)
        Set or change the schema path
        Parameters:
        path -
        Returns:
        this
      • getCardinality

        public java.lang.String getCardinality()
        The schema cardinality
        Returns:
        the cardinality of the schema
      • setCardinality

        public Schema setCardinality​(java.lang.String cardinality)
        Set or change the schema cardinality
        Parameters:
        cardinality -
        Returns:
        this
      • getCreationdate

        public java.lang.String getCreationdate()
        Returns:
        creation date of schema elt
      • setCreationdate

        public Schema setCreationdate​(java.lang.String creationdate)
        Parameters:
        creationdate - to set
        Returns:
        this
      • getLastupdate

        public java.lang.String getLastupdate()
        Returns:
        last update of profile
      • setLastupdate

        public Schema setLastupdate​(java.lang.String lastupdate)
        Parameters:
        lastupdate - to set
        Returns:
        this