Class UsageKnowledge<U>
java.lang.Object
org.gcube.informationsystem.model.knowledge.UsageKnowledge<U>
- Type Parameters:
U- The type of a single usage occurrence.
Tracks, per type name, the list of recorded usage occurrences of a given
kind — e.g. which
ConsistsOf/IsRelatedTo relations a type
participates in, or which types embed a given generic property type.- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a usage for a type.Returns the names of every type that has at least one recorded usage.Returns the usages for a type.voidRemoves a previously recorded usage for a type, e.g. when a fallback usage is superseded by an authoritative one.
-
Field Details
-
map
The map of usages.
-
-
Constructor Details
-
UsageKnowledge
Creates a new instance.- Parameters:
accessType- The access type.
-
-
Method Details
-
add
Adds a usage for a type.- Parameters:
typeName- The type name.u- The usage.
-
remove
Removes a previously recorded usage for a type, e.g. when a fallback usage is superseded by an authoritative one.- Parameters:
typeName- The type name.u- The usage to remove.
-
getUsage
Returns the usages for a type.- Parameters:
typeName- The type name.- Returns:
- The list of usages.
-
getTypeNames
Returns the names of every type that has at least one recorded usage.- Returns:
- The set of type names with recorded usage.
-