Interface ValueSchema

  • All Superinterfaces:
    org.gcube.informationsystem.base.reference.Element, GCubeProperty, org.gcube.informationsystem.model.reference.ModelElement, org.gcube.informationsystem.model.reference.properties.Property, org.gcube.informationsystem.base.reference.properties.PropertyElement, org.gcube.informationsystem.base.reference.SchemaMixedElement, Serializable, TypedProperty<URI,​String>, ValidatedTypedProperty<URI,​String>
    All Known Implementing Classes:
    ValueSchemaImpl

    @TypeMetadata(name="ValueSchema",
                  description="This type aims at exposing a value which can be automatically managed by any client with no knowledge of its format.",
                  version="1.0.0")
    @Change(version="1.0.0",
            description="First Version")
    public interface ValueSchema
    extends GCubeProperty, ValidatedTypedProperty<URI,​String>
    This type aims at exposing a value which can be automatically managed by any client with no knowledge of its format. The client can retrieve the schema at the provided URI, i.e., schema property, and use its content to understand/validate/manipulate the information contained in the value property. The client must have the capability to understand the semantics of content retrieved at the URI endpoint. Examples of application of such type are eXtensible Markup Language (XML) values which can be validated by a Document Type Definition (DTD) or XML Schema Definition (XSD).
    Author:
    Luca Frosini (ISTI - CNR)
    • Field Summary

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

        DATETIME_PATTERN, TYPE_PROPERTY
      • Fields inherited from interface org.gcube.informationsystem.model.reference.ModelElement

        EXPECTED_TYPE_PROPERTY, SUPERTYPES_PROPERTY
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      static ValueSchema getDefaultInstance()
      Returns a default instance of ValueSchema
      URI getSchema()
      An URI containing a schema used to validate/interpret the content of the value.
      String getValue()
      The value which schema is available at the URI provided in the schema property.
      void setSchema​(URI schema)
      Sets an URI containing a schema used to validate/interpret the content of the value.
      void setValue​(String value)
      Sets the value which schema is available at the URI provided in the schema property.
      default Validation validate()
      Applies this validation to the property.
      • Methods inherited from interface org.gcube.informationsystem.base.reference.Element

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

        getExpectedtype, getSupertypes
      • Methods inherited from interface org.gcube.informationsystem.model.reference.properties.Property

        getAdditionalProperties, getAdditionalProperty, setAdditionalProperties, setAdditionalProperty
    • Method Detail

      • getDefaultInstance

        static ValueSchema getDefaultInstance()
        Returns a default instance of ValueSchema
        Returns:
        a default instance of ValueSchema
      • getValue

        @ISProperty(description="The value which schema is available at the URI provided in the schema property.",
                    mandatory=true,
                    nullable=false)
        String getValue()
        The value which schema is available at the URI provided in the schema property.
        Specified by:
        getValue in interface TypedProperty<URI,​String>
        Returns:
        the value which schema is available at the URI provided in the schema property.
      • setValue

        void setValue​(String value)
        Sets the value which schema is available at the URI provided in the schema property.
        Specified by:
        setValue in interface TypedProperty<URI,​String>
        Parameters:
        value - the value to set
      • getSchema

        @ISProperty(description="An URI containing a schema used to validate/interpret the content of the value. It is only an informative field. The validation is in charge of the client.")
        URI getSchema()
        An URI containing a schema used to validate/interpret the content of the value. It is only an informative field. The validation is in charge of the client.
        Specified by:
        getSchema in interface TypedProperty<URI,​String>
        Returns:
        an URI containing a schema used to validate/interpret the content of the value. It is only an informative field. The validation is in charge of the client.
      • setSchema

        void setSchema​(URI schema)
        Sets an URI containing a schema used to validate/interpret the content of the value. It is only an informative field. The validation is charge of the client.
        Specified by:
        setSchema in interface TypedProperty<URI,​String>
        Parameters:
        schema - an URI containing a schema used to validate/interpret the content of the value. It is only an informative field. The validation is charge of the client.