Interface SchemaFacet

  • All Superinterfaces:
    org.gcube.informationsystem.base.reference.Element, org.gcube.informationsystem.model.reference.entities.Entity, org.gcube.informationsystem.base.reference.entities.EntityElement, org.gcube.informationsystem.model.reference.ERElement, org.gcube.informationsystem.model.reference.entities.Facet, org.gcube.informationsystem.base.reference.IdentifiableElement, org.gcube.informationsystem.model.reference.ModelElement, Named, org.gcube.informationsystem.base.reference.SchemaMixedElement, Serializable
    All Known Implementing Classes:
    SchemaFacetImpl

    @TypeMetadata(name="SchemaFacet",
                  description="SchemaFacet captures information on any schema, i.e., a vocabulary used to validate a document associated with a resource. Examples of schema are JavaScript Object Notation (JSON) schema and XML schema. JSON schema \"is a vocabulary that allows you to annotate and validate JSON documents\". JSON schema is under standardisation by Internet Engineering Task Force (IETF) (see references at https://json-schema.org/specification.html). XSD defines the legal building blocks of an XML document. DTD defines the structure and the legal elements and attributes of an XML document.",
                  version="1.1.0")
    @Change(version="1.1.0",description="The `schema` property holds the content as a String instead of a ValueSchema; added `kind`, the kind of schema the content is, and `metaSchema`, the location of the schema the content conforms to.") @Change(version="1.0.0",description="First Version")
    public interface SchemaFacet
    extends org.gcube.informationsystem.model.reference.entities.Facet, Named
    SchemaFacet captures information on any schema, i.e., a vocabulary used to validate a document associated with a resource. Examples of schema are JavaScript Object Notation (JSON) schema and XML schema. JSON schema "is a vocabulary that allows you to annotate and validate JSON documents". JSON schema is under standardisation by the Internet Engineering Task Force (IETF) (see references at https://json-schema.org/specification.html). XSD defines the legal building blocks of an XML document. DTD defines the structure and the legal elements and attributes of an XML document.
    Author:
    Luca Frosini (ISTI - CNR)
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String NAME
      The name associated with this facet
      static String VERSION
      The version associated with this facet
      • Fields inherited from interface org.gcube.informationsystem.base.reference.Element

        DATETIME_PATTERN, REDACTED, TYPE_PROPERTY, UNKNOWN_USER
      • Fields inherited from interface org.gcube.informationsystem.model.reference.ERElement

        CONTEXTS_PROPERTY
      • 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
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      static SchemaFacet getDefaultInstance()
      Returns a default instance of SchemaFacet
      String getDescription()
      The Schema Description
      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.
      String getMetaSchema()
      The location of the schema the content conforms to, if there is one (e.g., the URL of an XSD).
      String getName()
      Gets the name of the facet.
      String getSchema()
      The schema content itself.
      void setDescription​(String description)
      Sets the Schema Description
      void setKind​(String kind)
      Sets the kind of schema the content is.
      void setMetaSchema​(String metaSchema)
      Sets the location of the schema the content conforms to.
      void setName​(String name)
      Sets the Schema Name
      void setSchema​(String schema)
      Sets the schema content itself.
      • 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
    • Method Detail

      • getDefaultInstance

        static SchemaFacet getDefaultInstance()
        Returns a default instance of SchemaFacet
        Returns:
        a default instance of SchemaFacet
      • getName

        @ISProperty(name="name",
                    description="The name of the schema.",
                    mandatory=true)
        String getName()
        Gets the name of the facet.
        Specified by:
        getName in interface Named
        Returns:
        the name
      • setName

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

        @ISProperty(description="A human-oriented description of the schema.",
                    mandatory=true)
        String getDescription()
        The Schema Description
        Returns:
        the description
      • setDescription

        void setDescription​(String description)
        Sets the Schema Description
        Parameters:
        description - the description
      • getSchema

        @ISProperty(description="The schema content itself (e.g., an XSD or JSON Schema document).")
        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.
        Returns:
        the schema
      • setSchema

        void setSchema​(String schema)
        Sets the schema content itself.
        Parameters:
        schema - the schema
      • getKind

        @ISProperty(description="The kind of schema the content is, e.g., `MetadataProfile`. The same in every environment: queries select the schemas of one kind through it.")
        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.
        Returns:
        the kind
      • setKind

        void setKind​(String kind)
        Sets the kind of schema the content is.
        Parameters:
        kind - the kind
      • getMetaSchema

        @ISProperty(description="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.")
        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.
        Returns:
        the location of the schema of the content
      • setMetaSchema

        void setMetaSchema​(String metaSchema)
        Sets the location of the schema the content conforms to.
        Parameters:
        metaSchema - the location of the schema of the content