Class CharacteristicUtils

java.lang.Object
net.ontopia.topicmaps.utils.CharacteristicUtils

public class CharacteristicUtils extends Object
INTERNAL: Characteristic processing utilities.
  • Constructor Details

    • CharacteristicUtils

      public CharacteristicUtils()
  • Method Details

    • getByType

      public static <T extends TypedIF> T getByType(Collection<T> objects, TopicIF type)
      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

      public static Collection<TopicNameIF> getTopicNames(Collection<TopicIF> topics)
      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

      public static Collection<VariantNameIF> getVariants(Collection<TopicNameIF> names)
      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

      public static Collection<OccurrenceIF> getOccurrences(Collection<TopicIF> topics)
      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

      public static Collection<AssociationRoleIF> getRoles(Collection<TopicIF> topics)
      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

      public static Collection<TopicIF> getTopicsOfTopicNames(Collection<TopicNameIF> basenames)
      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

      public static Collection<TopicIF> getAssociatedTopics(TopicIF topic)
      INTERNAL: Returns all the directly associated topics of the given topic.
      Since:
      3.4