Interface ResourceSchema

All Superinterfaces:
Element, EntityElement, EntitySchema, IdentifiableElement, Serializable, Type
All Known Implementing Classes:
ResourceSchemaImpl

@TypeMetadata(name="ResourceSchema", description="Defines the type of a Resource, extending EntitySchema with the ConsistsOf and IsRelatedTo constraints (as LinkedEntity lists) that specify which Facet and Resource types it can be linked to.", version="1.1.0") @Change(version="1.1.0",description="\'consistsOf\' and \'isRelatedTo\' are always present, empty when the Resource declares none. A Resource type definition has no \'properties\'.") @Change(version="1.0.0",description="First Version") public interface ResourceSchema extends EntitySchema
Defines the type of a Resource.
Author:
Luca Frosini (ISTI - CNR)
  • Field Details

  • Method Details

    • getProperties

      List<PropertyDefinition> getProperties()
      Returns the properties defined by this type.

      A List because the order carries meaning: properties are read in the order the Java class declares them, which is the intended reading order for anyone looking at the type definition. A Set would map to an unordered store and lose it.

      A Resource holds no property of its own: properties is not a member of a Resource type definition, which neither writes it nor reads it.

      Specified by:
      getProperties in interface Type
      Returns:
      always null.
    • getConsistsOf

      @ISProperty(name="consistsOf", readonly=false, mandatory=true) List<LinkedEntity> getConsistsOf()
      Returns the list of ConsistsOf constraints (target Facet types) associated with this resource type.
      Returns:
      A list of LinkedEntity objects representing the ConsistsOf constraints.
    • getIsRelatedTo

      @ISProperty(name="isRelatedTo", readonly=false, mandatory=true) List<LinkedEntity> getIsRelatedTo()
      Returns the list of IsRelatedTo constraints (related resource types) for this resource type.
      Returns:
      A list of LinkedEntity objects representing the IsRelatedTo constraints.