Class TypeUsage
java.lang.Object
org.gcube.informationsystem.model.knowledge.TypeUsage
Static Composition/Association/Property usage data for a
Type -- i.e. which other
types declare, in the schema, that they reference this one; not to be confused with
a possible future effective/dynamic usage (which types actually have live instances
referencing this one, sourced from the graph database rather than the schema -- tracked
separately, under its own property name, once designed; not part of this class).
Pure data: how a TypeUsage is built from a ModelKnowledge and attached to
a Type is not this class's concern -- see TypeUsageBuilder.
- Author:
- Luca Frosini (ISTI - CNR)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the Association Usage entries (e.g. a Resource's or an IsRelatedTo relation's usage, either side), ornullif not applicable to this type'sAccessType.Returns the Composition Usage entries (e.g. a Resource's own ConsistsOf declarations, or a Facet's/ConsistsOf relation's incoming usage), ornullif not applicable to this type'sAccessType.Returns the Known Usage entries for a Property-family type (declaring type name paired with the field's ownPropertyDefinition), ornullif not applicable to this type'sAccessType.voidsetAssociationUsage(List<LinkedEntity> associationUsage) Sets the Association Usage entries.voidsetCompositionUsage(List<LinkedEntity> compositionUsage) Sets the Composition Usage entries.voidsetPropertyUsage(List<Map.Entry<String, PropertyDefinition>> propertyUsage) Sets the Known Usage entries for a Property-family type.
-
Constructor Details
-
TypeUsage
public TypeUsage()
-
-
Method Details
-
getCompositionUsage
Returns the Composition Usage entries (e.g. a Resource's own ConsistsOf declarations, or a Facet's/ConsistsOf relation's incoming usage), ornullif not applicable to this type'sAccessType.- Returns:
- The composition usage entries, or
null.
-
setCompositionUsage
Sets the Composition Usage entries.- Parameters:
compositionUsage- The composition usage entries.
-
getAssociationUsage
Returns the Association Usage entries (e.g. a Resource's or an IsRelatedTo relation's usage, either side), ornullif not applicable to this type'sAccessType.- Returns:
- The association usage entries, or
null.
-
setAssociationUsage
Sets the Association Usage entries.- Parameters:
associationUsage- The association usage entries.
-
getPropertyUsage
Returns the Known Usage entries for a Property-family type (declaring type name paired with the field's ownPropertyDefinition), ornullif not applicable to this type'sAccessType.- Returns:
- The property usage entries, or
null.
-
setPropertyUsage
Sets the Known Usage entries for a Property-family type.- Parameters:
propertyUsage- The property usage entries.
-