Package net.ontopia.topicmaps.utils
Class CharacteristicUtils
java.lang.Object
net.ontopia.topicmaps.utils.CharacteristicUtils
INTERNAL: Characteristic processing utilities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<TopicIF>getAssociatedTopics(TopicIF topic) INTERNAL: Returns all the directly associated topics of the given topic.static <T extends TypedIF>
TgetByType(Collection<T> objects, TopicIF type) INTERNAL: Finds first characteristic of a specified type.static Collection<OccurrenceIF>getOccurrences(Collection<TopicIF> topics) Gets the occurrences of all the topics in the given collection.static Collection<AssociationRoleIF>getRoles(Collection<TopicIF> topics) Gets the association roles of the topics in the given collection.static Collection<TopicNameIF>getTopicNames(Collection<TopicIF> topics) INTERNAL: Gets the basenames of the given collection of topics.static Collection<TopicIF>getTopicsOfTopicNames(Collection<TopicNameIF> basenames) INTERNAL: Gets the topics of a collection of basenames.static Collection<VariantNameIF>getVariants(Collection<TopicNameIF> names) Gets all the variant names of the given collecton of basenames, including nested ones.
-
Constructor Details
-
CharacteristicUtils
public CharacteristicUtils()
-
-
Method Details
-
getByType
INTERNAL: Finds first characteristic of a specified type.- Parameters:
objects- A collection of TypedIF objects.- Returns:
- The first object that has the specified type.
- Since:
- 2.0
-
getTopicNames
INTERNAL: Gets the basenames of the given collection of topics.- Parameters:
topics- A scope; a collection of TopicIF objects.- Returns:
- An ArrayList of TopicNameIF objects; the base names of all the topics in the given collection.
-
getVariants
Gets all the variant names of the given collecton of basenames, including nested ones.- Parameters:
names- A collection of TopicNameIF objects.- Returns:
- The variant names of all the basenames in the given collection; an ArrayList of VariantNameIF objects.
-
getOccurrences
Gets the occurrences of all the topics in the given collection.- Parameters:
topics- A collection of TopicIF objects; a scope.- Returns:
- An ArrayList of OccurrenceIF objects; all the occurrences of the topics in the given collection.
-
getRoles
Gets the association roles of the topics in the given collection.- Parameters:
topics- A collection of TopicIF objects; a scope.- Returns:
- An ArrayList of AssociationRoleIF objects; all the association roles of the topics in the given collection.
-
getTopicsOfTopicNames
INTERNAL: Gets the topics of a collection of basenames.- Parameters:
basenames- A collection of TopicNameIFs.- Returns:
- A collection of TopicIF objects; the topics to which the basenames belong.
-
getAssociatedTopics
INTERNAL: Returns all the directly associated topics of the given topic.- Since:
- 3.4
-