Class ModelKnowledge<T,TI extends TypeInformation<T>>
- java.lang.Object
-
- org.gcube.informationsystem.model.knowledge.ModelKnowledge<T,TI>
-
public class ModelKnowledge<T,TI extends TypeInformation<T>> extends Object
- Author:
- Luca Frosini (ISTI - CNR)
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<AccessType,UsageKnowledge<LinkedEntity>>erTypesUsageprotected Map<String,AccessType>locateprotected UsageKnowledge<Map.Entry<String,PropertyDefinition>>propertyUsageprotected Map<AccessType,Tree<T>>treesprotected TItypeInformation
-
Constructor Summary
Constructors Constructor Description ModelKnowledge(TI typeInformation)
-
Method Summary
-
-
-
Field Detail
-
typeInformation
protected TI extends TypeInformation<T> typeInformation
-
trees
protected Map<AccessType,Tree<T>> trees
-
propertyUsage
protected UsageKnowledge<Map.Entry<String,PropertyDefinition>> propertyUsage
-
erTypesUsage
protected Map<AccessType,UsageKnowledge<LinkedEntity>> erTypesUsage
-
locate
protected Map<String,AccessType> locate
-
-
Constructor Detail
-
ModelKnowledge
public ModelKnowledge(TI typeInformation)
-
-
Method Detail
-
reset
protected void reset()
-
addUsage
protected void addUsage(LinkedEntity linkedEntity, UsageKnowledge<LinkedEntity> relationUsage, UsageKnowledge<LinkedEntity> targetEntityUsage)
-
addAllUsage
protected void addAllUsage(Collection<LinkedEntity> linkedEntities, UsageKnowledge<LinkedEntity> relationUsage, UsageKnowledge<LinkedEntity> targetEntityUsage)
-
addPropertyUsage
protected void addPropertyUsage(T t, Set<PropertyDefinition> properties)
-
addEntityMetadataUsage
protected void addEntityMetadataUsage(T t)
-
addRelationMetadataUsage
protected void addRelationMetadataUsage(T t)
-
addPropagationConstraintUsage
protected void addPropagationConstraintUsage(T t)
-
addAllType
public void addAllType(Collection<T> types)
-
addType
public void addType(T t)
-
getTree
public Tree<T> getTree(AccessType accessType)
-
getModelTypesUsage
public UsageKnowledge<?> getModelTypesUsage(AccessType accessType)
-
getERTypesUsage
public UsageKnowledge<LinkedEntity> getERTypesUsage(AccessType accessType)
-
getPropertyUsage
public UsageKnowledge<Map.Entry<String,PropertyDefinition>> getPropertyUsage()
-
getResourceUsage
public UsageKnowledge<LinkedEntity> getResourceUsage()
-
getFacetUsage
public UsageKnowledge<LinkedEntity> getFacetUsage()
-
getIsRelatedToUsage
public UsageKnowledge<LinkedEntity> getIsRelatedToUsage()
-
getConsistsOfUsage
public UsageKnowledge<LinkedEntity> getConsistsOfUsage()
-
getTypeByName
public T getTypeByName(String typeName) throws RuntimeException
Return the type if it is contained in the Knowledge- Parameters:
typeName- the type we are looking for- Returns:
- the Type
- Throws:
RuntimeException
-
getNodeByName
public Node<T> getNodeByName(String typeName) throws RuntimeException
Return the node for the type if it is contained in the Knowledge- Parameters:
typeName- the type we are looking for- Returns:
- the Type
- Throws:
RuntimeException
-
-