Class ClassInstanceIndex
java.lang.Object
net.ontopia.topicmaps.impl.utils.AbstractIndex
net.ontopia.topicmaps.impl.utils.BasicIndex
net.ontopia.topicmaps.impl.basic.index.ClassInstanceIndex
- All Implemented Interfaces:
ClassInstanceIndexIF,IndexIF,EventListenerIF
INTERNAL: The basic dynamic class instance index implementation.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.ontopia.topicmaps.impl.utils.BasicIndex
BasicIndex.EventHandler<K,V>, BasicIndex.TypedPredicate -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CollectionMap<TopicIF,AssociationIF> protected CollectionMap<TopicIF,TopicNameIF> protected CollectionMap<TopicIF,OccurrenceIF> protected CollectionMap<TopicIF,AssociationRoleIF> protected final TopicMapIFprotected CollectionMap<TopicIF,TopicIF> Fields inherited from class net.ontopia.topicmaps.impl.utils.BasicIndex
handlers -
Method Summary
Modifier and TypeMethodDescriptionPUBLIC: Gets all occurrences that are in the topic map.PUBLIC: Gets all topic names that are in the topic map.PUBLIC: Gets all variant names that are in the topic map.getAssociationRoles(TopicIF association_role_type) PUBLIC: Gets all association roles that are of the given type.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.PUBLIC: Gets the topics that are used as association role types.getAssociations(TopicIF association_type) PUBLIC: Gets all associations that are of the given type.PUBLIC: Gets the topics that are used as association types.getOccurrences(TopicIF occurrence_type) PUBLIC: Gets all occurrences that are of the given type.PUBLIC: Gets the topics that are used as occurrence types.getTopicNames(TopicIF basename_type) PUBLIC: Gets all topic names that are of the given type.PUBLIC: Gets the topics that are used as topic name types.PUBLIC: Gets all topics that are instances of the given type.PUBLIC: Gets all topics that are used as topic types.booleanusedAsAssociationRoleType(TopicIF topic) PUBLIC: Returns true if the topic is used as an association role type.booleanusedAsAssociationType(TopicIF topic) PUBLIC: Returns true if the topic is used as an association type.booleanusedAsOccurrenceType(TopicIF topic) PUBLIC: Returns true if the topic is used as an occurrence type.booleanusedAsTopicNameType(TopicIF topic) PUBLIC: Returns true if the topic is used as an topic name type.booleanusedAsTopicType(TopicIF topic) PUBLIC: Returns true if the topic is used as a topic type somewhere.booleanusedAsType(TopicIF topic) PUBLIC: Returns true if the topic is used as a type somewhere.Methods inherited from class net.ontopia.topicmaps.impl.utils.BasicIndex
getIndex, processEvent
-
Field Details
-
topics
-
bnames
-
occurs
-
assocs
-
roles
-
topicmap
-
-
Method Details
-
getTopics
Description copied from interface:ClassInstanceIndexIFPUBLIC: 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:
getTopicsin 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
Description copied from interface:ClassInstanceIndexIFPUBLIC: Gets all topic names that are of the given type.- Specified by:
getTopicNamesin interfaceClassInstanceIndexIF- Parameters:
basename_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
Description copied from interface:ClassInstanceIndexIFPUBLIC: Gets all topic names that are in the topic map.- Specified by:
getAllTopicNamesin interfaceClassInstanceIndexIF- Returns:
- A collection of TopicNameIF objects
-
getAllVariantNames
Description copied from interface:ClassInstanceIndexIFPUBLIC: Gets all variant names that are in the topic map.- Specified by:
getAllVariantNamesin interfaceClassInstanceIndexIF- Returns:
- A collection of VariantNameIF objects
-
getOccurrences
Description copied from interface:ClassInstanceIndexIFPUBLIC: Gets all occurrences that are of the given type.- Specified by:
getOccurrencesin 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
Description copied from interface:ClassInstanceIndexIFPUBLIC: Gets all occurrences that are in the topic map.- Specified by:
getAllOccurrencesin interfaceClassInstanceIndexIF- Returns:
- A collection of OccurrenceIF objects
-
getAssociations
Description copied from interface:ClassInstanceIndexIFPUBLIC: Gets all associations that are of the given type.- Specified by:
getAssociationsin 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
Description copied from interface:ClassInstanceIndexIFPUBLIC: Gets all association roles that are of the given type.- Specified by:
getAssociationRolesin 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:ClassInstanceIndexIFPUBLIC: Gets all association roles that are of the given type and part of an association of given type.- Specified by:
getAssociationRolesin 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
Description copied from interface:ClassInstanceIndexIFPUBLIC: Gets all topics that are used as topic types.- Specified by:
getTopicTypesin interfaceClassInstanceIndexIF- Returns:
- A collection of TopicIF objects, each of which serves as a type for some topic.
-
getTopicNameTypes
Description copied from interface:ClassInstanceIndexIFPUBLIC: Gets the topics that are used as topic name types.- Specified by:
getTopicNameTypesin interfaceClassInstanceIndexIF- Returns:
- A collection of TopicIF objects, each of which serves as a type for some topic name.
-
getOccurrenceTypes
Description copied from interface:ClassInstanceIndexIFPUBLIC: Gets the topics that are used as occurrence types.- Specified by:
getOccurrenceTypesin interfaceClassInstanceIndexIF- Returns:
- A collection of TopicIF objects, each of which serves as a type for some occurrence.
-
getAssociationTypes
Description copied from interface:ClassInstanceIndexIFPUBLIC: Gets the topics that are used as association types.- Specified by:
getAssociationTypesin interfaceClassInstanceIndexIF- Returns:
- A collection of TopicIF objects, each of which serves as a type for some association.
-
getAssociationRoleTypes
Description copied from interface:ClassInstanceIndexIFPUBLIC: Gets the topics that are used as association role types.- Specified by:
getAssociationRoleTypesin interfaceClassInstanceIndexIF- Returns:
- A collection of TopicIF objects, each of which serves as a type for some association role.
-
usedAsTopicType
Description copied from interface:ClassInstanceIndexIFPUBLIC: Returns true if the topic is used as a topic type somewhere.- Specified by:
usedAsTopicTypein interfaceClassInstanceIndexIF- Parameters:
topic- An object implementing TopicIF.- Returns:
- Boolean: true if the given topic serves as a type for some topic; false otherwise.
-
usedAsTopicNameType
Description copied from interface:ClassInstanceIndexIFPUBLIC: Returns true if the topic is used as an topic name type.- Specified by:
usedAsTopicNameTypein 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
Description copied from interface:ClassInstanceIndexIFPUBLIC: Returns true if the topic is used as an occurrence type.- Specified by:
usedAsOccurrenceTypein interfaceClassInstanceIndexIF- Parameters:
topic- An object implementing TopicIF.- Returns:
- Boolean: true if the given topic serves as a type for some occurrence; false otherwise.
-
usedAsAssociationType
Description copied from interface:ClassInstanceIndexIFPUBLIC: Returns true if the topic is used as an association type.- Specified by:
usedAsAssociationTypein interfaceClassInstanceIndexIF- Parameters:
topic- An object implementing TopicIF.- Returns:
- Boolean: true if the given topic serves as a type for some association; false otherwise.
-
usedAsAssociationRoleType
Description copied from interface:ClassInstanceIndexIFPUBLIC: Returns true if the topic is used as an association role type.- Specified by:
usedAsAssociationRoleTypein 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
Description copied from interface:ClassInstanceIndexIFPUBLIC: Returns true if the topic is used as a type somewhere.- Specified by:
usedAsTypein 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.
-