Class ClassInstanceIndex
- java.lang.Object
-
- net.ontopia.topicmaps.impl.utils.AbstractIndex
-
- net.ontopia.topicmaps.impl.rdbms.index.RDBMSIndex
-
- net.ontopia.topicmaps.impl.rdbms.index.ClassInstanceIndex
-
- All Implemented Interfaces:
ClassInstanceIndexIF
,IndexIF
public class ClassInstanceIndex extends RDBMSIndex implements ClassInstanceIndexIF
INTERNAL: The rdbms class instance index implementation.
-
-
Field Summary
-
Fields inherited from class net.ontopia.topicmaps.impl.rdbms.index.RDBMSIndex
imanager, transaction
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<OccurrenceIF>
getAllOccurrences()
PUBLIC: Gets all occurrences that are in the topic map.Collection<TopicNameIF>
getAllTopicNames()
PUBLIC: Gets all topic names that are in the topic map.Collection<VariantNameIF>
getAllVariantNames()
PUBLIC: Gets all variant names that are in the topic map.Collection<AssociationRoleIF>
getAssociationRoles(TopicIF association_role_type)
PUBLIC: Gets all association roles that are of the given type.Collection<AssociationRoleIF>
getAssociationRoles(TopicIF association_role_type, TopicIF association_type)
PUBLIC: Gets all association roles that are of the given type and part of an association of given type.Collection<TopicIF>
getAssociationRoleTypes()
PUBLIC: Gets the topics that are used as association role types.Collection<AssociationIF>
getAssociations(TopicIF association_type)
PUBLIC: Gets all associations that are of the given type.Collection<TopicIF>
getAssociationTypes()
PUBLIC: Gets the topics that are used as association types.Collection<OccurrenceIF>
getOccurrences(TopicIF occurrence_type)
PUBLIC: Gets all occurrences that are of the given type.Collection<TopicIF>
getOccurrenceTypes()
PUBLIC: Gets the topics that are used as occurrence types.Collection<TopicNameIF>
getTopicNames(TopicIF name_type)
PUBLIC: Gets all topic names that are of the given type.Collection<TopicIF>
getTopicNameTypes()
PUBLIC: Gets the topics that are used as topic name types.Collection<TopicIF>
getTopics(TopicIF topic_type)
PUBLIC: Gets all topics that are instances of the given type.Collection<TopicIF>
getTopicTypes()
PUBLIC: Gets all topics that are used as topic types.boolean
usedAsAssociationRoleType(TopicIF topic)
PUBLIC: Returns true if the topic is used as an association role type.boolean
usedAsAssociationType(TopicIF topic)
PUBLIC: Returns true if the topic is used as an association type.boolean
usedAsOccurrenceType(TopicIF topic)
PUBLIC: Returns true if the topic is used as an occurrence type.boolean
usedAsTopicNameType(TopicIF topic)
PUBLIC: Returns true if the topic is used as an topic name type.boolean
usedAsTopicType(TopicIF topic)
PUBLIC: Returns true if the topic is used as a topic type somewhere.boolean
usedAsType(TopicIF topic)
PUBLIC: Returns true if the topic is used as a type somewhere.-
Methods inherited from class net.ontopia.topicmaps.impl.rdbms.index.RDBMSIndex
executeQuery, getIndex, getTopicMap
-
-
-
-
Method Detail
-
getTopics
public Collection<TopicIF> getTopics(TopicIF topic_type)
Description copied from interface:ClassInstanceIndexIF
PUBLIC: Gets all topics that are instances of the given type. Topic types are an abbreviated form of an association having roles for type and instance. This index provides optimized handling for topic types.- Specified by:
getTopics
in interfaceClassInstanceIndexIF
- Parameters:
topic_type
- The given type; an object implementing TopicIF.- Returns:
- A collection of TopicIF objects; the instances of the type represented by the given topic.
-
getTopicNames
public Collection<TopicNameIF> getTopicNames(TopicIF name_type)
Description copied from interface:ClassInstanceIndexIF
PUBLIC: Gets all topic names that are of the given type.- Specified by:
getTopicNames
in interfaceClassInstanceIndexIF
- Parameters:
name_type
- The given type; an object implementing TopicIF.- Returns:
- A collection of TopicNameIF objects; topic names with the type represented by the given topic.
-
getAllTopicNames
public Collection<TopicNameIF> getAllTopicNames()
Description copied from interface:ClassInstanceIndexIF
PUBLIC: Gets all topic names that are in the topic map.- Specified by:
getAllTopicNames
in interfaceClassInstanceIndexIF
- Returns:
- A collection of TopicNameIF objects
-
getAllVariantNames
public Collection<VariantNameIF> getAllVariantNames()
Description copied from interface:ClassInstanceIndexIF
PUBLIC: Gets all variant names that are in the topic map.- Specified by:
getAllVariantNames
in interfaceClassInstanceIndexIF
- Returns:
- A collection of VariantNameIF objects
-
getOccurrences
public Collection<OccurrenceIF> getOccurrences(TopicIF occurrence_type)
Description copied from interface:ClassInstanceIndexIF
PUBLIC: Gets all occurrences that are of the given type.- Specified by:
getOccurrences
in interfaceClassInstanceIndexIF
- Parameters:
occurrence_type
- The given type; an object implementing TopicIF.- Returns:
- A collection of OccurrenceIF objects; occurrences with the type represented by the given topic.
-
getAllOccurrences
public Collection<OccurrenceIF> getAllOccurrences()
Description copied from interface:ClassInstanceIndexIF
PUBLIC: Gets all occurrences that are in the topic map.- Specified by:
getAllOccurrences
in interfaceClassInstanceIndexIF
- Returns:
- A collection of OccurrenceIF objects
-
getAssociations
public Collection<AssociationIF> getAssociations(TopicIF association_type)
Description copied from interface:ClassInstanceIndexIF
PUBLIC: Gets all associations that are of the given type.- Specified by:
getAssociations
in interfaceClassInstanceIndexIF
- Parameters:
association_type
- The given type; an object implementing TopicIF.- Returns:
- A collection of AssociationIF objects; associations with the type represented by the given topic.
-
getAssociationRoles
public Collection<AssociationRoleIF> getAssociationRoles(TopicIF association_role_type)
Description copied from interface:ClassInstanceIndexIF
PUBLIC: Gets all association roles that are of the given type.- Specified by:
getAssociationRoles
in interfaceClassInstanceIndexIF
- Parameters:
association_role_type
- The given type; an object implementing TopicIF.- Returns:
- A collection of AssociationRoleIF objects; association roles with the type represented by the given topic.
-
getAssociationRoles
public Collection<AssociationRoleIF> getAssociationRoles(TopicIF association_role_type, TopicIF association_type)
Description copied from interface:ClassInstanceIndexIF
PUBLIC: Gets all association roles that are of the given type and part of an association of given type.- Specified by:
getAssociationRoles
in interfaceClassInstanceIndexIF
- Parameters:
association_role_type
- The given role type; an object implementing TopicIF.association_type
- The given association type; an object implementing TopicIF.- Returns:
- A collection of AssociationRoleIF objects; association roles with the type represented by the given topic and part of an association with given type.
-
getTopicTypes
public Collection<TopicIF> getTopicTypes()
Description copied from interface:ClassInstanceIndexIF
PUBLIC: Gets all topics that are used as topic types.- Specified by:
getTopicTypes
in interfaceClassInstanceIndexIF
- Returns:
- A collection of TopicIF objects, each of which serves as a type for some topic.
-
getTopicNameTypes
public Collection<TopicIF> getTopicNameTypes()
Description copied from interface:ClassInstanceIndexIF
PUBLIC: Gets the topics that are used as topic name types.- Specified by:
getTopicNameTypes
in interfaceClassInstanceIndexIF
- Returns:
- A collection of TopicIF objects, each of which serves as a type for some topic name.
-
getOccurrenceTypes
public Collection<TopicIF> getOccurrenceTypes()
Description copied from interface:ClassInstanceIndexIF
PUBLIC: Gets the topics that are used as occurrence types.- Specified by:
getOccurrenceTypes
in interfaceClassInstanceIndexIF
- Returns:
- A collection of TopicIF objects, each of which serves as a type for some occurrence.
-
getAssociationTypes
public Collection<TopicIF> getAssociationTypes()
Description copied from interface:ClassInstanceIndexIF
PUBLIC: Gets the topics that are used as association types.- Specified by:
getAssociationTypes
in interfaceClassInstanceIndexIF
- Returns:
- A collection of TopicIF objects, each of which serves as a type for some association.
-
getAssociationRoleTypes
public Collection<TopicIF> getAssociationRoleTypes()
Description copied from interface:ClassInstanceIndexIF
PUBLIC: Gets the topics that are used as association role types.- Specified by:
getAssociationRoleTypes
in interfaceClassInstanceIndexIF
- Returns:
- A collection of TopicIF objects, each of which serves as a type for some association role.
-
usedAsTopicType
public boolean usedAsTopicType(TopicIF topic)
Description copied from interface:ClassInstanceIndexIF
PUBLIC: Returns true if the topic is used as a topic type somewhere.- Specified by:
usedAsTopicType
in interfaceClassInstanceIndexIF
- Parameters:
topic
- An object implementing TopicIF.- Returns:
- Boolean: true if the given topic serves as a type for some topic; false otherwise.
-
usedAsTopicNameType
public boolean usedAsTopicNameType(TopicIF topic)
Description copied from interface:ClassInstanceIndexIF
PUBLIC: Returns true if the topic is used as an topic name type.- Specified by:
usedAsTopicNameType
in interfaceClassInstanceIndexIF
- Parameters:
topic
- An object implementing TopicIF.- Returns:
- Boolean: true if the given topic serves as a type for some topic name; false otherwise.
-
usedAsOccurrenceType
public boolean usedAsOccurrenceType(TopicIF topic)
Description copied from interface:ClassInstanceIndexIF
PUBLIC: Returns true if the topic is used as an occurrence type.- Specified by:
usedAsOccurrenceType
in interfaceClassInstanceIndexIF
- Parameters:
topic
- An object implementing TopicIF.- Returns:
- Boolean: true if the given topic serves as a type for some occurrence; false otherwise.
-
usedAsAssociationType
public boolean usedAsAssociationType(TopicIF topic)
Description copied from interface:ClassInstanceIndexIF
PUBLIC: Returns true if the topic is used as an association type.- Specified by:
usedAsAssociationType
in interfaceClassInstanceIndexIF
- Parameters:
topic
- An object implementing TopicIF.- Returns:
- Boolean: true if the given topic serves as a type for some association; false otherwise.
-
usedAsAssociationRoleType
public boolean usedAsAssociationRoleType(TopicIF topic)
Description copied from interface:ClassInstanceIndexIF
PUBLIC: Returns true if the topic is used as an association role type.- Specified by:
usedAsAssociationRoleType
in interfaceClassInstanceIndexIF
- Parameters:
topic
- An object implementing TopicIF.- Returns:
- Boolean: true if the given topic serves as a type for some association role; false otherwise.
-
usedAsType
public boolean usedAsType(TopicIF topic)
Description copied from interface:ClassInstanceIndexIF
PUBLIC: Returns true if the topic is used as a type somewhere.- Specified by:
usedAsType
in interfaceClassInstanceIndexIF
- Parameters:
topic
- An object implementing TopicIF.- Returns:
- Boolean: true if the given topic serves as a type for any topic map object; false otherwise.
-
-