net.ontopia.topicmaps.utils
Class CharacteristicUtils

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

public class CharacteristicUtils
extends java.lang.Object

INTERNAL: Characteristic processing utilities.


Constructor Summary
CharacteristicUtils()
           
 
Method Summary
static java.util.Collection getAssociatedTopics(TopicIF topic)
          INTERNAL: Returns all the directly associated topics of the given topic.
static TypedIF getByType(java.util.Collection objects, TopicIF type)
          INTERNAL: Finds first characteristic of a specified type.
static java.util.Collection getOccurrences(java.util.Collection topics)
          Gets the occurrences of all the topics in the given collection.
static java.util.Collection getRoles(java.util.Collection topics)
          Gets the association roles of the topics in the given collection.
static java.util.Collection getTopicNames(java.util.Collection topics)
          INTERNAL: Gets the basenames of the given collection of topics.
static java.util.Collection getTopicsOfTopicNames(java.util.Collection basenames)
          INTERNAL: Gets the topics of a collection of basenames.
static java.util.Collection getVariants(java.util.Collection names)
          Gets all the variant names of the given collecton of basenames, including nested ones.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharacteristicUtils

public CharacteristicUtils()
Method Detail

getByType

public static TypedIF getByType(java.util.Collection 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 java.util.Collection getTopicNames(java.util.Collection 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 java.util.Collection getVariants(java.util.Collection 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 java.util.Collection getOccurrences(java.util.Collection 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 java.util.Collection getRoles(java.util.Collection 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 java.util.Collection getTopicsOfTopicNames(java.util.Collection 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 java.util.Collection getAssociatedTopics(TopicIF topic)
INTERNAL: Returns all the directly associated topics of the given topic.

Since:
3.4


Copyright © 2000-2012 Ontopia.