Package net.ontopia.topicmaps.utils
Class ClassInstanceUtils
java.lang.Object
net.ontopia.topicmaps.utils.ClassInstanceUtils
INTERNAL: Utilities for working with class-instance relationships.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CollectiongetInstancesOf(Collection typed, TopicIF type) INTERNAL: Returns the typed objects that are instances of the given type.static MapgetTypeMap(Collection typed) INTERNAL: Returns a Map containing the typed objects keyed by type.static MapgetTypeMap(Collection typed, Map accumulated) INTERNAL: Modifies the accumulated map to also include the type map of the typed objects.static CollectiongetTypes(Collection typed) INTERNAL: Returns the topics that are the type/class topic of the typed objects.static CollectiongetTypes(Collection typed, Collection accumulated) INTERNAL: Modifies the accumulated collection to also include the types of the typed objects.static booleanisInstanceOf(TopicIF topic, TopicIF type) INTERNAL: Returns true if the TopicIF object is an instance the given type.static booleanisInstanceOf(TypedIF typed, TopicIF type) INTERNAL: Returns true if the TypedIF object is an instance the given type.static voidresolveAssociations1(TopicMapIF topicmap) INTERNAL: Replaces all class-instance associations in a topic map by direct references from the topics in question to their types.static voidresolveAssociations2(TopicMapIF topicmap) INTERNAL: Replaces all class-instance associations using the XTM 2.0 PSIs in a topic map by direct references from the topics in question to their types.
-
Constructor Details
-
ClassInstanceUtils
public ClassInstanceUtils()
-
-
Method Details
-
resolveAssociations1
INTERNAL: Replaces all class-instance associations in a topic map by direct references from the topics in question to their types. Only associations that use the PSIs defined in XTM 1.0, that match the templates exactly, that are not reified, and that are not scoped are replaced.- Since:
- 1.2.3
-
resolveAssociations2
INTERNAL: Replaces all class-instance associations using the XTM 2.0 PSIs in a topic map by direct references from the topics in question to their types. Only associations that use the PSIs defined in XTM 2.0, that match the templates exactly, that are not reified, and that are not scoped are replaced. -
isInstanceOf
INTERNAL: Returns true if the TypedIF object is an instance the given type. -
isInstanceOf
INTERNAL: Returns true if the TopicIF object is an instance the given type. -
getInstancesOf
INTERNAL: Returns the typed objects that are instances of the given type. -
getTypes
INTERNAL: Returns the topics that are the type/class topic of the typed objects. -
getTypes
INTERNAL: Modifies the accumulated collection to also include the types of the typed objects. -
getTypeMap
INTERNAL: Returns a Map containing the typed objects keyed by type. The value of a map entry is always a Collection instance. -
getTypeMap
INTERNAL: Modifies the accumulated map to also include the type map of the typed objects. The value of a map entry is always a Collection instance.
-