Class TypeUsage
- java.lang.Object
-
- org.gcube.informationsystem.model.knowledge.TypeUsage
-
public class TypeUsage extends Object
Static Composition/Association/Property usage data for aType-- 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
TypeUsageis built from aModelKnowledgeand attached to aTypeis not this class's concern -- seeTypeUsageBuilder.- Author:
- Luca Frosini (ISTI - CNR)
-
-
Constructor Summary
Constructors Constructor Description TypeUsage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<LinkedEntity>getAssociationUsage()Returns the Association Usage entries (e.g.List<LinkedEntity>getCompositionUsage()Returns the Composition Usage entries (e.g.List<Map.Entry<String,PropertyDefinition>>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.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.
-
-
-
Method Detail
-
getCompositionUsage
public List<LinkedEntity> 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
public void setCompositionUsage(List<LinkedEntity> compositionUsage)
Sets the Composition Usage entries.- Parameters:
compositionUsage- The composition usage entries.
-
getAssociationUsage
public List<LinkedEntity> 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
public void setAssociationUsage(List<LinkedEntity> associationUsage)
Sets the Association Usage entries.- Parameters:
associationUsage- The association usage entries.
-
getPropertyUsage
public List<Map.Entry<String,PropertyDefinition>> 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
public void setPropertyUsage(List<Map.Entry<String,PropertyDefinition>> propertyUsage)
Sets the Known Usage entries for a Property-family type.- Parameters:
propertyUsage- The property usage entries.
-
-