de.topicmapslab.majortom.cache
Class Cache

java.lang.Object
  extended by de.topicmapslab.majortom.store.TopicMapStoreImpl
      extended by de.topicmapslab.majortom.store.ReadOnlyTopicMapStoreImpl
          extended by de.topicmapslab.majortom.cache.Cache
All Implemented Interfaces:
de.topicmapslab.majortom.model.store.ITopicMapStore

public class Cache
extends ReadOnlyTopicMapStoreImpl


Field Summary
private  ConstructCache cache
           
private  ReadOnlyTopicMapStoreImpl parentStore
          reference to the parent store
 
Fields inherited from class de.topicmapslab.majortom.store.TopicMapStoreImpl
OUTPUT
 
Constructor Summary
Cache(ReadOnlyTopicMapStoreImpl parentStore)
          constructor
 
Method Summary
 void clear()
          
 void clearMetaData(de.topicmapslab.majortom.model.revision.IRevision revision)
          Clear the meta data information for the given revision from internal cache
 void close()
          
 de.topicmapslab.majortom.model.core.ILocator doCreateLocator(de.topicmapslab.majortom.model.core.ITopicMap topicMap, java.lang.String reference)
          Create a locator instance.
 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
 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
 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
 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.
 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
 java.util.Set<de.topicmapslab.majortom.model.core.IAssociation> doReadAssociation(de.topicmapslab.majortom.model.core.ITopicMap tm)
          Read all associations of the topic map.
 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.
 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.
 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.
 java.lang.String doReadBestIdentifier(de.topicmapslab.majortom.model.core.ITopic topic, boolean withPrefix)
          Returns the best and stable identifier of the topic.
 java.lang.String doReadBestLabel(de.topicmapslab.majortom.model.core.ITopic topic)
          Returns the best label for the current topic instance.
 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.
 de.topicmapslab.majortom.model.revision.Changeset doReadChangeSet(de.topicmapslab.majortom.model.revision.IRevision r)
          Read the change set of a revision.
 de.topicmapslab.majortom.model.event.TopicMapEventType doReadChangeSetType(de.topicmapslab.majortom.model.revision.IRevision revision)
          Read the type of the given typed item.
 java.util.Set<de.topicmapslab.majortom.model.core.ICharacteristics> doReadCharacteristics(de.topicmapslab.majortom.model.core.ITopic t)
          Read all characteristics if the given topic.
 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.
 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.
 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.
 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.
 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.
 de.topicmapslab.majortom.model.core.ILocator doReadDataType(de.topicmapslab.majortom.model.core.IDatatypeAware c)
          Read the data type of the given data-type-aware
 de.topicmapslab.majortom.model.revision.IRevision doReadFutureRevision(de.topicmapslab.majortom.model.revision.IRevision r)
          Read the previous revision of the revision.
 java.lang.String doReadId(de.topicmapslab.majortom.model.core.IConstruct c)
          Read the id of the given construct
 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.
 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
 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.
 java.util.Set<de.topicmapslab.majortom.model.core.IName> doReadNames(de.topicmapslab.majortom.model.core.ITopic t)
          Read all names if the given topic.
 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.
 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.
 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.
 java.util.Set<de.topicmapslab.majortom.model.core.IOccurrence> doReadOccurrences(de.topicmapslab.majortom.model.core.ITopic t)
          Read all occurrences if the given topic.
 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.
 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.
 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.
 de.topicmapslab.majortom.model.revision.IRevision doReadPastRevision(de.topicmapslab.majortom.model.revision.IRevision r)
          Read the past revision of the revision.
 de.topicmapslab.majortom.model.core.ITopic doReadPlayer(de.topicmapslab.majortom.model.core.IAssociationRole role)
          Read the player of the given role
 de.topicmapslab.majortom.model.core.ITopic doReadReification(de.topicmapslab.majortom.model.core.IReifiable r)
          Read the reifier of the reified construct
 de.topicmapslab.majortom.model.core.IReifiable doReadReification(de.topicmapslab.majortom.model.core.ITopic t)
          Read the reified item of the given topic.
 java.util.Calendar doReadRevisionTimestamp(de.topicmapslab.majortom.model.revision.IRevision r)
          Read the time-stamp of the revision begin.
 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
 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.
 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.
 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
 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
 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
 de.topicmapslab.majortom.model.core.IScope doReadScope(de.topicmapslab.majortom.model.core.IScopable s)
          Read the scope of the given scoped item
 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.
 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.
 java.util.Set<de.topicmapslab.majortom.model.core.ITopic> doReadSuptertypes(de.topicmapslab.majortom.model.core.ITopic t)
          Read all super types of the given topic.
 de.topicmapslab.majortom.model.core.ITopic doReadTopicBySubjectIdentifier(de.topicmapslab.majortom.model.core.ITopicMap tm, de.topicmapslab.majortom.model.core.ILocator subjectIdentifier)
          Read the topic identified by the given subject-identifier.
 de.topicmapslab.majortom.model.core.ITopic doReadTopicBySubjectLocator(de.topicmapslab.majortom.model.core.ITopicMap tm, de.topicmapslab.majortom.model.core.ILocator subjectLocator)
          Read the topic identified by the given subject-locator.
 java.util.Set<de.topicmapslab.majortom.model.core.ITopic> doReadTopics(de.topicmapslab.majortom.model.core.ITopicMap t)
          Return all topics of the topic map.
 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.
 de.topicmapslab.majortom.model.core.ITopic doReadType(de.topicmapslab.majortom.model.core.ITypeable typed)
          Read the type of the given typed item.
 java.util.Set<de.topicmapslab.majortom.model.core.ITopic> doReadTypes(de.topicmapslab.majortom.model.core.ITopic t)
          Read all types of the given type.
 java.lang.Object doReadValue(de.topicmapslab.majortom.model.core.IDatatypeAware c)
          Read the value of the data-type-aware.
<T> T
doReadValue(de.topicmapslab.majortom.model.core.IDatatypeAware c, java.lang.Class<T> type)
          Read the value of the data-type-aware and cast them to the given type
 java.lang.Object doReadValue(de.topicmapslab.majortom.model.core.IName n)
          Read the value of the topic name.
 java.util.Set<de.topicmapslab.majortom.model.core.IVariant> doReadVariants(de.topicmapslab.majortom.model.core.IName n)
          Read the variants of the given name.
 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 enableCaching(boolean enable)
          Enable the caching mechanism of the database topic map store.
<I extends org.tmapi.index.Index>
I
getIndex(java.lang.Class<I> clazz)
          
 ReadOnlyTopicMapStoreImpl getParentStore()
           
 de.topicmapslab.majortom.model.core.ITopicMap getTopicMap()
          Returns the topic map
 de.topicmapslab.majortom.model.store.ITopicMapStoreIdentity getTopicMapIdentity()
          
 void initialize(org.tmapi.core.Locator topicMapBaseLocator)
          
 boolean isCachingEnabled()
          Method returns the internal state of caching.
 
Methods inherited from class de.topicmapslab.majortom.store.ReadOnlyTopicMapStoreImpl
clearCache, commit, connect, createTransaction, doCreate, doMerge, doModify, doRead, doRemove, doRemove, getCache, internalDoRead, removeDuplicates
 
Methods inherited from class de.topicmapslab.majortom.store.TopicMapStoreImpl
addTaskToThreadPool, addTopicMapListener, createConstructFactory, createMetaDataInstance, doAutomaticMerging, doMergingByTopicName, enableRevisionManagement, generateId, generateStringId, getConstructFactory, getListeners, getMetaData, getThreadPool, getTopicMapBaseLocator, getTopicMapBaseLocatorReference, getTopicMapSystem, 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
 

Field Detail

cache

private ConstructCache cache

parentStore

private final ReadOnlyTopicMapStoreImpl parentStore
reference to the parent store

Constructor Detail

Cache

public Cache(ReadOnlyTopicMapStoreImpl parentStore)
constructor

Parameters:
parentStore - the parent store
Method Detail

doReadAssociation

public 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

Specified by:
doReadAssociation in class ReadOnlyTopicMapStoreImpl
Parameters:
t - the topic
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadAssociation

public 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.

Specified by:
doReadAssociation in class ReadOnlyTopicMapStoreImpl
Parameters:
t - the topic
type - the type
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadAssociation

public 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

Specified by:
doReadAssociation in class ReadOnlyTopicMapStoreImpl
Parameters:
t - the topic
scope - the scope
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadAssociation

public 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

Specified by:
doReadAssociation in class ReadOnlyTopicMapStoreImpl
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 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.

Specified by:
doReadAssociation in class ReadOnlyTopicMapStoreImpl
Parameters:
tm - the topic map
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadAssociation

public 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.

Specified by:
doReadAssociation in class ReadOnlyTopicMapStoreImpl
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 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.

Specified by:
doReadAssociation in class ReadOnlyTopicMapStoreImpl
Parameters:
tm - the topic map
scope - the scope
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadAssociation

public 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.

Specified by:
doReadAssociation in class ReadOnlyTopicMapStoreImpl
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

doReadCharacteristics

public 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.

Specified by:
doReadCharacteristics in class ReadOnlyTopicMapStoreImpl
Parameters:
t - the topic
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadCharacteristics

public 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.

Specified by:
doReadCharacteristics in class ReadOnlyTopicMapStoreImpl
Parameters:
t - the topic
type - the type
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadCharacteristics

public 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.

Specified by:
doReadCharacteristics in class ReadOnlyTopicMapStoreImpl
Parameters:
t - the topic
scope - the scope
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadCharacteristics

public 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.

Specified by:
doReadCharacteristics in class ReadOnlyTopicMapStoreImpl
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

doReadConstruct

public 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.

Specified by:
doReadConstruct in class ReadOnlyTopicMapStoreImpl
Parameters:
t - the topic map
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadConstruct

public 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.

Specified by:
doReadConstruct in class ReadOnlyTopicMapStoreImpl
Parameters:
t - the topic map
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadDataType

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

Specified by:
doReadDataType in class ReadOnlyTopicMapStoreImpl
Parameters:
c - the data-type-aware
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadId

public 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

Specified by:
doReadId in class ReadOnlyTopicMapStoreImpl
Parameters:
c - the construct
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadItemIdentifiers

public 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

Specified by:
doReadItemIdentifiers in class ReadOnlyTopicMapStoreImpl
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.

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

doReadNames

public 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.

Specified by:
doReadNames in class ReadOnlyTopicMapStoreImpl
Parameters:
t - the topic
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadNames

public 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.

Specified by:
doReadNames in class ReadOnlyTopicMapStoreImpl
Parameters:
t - the topic
type - the type
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadNames

public 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.

Specified by:
doReadNames in class ReadOnlyTopicMapStoreImpl
Parameters:
t - the topic
scope - the scope
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadNames

public 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.

Specified by:
doReadNames in class ReadOnlyTopicMapStoreImpl
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 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.

Specified by:
doReadOccurrences in class ReadOnlyTopicMapStoreImpl
Parameters:
t - the topic
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadOccurrences

public 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.

Specified by:
doReadOccurrences in class ReadOnlyTopicMapStoreImpl
Parameters:
t - the topic
type - the type
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadOccurrences

public 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.

Specified by:
doReadOccurrences in class ReadOnlyTopicMapStoreImpl
Parameters:
t - the topic
scope - the scope
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadOccurrences

public 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.

Specified by:
doReadOccurrences in class ReadOnlyTopicMapStoreImpl
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

doReadPlayer

public 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

Specified by:
doReadPlayer in class ReadOnlyTopicMapStoreImpl
Parameters:
role - the role
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadReification

public 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.

Specified by:
doReadReification in class ReadOnlyTopicMapStoreImpl
Parameters:
t - the topic
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadReification

public 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

Specified by:
doReadReification in class ReadOnlyTopicMapStoreImpl
Parameters:
r - the reified item
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadRoleTypes

public 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

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

doReadRoles

public 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

Specified by:
doReadRoles in class ReadOnlyTopicMapStoreImpl
Parameters:
association - the association
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadRoles

public 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.

Specified by:
doReadRoles in class ReadOnlyTopicMapStoreImpl
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 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.

Specified by:
doReadRoles in class ReadOnlyTopicMapStoreImpl
Parameters:
player - the role player
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadRoles

public 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

Specified by:
doReadRoles in class ReadOnlyTopicMapStoreImpl
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 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

Specified by:
doReadRoles in class ReadOnlyTopicMapStoreImpl
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

doReadScope

public 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

Specified by:
doReadScope in class ReadOnlyTopicMapStoreImpl
Parameters:
s - the scoped item
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadSubjectIdentifiers

public 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.

Specified by:
doReadSubjectIdentifiers in class ReadOnlyTopicMapStoreImpl
Parameters:
t - the topic
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadSubjectLocators

public 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.

Specified by:
doReadSubjectLocators in class ReadOnlyTopicMapStoreImpl
Parameters:
t - the topic
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadSuptertypes

public java.util.Set<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.

Specified by:
doReadSuptertypes in class ReadOnlyTopicMapStoreImpl
Parameters:
t - the topic
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadTopicBySubjectIdentifier

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

Specified by:
doReadTopicBySubjectIdentifier in class ReadOnlyTopicMapStoreImpl
Parameters:
tm - the topic map
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadTopicBySubjectLocator

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

Specified by:
doReadTopicBySubjectLocator in class ReadOnlyTopicMapStoreImpl
Parameters:
tm - the topic map
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadTopics

public 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.

Specified by:
doReadTopics in class ReadOnlyTopicMapStoreImpl
Parameters:
t - the topic map
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadTopics

public 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.

Specified by:
doReadTopics in class ReadOnlyTopicMapStoreImpl
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 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.

Specified by:
doReadType in class ReadOnlyTopicMapStoreImpl
Parameters:
typed - the typed
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadTypes

public 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.

Specified by:
doReadTypes in class ReadOnlyTopicMapStoreImpl
Parameters:
t - the topic
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadValue

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

Specified by:
doReadValue in class ReadOnlyTopicMapStoreImpl
Parameters:
c - the data-type-aware
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadValue

public <T> T doReadValue(de.topicmapslab.majortom.model.core.IDatatypeAware c,
                         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

Specified by:
doReadValue in class ReadOnlyTopicMapStoreImpl
Type Parameters:
T - the type of the value
Parameters:
c - 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

doReadValue

public 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.

Specified by:
doReadValue in class ReadOnlyTopicMapStoreImpl
Parameters:
n - the name
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadVariants

public 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.

Specified by:
doReadVariants in class ReadOnlyTopicMapStoreImpl
Parameters:
n - the name
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadVariants

public 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.

Specified by:
doReadVariants in class ReadOnlyTopicMapStoreImpl
Parameters:
n - the name
scope - the scope
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

initialize

public void initialize(org.tmapi.core.Locator topicMapBaseLocator)
                throws de.topicmapslab.majortom.model.exception.TopicMapStoreException

Specified by:
initialize in interface de.topicmapslab.majortom.model.store.ITopicMapStore
Overrides:
initialize 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 ReadOnlyTopicMapStoreImpl
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException

getIndex

public <I extends org.tmapi.index.Index> I getIndex(java.lang.Class<I> clazz)


getTopicMap

public de.topicmapslab.majortom.model.core.ITopicMap getTopicMap()
Returns the topic map

Specified by:
getTopicMap in interface de.topicmapslab.majortom.model.store.ITopicMapStore
Overrides:
getTopicMap in class TopicMapStoreImpl
Returns:
the topicMap

doReadFutureRevision

public 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.

Specified by:
doReadFutureRevision in class ReadOnlyTopicMapStoreImpl
Parameters:
r - the revision
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadPastRevision

public 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.

Specified by:
doReadPastRevision in class ReadOnlyTopicMapStoreImpl
Parameters:
r - the revision
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadRevisionTimestamp

public 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.

Specified by:
doReadRevisionTimestamp in class ReadOnlyTopicMapStoreImpl
Parameters:
r - the revision
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadChangeSet

public 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.

Specified by:
doReadChangeSet in class ReadOnlyTopicMapStoreImpl
Parameters:
r - the revision
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadChangeSetType

public 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.

Specified by:
doReadChangeSetType in class ReadOnlyTopicMapStoreImpl
Returns:
the read information
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadMetaData

public 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

Specified by:
doReadMetaData in class ReadOnlyTopicMapStoreImpl
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 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.

Specified by:
doReadMetaData in class ReadOnlyTopicMapStoreImpl
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 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.

Specified by:
doReadBestLabel in class ReadOnlyTopicMapStoreImpl
Parameters:
topic - the topic
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doReadBestLabel

public 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.

Specified by:
doReadBestLabel in class ReadOnlyTopicMapStoreImpl
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

doReadBestIdentifier

public 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.

Specified by:
doReadBestIdentifier in class ReadOnlyTopicMapStoreImpl
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

doCreateLocator

public 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
Description copied from class: ReadOnlyTopicMapStoreImpl
Create a locator instance.

Specified by:
doCreateLocator in class ReadOnlyTopicMapStoreImpl
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 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
Description copied from class: ReadOnlyTopicMapStoreImpl
Create the internal scope object representing the collection of themes

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

getParentStore

public ReadOnlyTopicMapStoreImpl getParentStore()
Returns:
the parentStore

clear

public void clear()

Specified by:
clear in interface de.topicmapslab.majortom.model.store.ITopicMapStore
Overrides:
clear in class ReadOnlyTopicMapStoreImpl

getTopicMapIdentity

public de.topicmapslab.majortom.model.store.ITopicMapStoreIdentity getTopicMapIdentity()


clearMetaData

public void clearMetaData(de.topicmapslab.majortom.model.revision.IRevision revision)
Clear the meta data information for the given revision from internal cache

Parameters:
revision - the revision

isCachingEnabled

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

Specified by:
isCachingEnabled in interface de.topicmapslab.majortom.model.store.ITopicMapStore
Overrides:
isCachingEnabled in class ReadOnlyTopicMapStoreImpl
Returns:
true if caching is enabled, false otherwise.

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.

Specified by:
enableCaching in interface de.topicmapslab.majortom.model.store.ITopicMapStore
Overrides:
enableCaching in class ReadOnlyTopicMapStoreImpl
Parameters:
enable - true to enable the cache, false to disable it