de.topicmapslab.majortom.store
Class ReadOnlyTopicMapStoreImpl

java.lang.Object
  extended by de.topicmapslab.majortom.store.TopicMapStoreImpl
      extended by de.topicmapslab.majortom.store.ReadOnlyTopicMapStoreImpl
All Implemented Interfaces:
de.topicmapslab.majortom.model.store.ITopicMapStore
Direct Known Subclasses:
Cache, ModifableTopicMapStoreImpl

public abstract class ReadOnlyTopicMapStoreImpl
extends TopicMapStoreImpl

Base implementation of a read only ITopicMapStore.

Author:
Sven Krosse

Field Summary
private  Cache cache
          the cache
private  boolean enableCaching
          flag indicates if the caching is enabled or disabled
 
Fields inherited from class de.topicmapslab.majortom.store.TopicMapStoreImpl
OUTPUT
 
Constructor Summary
ReadOnlyTopicMapStoreImpl()
          constructor
ReadOnlyTopicMapStoreImpl(de.topicmapslab.majortom.model.core.ITopicMapSystem topicMapSystem)
          constructor
 
Method Summary
 void clear()
          
 void clearCache()
          Clear the cache if it is used
 void close()
          
 void commit()
          
 void connect()
          
 de.topicmapslab.majortom.model.transaction.ITransaction createTransaction()
          
 java.lang.Object doCreate(de.topicmapslab.majortom.model.core.IConstruct context, de.topicmapslab.majortom.model.store.TopicMapStoreParameterType paramType, java.lang.Object... params)
          
protected abstract  de.topicmapslab.majortom.model.core.ILocator doCreateLocator(de.topicmapslab.majortom.model.core.ITopicMap topicMap, java.lang.String reference)
          Create a locator instance.
abstract  de.topicmapslab.majortom.model.core.IScope doCreateScope(de.topicmapslab.majortom.model.core.ITopicMap topicMap, java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
          Create the internal scope object representing the collection of themes
<T extends org.tmapi.core.Construct>
void
doMerge(T context, T... others)
          
 void doModify(de.topicmapslab.majortom.model.core.IConstruct context, de.topicmapslab.majortom.model.store.TopicMapStoreParameterType paramType, java.lang.Object... params)
          
 java.lang.Object doRead(de.topicmapslab.majortom.model.core.IConstruct context, de.topicmapslab.majortom.model.store.TopicMapStoreParameterType paramType, java.lang.Object... params)
          
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IAssociation> doReadAssociation(de.topicmapslab.majortom.model.core.ITopic t)
          Read the association played by the given topic
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IAssociation> doReadAssociation(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.IScope scope)
          Read all scoped associations played by the given topic
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IAssociation> doReadAssociation(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.ITopic type)
          Read the associations played by the given topic and being typed by the given type.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IAssociation> doReadAssociation(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.ITopic type, de.topicmapslab.majortom.model.core.IScope scope)
          Read all scoped associations played by the given topic and being typed by the given type
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IAssociation> doReadAssociation(de.topicmapslab.majortom.model.core.ITopicMap tm)
          Read all associations of the topic map.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IAssociation> doReadAssociation(de.topicmapslab.majortom.model.core.ITopicMap tm, de.topicmapslab.majortom.model.core.IScope scope)
          Read all scoped associations of the topic map.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IAssociation> doReadAssociation(de.topicmapslab.majortom.model.core.ITopicMap tm, de.topicmapslab.majortom.model.core.ITopic type)
          Read all associations of the topic map being typed by the given type.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IAssociation> doReadAssociation(de.topicmapslab.majortom.model.core.ITopicMap tm, de.topicmapslab.majortom.model.core.ITopic type, de.topicmapslab.majortom.model.core.IScope scope)
          Read all scoped associations of the topic map being typed by the given type.
abstract  java.lang.String doReadBestIdentifier(de.topicmapslab.majortom.model.core.ITopic topic, boolean withPrefix)
          Returns the best and stable identifier of the topic.
abstract  java.lang.String doReadBestLabel(de.topicmapslab.majortom.model.core.ITopic topic)
          Returns the best label for the current topic instance.
abstract  java.lang.String doReadBestLabel(de.topicmapslab.majortom.model.core.ITopic topic, de.topicmapslab.majortom.model.core.ITopic theme, boolean strict)
          Returns the best label for the current topic instance.
abstract  de.topicmapslab.majortom.model.revision.Changeset doReadChangeSet(de.topicmapslab.majortom.model.revision.IRevision r)
          Read the change set of a revision.
abstract  de.topicmapslab.majortom.model.event.TopicMapEventType doReadChangeSetType(de.topicmapslab.majortom.model.revision.IRevision revision)
          Read the type of the given typed item.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.ICharacteristics> doReadCharacteristics(de.topicmapslab.majortom.model.core.ITopic t)
          Read all characteristics if the given topic.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.ICharacteristics> doReadCharacteristics(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.IScope scope)
          Read all scoped characteristics if the given topic.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.ICharacteristics> doReadCharacteristics(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.ITopic type)
          Read all characteristics if the given topic being typed by the given type.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.ICharacteristics> doReadCharacteristics(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.ITopic type, de.topicmapslab.majortom.model.core.IScope scope)
          Read all scoped characteristics if the given topic being typed by the given type.
abstract  de.topicmapslab.majortom.model.core.IConstruct doReadConstruct(de.topicmapslab.majortom.model.core.ITopicMap t, de.topicmapslab.majortom.model.core.ILocator itemIdentifier)
          Read the construct identified by the given item-identifier.
abstract  de.topicmapslab.majortom.model.core.IConstruct doReadConstruct(de.topicmapslab.majortom.model.core.ITopicMap t, java.lang.String id)
          Read the construct identified by the given id.
abstract  de.topicmapslab.majortom.model.core.ILocator doReadDataType(de.topicmapslab.majortom.model.core.IDatatypeAware d)
          Read the data type of the given data-type-aware
abstract  de.topicmapslab.majortom.model.revision.IRevision doReadFutureRevision(de.topicmapslab.majortom.model.revision.IRevision r)
          Read the previous revision of the revision.
abstract  java.lang.String doReadId(de.topicmapslab.majortom.model.core.IConstruct c)
          Read the id of the given construct
abstract  java.util.Set<de.topicmapslab.majortom.model.core.ILocator> doReadItemIdentifiers(de.topicmapslab.majortom.model.core.IConstruct c)
          Read all item-identifiers of the given construct
 de.topicmapslab.majortom.model.core.ILocator doReadLocator(de.topicmapslab.majortom.model.core.ITopicMap t)
          Read the base locator of the given topic map.
abstract  java.util.Map<java.lang.String,java.lang.String> doReadMetaData(de.topicmapslab.majortom.model.revision.IRevision revision)
          Read the whole meta data sets of the given revision
abstract  java.lang.String doReadMetaData(de.topicmapslab.majortom.model.revision.IRevision revision, java.lang.String key)
          Read the value of the meta set of the given revision identified by the given key.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IName> doReadNames(de.topicmapslab.majortom.model.core.ITopic t)
          Read all names if the given topic.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IName> doReadNames(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.IScope scope)
          Read all scoped names of the given topic where the scope matches exactly.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IName> doReadNames(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.ITopic type)
          Read all names if the given topic being typed by the given type.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IName> doReadNames(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.ITopic type, de.topicmapslab.majortom.model.core.IScope scope)
          Read all scoped names if the given topic being typed by the given type.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IOccurrence> doReadOccurrences(de.topicmapslab.majortom.model.core.ITopic t)
          Read all occurrences if the given topic.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IOccurrence> doReadOccurrences(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.IScope scope)
          Read all scoped occurrence if the given topic.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IOccurrence> doReadOccurrences(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.ITopic type)
          Read all occurrence if the given topic being typed by the given type.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IOccurrence> doReadOccurrences(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.ITopic type, de.topicmapslab.majortom.model.core.IScope scope)
          Read all scoped occurrence if the given topic being typed by the given type.
abstract  de.topicmapslab.majortom.model.revision.IRevision doReadPastRevision(de.topicmapslab.majortom.model.revision.IRevision r)
          Read the past revision of the revision.
abstract  de.topicmapslab.majortom.model.core.ITopic doReadPlayer(de.topicmapslab.majortom.model.core.IAssociationRole role)
          Read the player of the given role
abstract  de.topicmapslab.majortom.model.core.ITopic doReadReification(de.topicmapslab.majortom.model.core.IReifiable r)
          Read the reifier of the reified construct
abstract  de.topicmapslab.majortom.model.core.IReifiable doReadReification(de.topicmapslab.majortom.model.core.ITopic t)
          Read the reified item of the given topic.
abstract  java.util.Calendar doReadRevisionTimestamp(de.topicmapslab.majortom.model.revision.IRevision r)
          Read the time-stamp of the revision begin.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IAssociationRole> doReadRoles(de.topicmapslab.majortom.model.core.IAssociation association)
          Read all association role items of the given association
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IAssociationRole> doReadRoles(de.topicmapslab.majortom.model.core.IAssociation association, de.topicmapslab.majortom.model.core.ITopic type)
          Read all association role items of the given association and the given type.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IAssociationRole> doReadRoles(de.topicmapslab.majortom.model.core.ITopic player)
          Read the played roles of the given topic.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IAssociationRole> doReadRoles(de.topicmapslab.majortom.model.core.ITopic player, de.topicmapslab.majortom.model.core.ITopic type)
          Read the played roles of the given topic and being typed by the given type
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IAssociationRole> doReadRoles(de.topicmapslab.majortom.model.core.ITopic player, de.topicmapslab.majortom.model.core.ITopic type, de.topicmapslab.majortom.model.core.ITopic assocType)
          Read the played roles of the given topic and being typed by the given type
abstract  java.util.Set<de.topicmapslab.majortom.model.core.ITopic> doReadRoleTypes(de.topicmapslab.majortom.model.core.IAssociation association)
          Read all role types of the given association
abstract  de.topicmapslab.majortom.model.core.IScope doReadScope(de.topicmapslab.majortom.model.core.IScopable s)
          Read the scope of the given scoped item
abstract  java.util.Set<de.topicmapslab.majortom.model.core.ILocator> doReadSubjectIdentifiers(de.topicmapslab.majortom.model.core.ITopic t)
          Read all subject-identifiers of the given topic.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.ILocator> doReadSubjectLocators(de.topicmapslab.majortom.model.core.ITopic t)
          Read all subject-locators of the given topic.
abstract  java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> doReadSuptertypes(de.topicmapslab.majortom.model.core.ITopic t)
          Read all super types of the given topic.
abstract  de.topicmapslab.majortom.model.core.ITopic doReadTopicBySubjectIdentifier(de.topicmapslab.majortom.model.core.ITopicMap t, de.topicmapslab.majortom.model.core.ILocator subjectIdentifier)
          Read the topic identified by the given subject-identifier.
abstract  de.topicmapslab.majortom.model.core.ITopic doReadTopicBySubjectLocator(de.topicmapslab.majortom.model.core.ITopicMap t, de.topicmapslab.majortom.model.core.ILocator subjectLocator)
          Read the topic identified by the given subject-locator.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.ITopic> doReadTopics(de.topicmapslab.majortom.model.core.ITopicMap t)
          Return all topics of the topic map.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.ITopic> doReadTopics(de.topicmapslab.majortom.model.core.ITopicMap t, de.topicmapslab.majortom.model.core.ITopic type)
          Return all topics of the topic map being typed by the given type.
abstract  de.topicmapslab.majortom.model.core.ITopic doReadType(de.topicmapslab.majortom.model.core.ITypeable typed)
          Read the type of the given typed item.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.ITopic> doReadTypes(de.topicmapslab.majortom.model.core.ITopic t)
          Read all types of the given type.
abstract  java.lang.Object doReadValue(de.topicmapslab.majortom.model.core.IDatatypeAware t)
          Read the value of the data-type-aware.
abstract
<T> T
doReadValue(de.topicmapslab.majortom.model.core.IDatatypeAware t, java.lang.Class<T> type)
          Read the value of the data-type-aware and cast them to the given type
abstract  java.lang.Object doReadValue(de.topicmapslab.majortom.model.core.IName n)
          Read the value of the topic name.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IVariant> doReadVariants(de.topicmapslab.majortom.model.core.IName n)
          Read the variants of the given name.
abstract  java.util.Set<de.topicmapslab.majortom.model.core.IVariant> doReadVariants(de.topicmapslab.majortom.model.core.IName n, de.topicmapslab.majortom.model.core.IScope scope)
          Read the variants of the given name in the given scope.
 void doRemove(de.topicmapslab.majortom.model.core.IConstruct context, boolean cascade)
          
 void doRemove(de.topicmapslab.majortom.model.core.IConstruct context, de.topicmapslab.majortom.model.store.TopicMapStoreParameterType paramType, java.lang.Object... params)
          
 void enableCaching(boolean enable)
          Enable the caching mechanism of the database topic map store.
 Cache getCache()
          Returning the cache
 java.lang.Object internalDoRead(de.topicmapslab.majortom.model.core.IConstruct context, de.topicmapslab.majortom.model.store.TopicMapStoreParameterType paramType, java.lang.Object... params)
          
 boolean isCachingEnabled()
          Method returns the internal state of caching.
 void removeDuplicates()
          
 
Methods inherited from class de.topicmapslab.majortom.store.TopicMapStoreImpl
addTaskToThreadPool, addTopicMapListener, createConstructFactory, createMetaDataInstance, doAutomaticMerging, doMergingByTopicName, enableRevisionManagement, generateId, generateStringId, getConstructFactory, getListeners, getMetaData, getThreadPool, getTopicMap, getTopicMapBaseLocator, getTopicMapBaseLocatorReference, getTopicMapSystem, initialize, isConnected, isReadOnly, isReificationDeletionRestricted, isRevisionManagementEnabled, isRevisionManagementSupported, isTransactable, notifyListeners, recognizingSupertypeSubtypeAssociation, recognizingTypeInstanceAssociation, removeTopicMapListener, setTopicMap, setTopicMapSystem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.topicmapslab.majortom.model.store.ITopicMapStore
getIndex, getTopicMapIdentity
 

Field Detail

cache

private Cache cache
the cache


enableCaching

private boolean enableCaching
flag indicates if the caching is enabled or disabled

Constructor Detail

ReadOnlyTopicMapStoreImpl

public ReadOnlyTopicMapStoreImpl(de.topicmapslab.majortom.model.core.ITopicMapSystem topicMapSystem)
constructor

Parameters:
topicMapSystem - the parent system

ReadOnlyTopicMapStoreImpl

public ReadOnlyTopicMapStoreImpl()
constructor

Method Detail

doCreate

public java.lang.Object doCreate(de.topicmapslab.majortom.model.core.IConstruct context,
                                 de.topicmapslab.majortom.model.store.TopicMapStoreParameterType paramType,
                                 java.lang.Object... params)
                          throws de.topicmapslab.majortom.model.exception.TopicMapStoreException

Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException

doCreateLocator

protected abstract de.topicmapslab.majortom.model.core.ILocator doCreateLocator(de.topicmapslab.majortom.model.core.ITopicMap topicMap,
                                                                                java.lang.String reference)
                                                                         throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a locator instance.

Parameters:
topicMap - the topic map
reference - the string reference
Returns:
the created construct
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doCreateScope

public abstract de.topicmapslab.majortom.model.core.IScope doCreateScope(de.topicmapslab.majortom.model.core.ITopicMap topicMap,
                                                                         java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
                                                                  throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create the internal scope object representing the collection of themes

Parameters:
topicMap - the topic map
themes - the themes collection
Returns:
the scope object
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doModify

public void doModify(de.topicmapslab.majortom.model.core.IConstruct context,
                     de.topicmapslab.majortom.model.store.TopicMapStoreParameterType paramType,
                     java.lang.Object... params)
              throws de.topicmapslab.majortom.model.exception.TopicMapStoreException

Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException

doMerge

public <T extends org.tmapi.core.Construct> void doMerge(T context,
                                                         T... others)
             throws de.topicmapslab.majortom.model.exception.TopicMapStoreException

Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException

doRead

public java.lang.Object doRead(de.topicmapslab.majortom.model.core.IConstruct context,
                               de.topicmapslab.majortom.model.store.TopicMapStoreParameterType paramType,
                               java.lang.Object... params)
                        throws de.topicmapslab.majortom.model.exception.TopicMapStoreException

Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException

internalDoRead

public java.lang.Object internalDoRead(de.topicmapslab.majortom.model.core.IConstruct context,
                                       de.topicmapslab.majortom.model.store.TopicMapStoreParameterType paramType,
                                       java.lang.Object... params)
                                throws de.topicmapslab.majortom.model.exception.TopicMapStoreException

Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException

doReadAssociation

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IAssociation> doReadAssociation(de.topicmapslab.majortom.model.core.ITopic t)
                                                                                           throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the association played by the given topic

Parameters:
t - the topic
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadAssociation

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IAssociation> doReadAssociation(de.topicmapslab.majortom.model.core.ITopic t,
                                                                                                  de.topicmapslab.majortom.model.core.ITopic type)
                                                                                           throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the associations played by the given topic and being typed by the given type.

Parameters:
t - the topic
type - the type
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadAssociation

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IAssociation> doReadAssociation(de.topicmapslab.majortom.model.core.ITopic t,
                                                                                                  de.topicmapslab.majortom.model.core.ITopic type,
                                                                                                  de.topicmapslab.majortom.model.core.IScope scope)
                                                                                           throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all scoped associations played by the given topic and being typed by the given type

Parameters:
t - the topic
type - the type
scope - the scope
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadAssociation

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IAssociation> doReadAssociation(de.topicmapslab.majortom.model.core.ITopic t,
                                                                                                  de.topicmapslab.majortom.model.core.IScope scope)
                                                                                           throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all scoped associations played by the given topic

Parameters:
t - the topic
scope - the scope
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadAssociation

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IAssociation> doReadAssociation(de.topicmapslab.majortom.model.core.ITopicMap tm)
                                                                                           throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all associations of the topic map.

Parameters:
tm - the topic map
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadAssociation

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IAssociation> doReadAssociation(de.topicmapslab.majortom.model.core.ITopicMap tm,
                                                                                                  de.topicmapslab.majortom.model.core.ITopic type)
                                                                                           throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all associations of the topic map being typed by the given type.

Parameters:
tm - the topic map
type - the type
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadAssociation

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IAssociation> doReadAssociation(de.topicmapslab.majortom.model.core.ITopicMap tm,
                                                                                                  de.topicmapslab.majortom.model.core.ITopic type,
                                                                                                  de.topicmapslab.majortom.model.core.IScope scope)
                                                                                           throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all scoped associations of the topic map being typed by the given type.

Parameters:
tm - the topic map
type - the type
scope - the scope
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadAssociation

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IAssociation> doReadAssociation(de.topicmapslab.majortom.model.core.ITopicMap tm,
                                                                                                  de.topicmapslab.majortom.model.core.IScope scope)
                                                                                           throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all scoped associations of the topic map.

Parameters:
tm - the topic map
scope - the scope
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadCharacteristics

public abstract java.util.Set<de.topicmapslab.majortom.model.core.ICharacteristics> doReadCharacteristics(de.topicmapslab.majortom.model.core.ITopic t)
                                                                                                   throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all characteristics if the given topic.

Parameters:
t - the topic
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadCharacteristics

public abstract java.util.Set<de.topicmapslab.majortom.model.core.ICharacteristics> doReadCharacteristics(de.topicmapslab.majortom.model.core.ITopic t,
                                                                                                          de.topicmapslab.majortom.model.core.ITopic type)
                                                                                                   throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all characteristics if the given topic being typed by the given type.

Parameters:
t - the topic
type - the type
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadCharacteristics

public abstract java.util.Set<de.topicmapslab.majortom.model.core.ICharacteristics> doReadCharacteristics(de.topicmapslab.majortom.model.core.ITopic t,
                                                                                                          de.topicmapslab.majortom.model.core.ITopic type,
                                                                                                          de.topicmapslab.majortom.model.core.IScope scope)
                                                                                                   throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all scoped characteristics if the given topic being typed by the given type.

Parameters:
t - the topic
type - the type
scope - the scope
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadCharacteristics

public abstract java.util.Set<de.topicmapslab.majortom.model.core.ICharacteristics> doReadCharacteristics(de.topicmapslab.majortom.model.core.ITopic t,
                                                                                                          de.topicmapslab.majortom.model.core.IScope scope)
                                                                                                   throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all scoped characteristics if the given topic.

Parameters:
t - the topic
scope - the scope
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadConstruct

public abstract de.topicmapslab.majortom.model.core.IConstruct doReadConstruct(de.topicmapslab.majortom.model.core.ITopicMap t,
                                                                               java.lang.String id)
                                                                        throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the construct identified by the given id.

Parameters:
t - the topic map
id -
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadConstruct

public abstract de.topicmapslab.majortom.model.core.IConstruct doReadConstruct(de.topicmapslab.majortom.model.core.ITopicMap t,
                                                                               de.topicmapslab.majortom.model.core.ILocator itemIdentifier)
                                                                        throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the construct identified by the given item-identifier.

Parameters:
t - the topic map
itemIdentifier -
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadDataType

public abstract de.topicmapslab.majortom.model.core.ILocator doReadDataType(de.topicmapslab.majortom.model.core.IDatatypeAware d)
                                                                     throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the data type of the given data-type-aware

Parameters:
d - the data-type-aware
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadId

public abstract java.lang.String doReadId(de.topicmapslab.majortom.model.core.IConstruct c)
                                   throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the id of the given construct

Parameters:
c - the construct
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadItemIdentifiers

public abstract java.util.Set<de.topicmapslab.majortom.model.core.ILocator> doReadItemIdentifiers(de.topicmapslab.majortom.model.core.IConstruct c)
                                                                                           throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all item-identifiers of the given construct

Parameters:
c - the construct
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadLocator

public de.topicmapslab.majortom.model.core.ILocator doReadLocator(de.topicmapslab.majortom.model.core.ITopicMap t)
                                                           throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the base locator of the given topic map.

Parameters:
t - the topic map
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadNames

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IName> doReadNames(de.topicmapslab.majortom.model.core.ITopic t)
                                                                              throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all names if the given topic.

Parameters:
t - the topic
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadNames

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IName> doReadNames(de.topicmapslab.majortom.model.core.ITopic t,
                                                                                     de.topicmapslab.majortom.model.core.ITopic type)
                                                                              throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all names if the given topic being typed by the given type.

Parameters:
t - the topic
type - the type
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadNames

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IName> doReadNames(de.topicmapslab.majortom.model.core.ITopic t,
                                                                                     de.topicmapslab.majortom.model.core.ITopic type,
                                                                                     de.topicmapslab.majortom.model.core.IScope scope)
                                                                              throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all scoped names if the given topic being typed by the given type.

Parameters:
t - the topic
type - the type
scope - the scope
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadNames

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IName> doReadNames(de.topicmapslab.majortom.model.core.ITopic t,
                                                                                     de.topicmapslab.majortom.model.core.IScope scope)
                                                                              throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all scoped names of the given topic where the scope matches exactly.

Parameters:
t - the topic
scope - the scope
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadFutureRevision

public abstract de.topicmapslab.majortom.model.revision.IRevision doReadFutureRevision(de.topicmapslab.majortom.model.revision.IRevision r)
                                                                                throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the previous revision of the revision.

Parameters:
r - the revision
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadOccurrences

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IOccurrence> doReadOccurrences(de.topicmapslab.majortom.model.core.ITopic t)
                                                                                          throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all occurrences if the given topic.

Parameters:
t - the topic
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadOccurrences

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IOccurrence> doReadOccurrences(de.topicmapslab.majortom.model.core.ITopic t,
                                                                                                 de.topicmapslab.majortom.model.core.ITopic type)
                                                                                          throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all occurrence if the given topic being typed by the given type.

Parameters:
t - the topic
type - the type
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadOccurrences

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IOccurrence> doReadOccurrences(de.topicmapslab.majortom.model.core.ITopic t,
                                                                                                 de.topicmapslab.majortom.model.core.ITopic type,
                                                                                                 de.topicmapslab.majortom.model.core.IScope scope)
                                                                                          throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all scoped occurrence if the given topic being typed by the given type.

Parameters:
t - the topic
type - the type
scope - the scope
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadOccurrences

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IOccurrence> doReadOccurrences(de.topicmapslab.majortom.model.core.ITopic t,
                                                                                                 de.topicmapslab.majortom.model.core.IScope scope)
                                                                                          throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all scoped occurrence if the given topic.

Parameters:
t - the topic
scope - the scope
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadPlayer

public abstract de.topicmapslab.majortom.model.core.ITopic doReadPlayer(de.topicmapslab.majortom.model.core.IAssociationRole role)
                                                                 throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the player of the given role

Parameters:
role - the role
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadPastRevision

public abstract de.topicmapslab.majortom.model.revision.IRevision doReadPastRevision(de.topicmapslab.majortom.model.revision.IRevision r)
                                                                              throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the past revision of the revision.

Parameters:
r - the revision
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadReification

public abstract de.topicmapslab.majortom.model.core.IReifiable doReadReification(de.topicmapslab.majortom.model.core.ITopic t)
                                                                          throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the reified item of the given topic.

Parameters:
t - the topic
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadReification

public abstract de.topicmapslab.majortom.model.core.ITopic doReadReification(de.topicmapslab.majortom.model.core.IReifiable r)
                                                                      throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the reifier of the reified construct

Parameters:
r - the reified item
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadRevisionTimestamp

public abstract java.util.Calendar doReadRevisionTimestamp(de.topicmapslab.majortom.model.revision.IRevision r)
                                                    throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the time-stamp of the revision begin.

Parameters:
r - the revision
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadChangeSet

public abstract de.topicmapslab.majortom.model.revision.Changeset doReadChangeSet(de.topicmapslab.majortom.model.revision.IRevision r)
                                                                           throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the change set of a revision.

Parameters:
r - the revision
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadRoles

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IAssociationRole> doReadRoles(de.topicmapslab.majortom.model.core.IAssociation association)
                                                                                         throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all association role items of the given association

Parameters:
association - the association
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadRoles

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IAssociationRole> doReadRoles(de.topicmapslab.majortom.model.core.IAssociation association,
                                                                                                de.topicmapslab.majortom.model.core.ITopic type)
                                                                                         throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all association role items of the given association and the given type.

Parameters:
association - the association
type - the role type
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadRoles

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IAssociationRole> doReadRoles(de.topicmapslab.majortom.model.core.ITopic player)
                                                                                         throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the played roles of the given topic.

Parameters:
player - the role player
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadRoles

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IAssociationRole> doReadRoles(de.topicmapslab.majortom.model.core.ITopic player,
                                                                                                de.topicmapslab.majortom.model.core.ITopic type)
                                                                                         throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the played roles of the given topic and being typed by the given type

Parameters:
player - the player
type - the role type
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadRoles

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IAssociationRole> doReadRoles(de.topicmapslab.majortom.model.core.ITopic player,
                                                                                                de.topicmapslab.majortom.model.core.ITopic type,
                                                                                                de.topicmapslab.majortom.model.core.ITopic assocType)
                                                                                         throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the played roles of the given topic and being typed by the given type

Parameters:
player - the player
type - the role type
assocType - the association type
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadRoleTypes

public abstract java.util.Set<de.topicmapslab.majortom.model.core.ITopic> doReadRoleTypes(de.topicmapslab.majortom.model.core.IAssociation association)
                                                                                   throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all role types of the given association

Parameters:
association - the association
Returns:
a set containing all role types
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadSubjectIdentifiers

public abstract java.util.Set<de.topicmapslab.majortom.model.core.ILocator> doReadSubjectIdentifiers(de.topicmapslab.majortom.model.core.ITopic t)
                                                                                              throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all subject-identifiers of the given topic.

Parameters:
t - the topic
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadSubjectLocators

public abstract java.util.Set<de.topicmapslab.majortom.model.core.ILocator> doReadSubjectLocators(de.topicmapslab.majortom.model.core.ITopic t)
                                                                                           throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all subject-locators of the given topic.

Parameters:
t - the topic
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadSuptertypes

public abstract java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> doReadSuptertypes(de.topicmapslab.majortom.model.core.ITopic t)
                                                                                            throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all super types of the given topic.

Parameters:
t - the topic
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadTopicBySubjectIdentifier

public abstract de.topicmapslab.majortom.model.core.ITopic doReadTopicBySubjectIdentifier(de.topicmapslab.majortom.model.core.ITopicMap t,
                                                                                          de.topicmapslab.majortom.model.core.ILocator subjectIdentifier)
                                                                                   throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the topic identified by the given subject-identifier.

Parameters:
t - the topic map
subjectIdentifier -
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadTopicBySubjectLocator

public abstract de.topicmapslab.majortom.model.core.ITopic doReadTopicBySubjectLocator(de.topicmapslab.majortom.model.core.ITopicMap t,
                                                                                       de.topicmapslab.majortom.model.core.ILocator subjectLocator)
                                                                                throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the topic identified by the given subject-locator.

Parameters:
t - the topic map
subjectLocator -
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadTopics

public abstract java.util.Set<de.topicmapslab.majortom.model.core.ITopic> doReadTopics(de.topicmapslab.majortom.model.core.ITopicMap t)
                                                                                throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Return all topics of the topic map.

Parameters:
t - the topic map
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadTopics

public abstract java.util.Set<de.topicmapslab.majortom.model.core.ITopic> doReadTopics(de.topicmapslab.majortom.model.core.ITopicMap t,
                                                                                       de.topicmapslab.majortom.model.core.ITopic type)
                                                                                throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Return all topics of the topic map being typed by the given type.

Parameters:
t - the topic map
type - the type
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadType

public abstract de.topicmapslab.majortom.model.core.ITopic doReadType(de.topicmapslab.majortom.model.core.ITypeable typed)
                                                               throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the type of the given typed item.

Parameters:
typed - the typed
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadChangeSetType

public abstract de.topicmapslab.majortom.model.event.TopicMapEventType doReadChangeSetType(de.topicmapslab.majortom.model.revision.IRevision revision)
                                                                                    throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the type of the given typed item.

Parameters:
typed - the typed
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails
Since:
1.1.2

doReadTypes

public abstract java.util.Set<de.topicmapslab.majortom.model.core.ITopic> doReadTypes(de.topicmapslab.majortom.model.core.ITopic t)
                                                                               throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read all types of the given type.

Parameters:
t - the topic
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadScope

public abstract de.topicmapslab.majortom.model.core.IScope doReadScope(de.topicmapslab.majortom.model.core.IScopable s)
                                                                throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the scope of the given scoped item

Parameters:
s - the scoped item
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadValue

public abstract java.lang.Object doReadValue(de.topicmapslab.majortom.model.core.IName n)
                                      throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the value of the topic name.

Parameters:
n - the name
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadValue

public abstract java.lang.Object doReadValue(de.topicmapslab.majortom.model.core.IDatatypeAware t)
                                      throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the value of the data-type-aware.

Parameters:
t - the data-type-aware
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadValue

public abstract <T> T doReadValue(de.topicmapslab.majortom.model.core.IDatatypeAware t,
                                  java.lang.Class<T> type)
                       throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the value of the data-type-aware and cast them to the given type

Type Parameters:
T - the type of the value
Parameters:
t - the data-type-aware
type - the type of the value
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadVariants

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IVariant> doReadVariants(de.topicmapslab.majortom.model.core.IName n)
                                                                                    throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the variants of the given name.

Parameters:
n - the name
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadVariants

public abstract java.util.Set<de.topicmapslab.majortom.model.core.IVariant> doReadVariants(de.topicmapslab.majortom.model.core.IName n,
                                                                                           de.topicmapslab.majortom.model.core.IScope scope)
                                                                                    throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the variants of the given name in the given scope.

Parameters:
n - the name
scope - the scope
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadMetaData

public abstract java.util.Map<java.lang.String,java.lang.String> doReadMetaData(de.topicmapslab.majortom.model.revision.IRevision revision)
                                                                         throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the whole meta data sets of the given revision

Parameters:
revision - the revision
Returns:
a map containing all key-value-pairs of the revisions meta data
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadMetaData

public abstract java.lang.String doReadMetaData(de.topicmapslab.majortom.model.revision.IRevision revision,
                                                java.lang.String key)
                                         throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Read the value of the meta set of the given revision identified by the given key.

Parameters:
revision - the revision
key - the key
Returns:
the value of the revision
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadBestLabel

public abstract java.lang.String doReadBestLabel(de.topicmapslab.majortom.model.core.ITopic topic)
                                          throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Returns the best label for the current topic instance. The best label will be identified satisfying the following rules in the given order.

1. Names of the default name type are weighted higher than names of other types.

2. Names with the unconstrained scope are weighted higher than other scoped names.

3. Names with a smaller number of scoping themes are weighted higher than others.

4. Names with a lexicographically smaller value are weighted higher than others.

5. If no names are existing, the subject-identifier with the lexicographically smallest reference are returned.

6. If no subject-identifiers are existing, the subject-locators with the lexicographically smallest reference are returned.

7. If no subject-locators are existing, the item-identifier with the lexicographically smallest reference are returned.

8. At least the ID of the topic will be returned.

Parameters:
topic - the topic
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails
Since:
1.1.2

doReadBestLabel

public abstract java.lang.String doReadBestLabel(de.topicmapslab.majortom.model.core.ITopic topic,
                                                 de.topicmapslab.majortom.model.core.ITopic theme,
                                                 boolean strict)
                                          throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Returns the best label for the current topic instance. The best label will be identified satisfying the following rules in the given order.

1. Names of the default name type are weighted higher than names of other types.

2. Names with the unconstrained scope are weighted higher than other scoped names.

3. Names with a smaller number of scoping themes are weighted higher than others.

4. Names with a lexicographically smaller value are weighted higher than others.

5. If no names are existing, the subject-identifier with the lexicographically smallest reference are returned.

6. If no subject-identifiers are existing, the subject-locators with the lexicographically smallest reference are returned.

7. If no subject-locators are existing, the item-identifier with the lexicographically smallest reference are returned.

8. At least the ID of the topic will be returned.

Parameters:
topic - the topic
theme - the theme
strict - if there is no name with the given theme and strict is true, then null will be returned.
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails
Since:
1.1.2

doReadBestIdentifier

public abstract java.lang.String doReadBestIdentifier(de.topicmapslab.majortom.model.core.ITopic topic,
                                                      boolean withPrefix)
Returns the best and stable identifier of the topic. The best identifier will be extracted by following rules.

1. Identifiers are weighted by its types in the following order subject-identifier, subject-locator and item-identifier.

2. If there are more than one identifier of the same type, the shortest will be returned.

3. If there are more than one identifier with the same length, the lexicographically smallest will be returned.

Parameters:
topic - the topic
withPrefix - flag indicates if the returned identifier will be prefixed with its type. Subject-identifier( si:), subject-locator(sl:) or item-identifier(ii:).
Returns:
the best identifier or the id if the topic has no identifiers
Since:
1.2.0

doRemove

public void doRemove(de.topicmapslab.majortom.model.core.IConstruct context,
                     de.topicmapslab.majortom.model.store.TopicMapStoreParameterType paramType,
                     java.lang.Object... params)
              throws de.topicmapslab.majortom.model.exception.TopicMapStoreException

Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException

doRemove

public void doRemove(de.topicmapslab.majortom.model.core.IConstruct context,
                     boolean cascade)
              throws de.topicmapslab.majortom.model.exception.TopicMapStoreException

Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException

removeDuplicates

public void removeDuplicates()


clear

public void clear()


clearCache

public void clearCache()
Clear the cache if it is used


commit

public void commit()


createTransaction

public de.topicmapslab.majortom.model.transaction.ITransaction createTransaction()


connect

public void connect()
             throws de.topicmapslab.majortom.model.exception.TopicMapStoreException

Specified by:
connect in interface de.topicmapslab.majortom.model.store.ITopicMapStore
Overrides:
connect in class TopicMapStoreImpl
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException

close

public void close()
           throws de.topicmapslab.majortom.model.exception.TopicMapStoreException

Specified by:
close in interface de.topicmapslab.majortom.model.store.ITopicMapStore
Overrides:
close in class TopicMapStoreImpl
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException

getCache

public Cache getCache()
Returning the cache

Returns:
the cache

enableCaching

public void enableCaching(boolean enable)
Enable the caching mechanism of the database topic map store. If the caching is enabled, the cache stores any read access and deliver the values from cache instead calling the database. The cache will be updated automatically. If the cache is disabled, it will be destroyed. Any cached values are lost.

Parameters:
enable - true to enable the cache, false to disable it

isCachingEnabled

public boolean isCachingEnabled()
Method returns the internal state of caching.

Returns:
true if caching is enabled, false otherwise.