java.lang.Object
org.gcube.informationsystem.base.impl.ElementImpl
org.gcube.informationsystem.base.impl.entities.EntityElementImpl
org.gcube.informationsystem.model.impl.entities.EntityImpl
org.gcube.informationsystem.model.impl.entities.FacetImpl
org.gcube.resourcemanagement.model.impl.entities.facets.SchemaFacetImpl
All Implemented Interfaces:
Serializable, org.gcube.informationsystem.base.reference.Element, org.gcube.informationsystem.base.reference.entities.EntityElement, org.gcube.informationsystem.base.reference.IdentifiableElement, org.gcube.informationsystem.base.reference.SchemaMixedElement, org.gcube.informationsystem.model.reference.entities.Entity, org.gcube.informationsystem.model.reference.entities.Facet, org.gcube.informationsystem.model.reference.ERElement, org.gcube.informationsystem.model.reference.ModelElement, SchemaFacet, Named

public class SchemaFacetImpl extends org.gcube.informationsystem.model.impl.entities.FacetImpl implements SchemaFacet
Implementation of SchemaFacet.
Author:
Luca Frosini (ISTI - CNR)
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
    The description of the schema
    protected String
    The kind of schema the content is
    protected String
    The location of the schema the content conforms to
    protected String
    The name of the schema
    protected String
    The schema itself

    Fields inherited from class org.gcube.informationsystem.model.impl.entities.FacetImpl

    additionalProperties, allowedAdditionalKeys

    Fields inherited from class org.gcube.informationsystem.model.impl.entities.EntityImpl

    contexts, expectedtype, supertypes

    Fields inherited from class org.gcube.informationsystem.base.impl.entities.EntityElementImpl

    metadata, uuid

    Fields inherited from interface org.gcube.informationsystem.base.reference.Element

    DATETIME_PATTERN, NAME, REDACTED, TYPE_PROPERTY, UNKNOWN_USER

    Fields inherited from interface org.gcube.informationsystem.model.reference.entities.Entity

    NAME

    Fields inherited from interface org.gcube.informationsystem.base.reference.entities.EntityElement

    NAME

    Fields inherited from interface org.gcube.informationsystem.model.reference.ERElement

    CONTEXTS_PROPERTY

    Fields inherited from interface org.gcube.informationsystem.model.reference.entities.Facet

    NAME

    Fields inherited from interface org.gcube.informationsystem.base.reference.IdentifiableElement

    ID_PROPERTY, METADATA_PROPERTY

    Fields inherited from interface org.gcube.informationsystem.model.reference.ModelElement

    EXPECTED_TYPE_PROPERTY, SUPERTYPES_PROPERTY

    Fields inherited from interface org.gcube.resourcemanagement.model.reference.properties.utilities.Named

    NAME_PROPERTY

    Fields inherited from interface org.gcube.resourcemanagement.model.reference.entities.facets.SchemaFacet

    NAME, VERSION
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The Schema Description
    The kind of schema the content is (e.g., MetadataProfile): the same in every environment, so that a query can select the schemas of one kind.
    The location of the schema the content conforms to, if there is one (e.g., the URL of an XSD).
    Gets the name of the facet.
    The schema content itself.
    void
    setDescription(String description)
    Sets the Schema Description
    void
    Sets the kind of schema the content is.
    void
    setMetaSchema(String metaSchema)
    Sets the location of the schema the content conforms to.
    void
    Sets the Schema Name
    void
    setSchema(String schema)
    Sets the schema content itself.

    Methods inherited from class org.gcube.informationsystem.model.impl.entities.FacetImpl

    addAllowedAdditionalKey, getAdditionalProperties, getAdditionalProperty, setAdditionalProperties, setAdditionalProperty

    Methods inherited from class org.gcube.informationsystem.model.impl.entities.EntityImpl

    getContexts, getExpectedtype, getSupertypes, setContexts

    Methods inherited from class org.gcube.informationsystem.base.impl.entities.EntityElementImpl

    getID, getMetadata, setID, setMetadata

    Methods inherited from class org.gcube.informationsystem.base.impl.ElementImpl

    getTypeName, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.gcube.informationsystem.base.reference.Element

    getTypeName

    Methods inherited from interface org.gcube.informationsystem.base.reference.entities.EntityElement

    getID, getMetadata, setID, setMetadata

    Methods inherited from interface org.gcube.informationsystem.model.reference.ERElement

    getContexts

    Methods inherited from interface org.gcube.informationsystem.model.reference.entities.Facet

    getAdditionalProperties, getAdditionalProperty, setAdditionalProperties, setAdditionalProperty

    Methods inherited from interface org.gcube.informationsystem.model.reference.ModelElement

    getExpectedtype, getSupertypes
  • Field Details

    • name

      protected String name
      The name of the schema
    • description

      protected String description
      The description of the schema
    • schema

      protected String schema
      The schema itself
    • kind

      protected String kind
      The kind of schema the content is
    • metaSchema

      protected String metaSchema
      The location of the schema the content conforms to
  • Constructor Details

    • SchemaFacetImpl

      public SchemaFacetImpl()
  • Method Details

    • getName

      public String getName()
      Gets the name of the facet.
      Specified by:
      getName in interface Named
      Specified by:
      getName in interface SchemaFacet
      Returns:
      the name
    • setName

      public void setName(String name)
      Sets the Schema Name
      Specified by:
      setName in interface Named
      Specified by:
      setName in interface SchemaFacet
      Parameters:
      name - the name
    • getDescription

      public String getDescription()
      The Schema Description
      Specified by:
      getDescription in interface SchemaFacet
      Returns:
      the description
    • setDescription

      public void setDescription(String description)
      Sets the Schema Description
      Specified by:
      setDescription in interface SchemaFacet
      Parameters:
      description - the description
    • getSchema

      public String getSchema()
      The schema content itself. Deliberately unconstrained: accepts any JSON-compatible value, since the schema language in use (e.g., an XSD document, which is naturally text, or a JSON Schema document, which is naturally a JSON object) is not known in advance. The Java API always exposes it as a String.
      Specified by:
      getSchema in interface SchemaFacet
      Returns:
      the schema
    • setSchema

      public void setSchema(String schema)
      Sets the schema content itself.
      Specified by:
      setSchema in interface SchemaFacet
      Parameters:
      schema - the schema
    • getKind

      public String getKind()
      The kind of schema the content is (e.g., MetadataProfile): the same in every environment, so that a query can select the schemas of one kind.
      Specified by:
      getKind in interface SchemaFacet
      Returns:
      the kind
    • setKind

      public void setKind(String kind)
      Sets the kind of schema the content is.
      Specified by:
      setKind in interface SchemaFacet
      Parameters:
      kind - the kind
    • getMetaSchema

      public String getMetaSchema()
      The location of the schema the content conforms to, if there is one (e.g., the URL of an XSD). Informative: it may differ from one environment to another.
      Specified by:
      getMetaSchema in interface SchemaFacet
      Returns:
      the location of the schema of the content
    • setMetaSchema

      public void setMetaSchema(String metaSchema)
      Sets the location of the schema the content conforms to.
      Specified by:
      setMetaSchema in interface SchemaFacet
      Parameters:
      metaSchema - the location of the schema of the content