de.topicmapslab.majortom.store
Class ModifableTopicMapStoreImpl

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

public abstract class ModifableTopicMapStoreImpl
extends ReadOnlyTopicMapStoreImpl

Implementation of Topic Map Store which allows any read and write access to the underlying data storage.

Author:
Sven Krosse

Field Summary
 
Fields inherited from class de.topicmapslab.majortom.store.TopicMapStoreImpl
OUTPUT
 
Constructor Summary
ModifableTopicMapStoreImpl()
          constructor
ModifableTopicMapStoreImpl(de.topicmapslab.majortom.model.core.ITopicMapSystem topicMapSystem)
          constructor
 
Method Summary
protected  de.topicmapslab.majortom.model.core.ITopic checkMergeConditionOfItemIdentifier(de.topicmapslab.majortom.model.core.IConstruct c, de.topicmapslab.majortom.model.core.ILocator identifier)
          Method checks if there is another with the item-identifier
protected  de.topicmapslab.majortom.model.core.ITopic checkMergeConditionOfSubjectIdentifier(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.ILocator identifier)
          Method checks if there is another with the subject-identifier
protected  de.topicmapslab.majortom.model.core.ITopic checkMergeConditionOfSubjectLocator(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.ILocator identifier)
          Method checks if there is another with the subject-locator
protected  void checkMergeConstraint(de.topicmapslab.majortom.model.core.ITopic context, de.topicmapslab.majortom.model.core.ITopic other)
          Method checks the merging constraints.
protected  void checkReificationConstraintBeforeModification(de.topicmapslab.majortom.model.core.IReifiable r, de.topicmapslab.majortom.model.core.ITopic reifier)
          Checks the reification constraint before calling modification method.
 void clear()
          
private static java.util.Set<de.topicmapslab.majortom.model.core.ITopic> convert(org.tmapi.core.Topic[] array)
          Transform the given array to a set of the specific type.
protected abstract  de.topicmapslab.majortom.model.revision.IRevision createRevision(de.topicmapslab.majortom.model.event.TopicMapEventType type)
          Creating a new revision object.
protected  void createSupertypeSubtypeAssociation(de.topicmapslab.majortom.model.core.ITopic type, de.topicmapslab.majortom.model.core.ITopic supertype, de.topicmapslab.majortom.model.revision.IRevision revision)
          Create the specific association of the topic maps data model representing a supertype-subtype relation between the given topics.
protected  void createTypeInstanceAssociation(de.topicmapslab.majortom.model.core.ITopic instance, de.topicmapslab.majortom.model.core.ITopic type, de.topicmapslab.majortom.model.revision.IRevision revision)
          Create the specific association of the topic maps data model representing a type-instance relation between the given topics.
 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.IAssociation doCreateAssociation(de.topicmapslab.majortom.model.core.ITopicMap topicMap, de.topicmapslab.majortom.model.core.ITopic type)
          Create a new association item.
protected abstract  de.topicmapslab.majortom.model.core.IAssociation doCreateAssociation(de.topicmapslab.majortom.model.core.ITopicMap topicMap, de.topicmapslab.majortom.model.core.ITopic type, java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
          Create a new association item.
protected abstract  de.topicmapslab.majortom.model.core.ILocator doCreateItemIdentifier(de.topicmapslab.majortom.model.core.ITopicMap topicMap)
          Creates an internal item-identifier for a construct.
protected abstract  de.topicmapslab.majortom.model.core.IName doCreateName(de.topicmapslab.majortom.model.core.ITopic topic, de.topicmapslab.majortom.model.core.ITopic type, java.lang.String value)
          Create a new name characteristics item.
protected abstract  de.topicmapslab.majortom.model.core.IName doCreateName(de.topicmapslab.majortom.model.core.ITopic topic, de.topicmapslab.majortom.model.core.ITopic type, java.lang.String value, java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
          Create a new name characteristics item.
protected abstract  de.topicmapslab.majortom.model.core.IName doCreateName(de.topicmapslab.majortom.model.core.ITopic topic, java.lang.String value)
          Create a new name characteristics item.
protected abstract  de.topicmapslab.majortom.model.core.IName doCreateName(de.topicmapslab.majortom.model.core.ITopic topic, java.lang.String value, java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
          Create a new name characteristics item.
protected abstract  de.topicmapslab.majortom.model.core.IOccurrence doCreateOccurrence(de.topicmapslab.majortom.model.core.ITopic topic, de.topicmapslab.majortom.model.core.ITopic type, de.topicmapslab.majortom.model.core.ILocator value)
          Create a new occurrence characteristics item.
protected abstract  de.topicmapslab.majortom.model.core.IOccurrence doCreateOccurrence(de.topicmapslab.majortom.model.core.ITopic topic, de.topicmapslab.majortom.model.core.ITopic type, de.topicmapslab.majortom.model.core.ILocator value, java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
          Create a new occurrence characteristics item.
protected abstract  de.topicmapslab.majortom.model.core.IOccurrence doCreateOccurrence(de.topicmapslab.majortom.model.core.ITopic topic, de.topicmapslab.majortom.model.core.ITopic type, java.lang.String value)
          Create a new occurrence characteristics item.
protected abstract  de.topicmapslab.majortom.model.core.IOccurrence doCreateOccurrence(de.topicmapslab.majortom.model.core.ITopic topic, de.topicmapslab.majortom.model.core.ITopic type, java.lang.String value, java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
          Create a new occurrence characteristics item.
protected abstract  de.topicmapslab.majortom.model.core.IOccurrence doCreateOccurrence(de.topicmapslab.majortom.model.core.ITopic topic, de.topicmapslab.majortom.model.core.ITopic type, java.lang.String value, de.topicmapslab.majortom.model.core.ILocator datatype)
          Create a new occurrence characteristics item.
protected abstract  de.topicmapslab.majortom.model.core.IOccurrence doCreateOccurrence(de.topicmapslab.majortom.model.core.ITopic topic, de.topicmapslab.majortom.model.core.ITopic type, java.lang.String value, de.topicmapslab.majortom.model.core.ILocator datatype, java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
          Create a new occurrence characteristics item.
protected abstract  de.topicmapslab.majortom.model.core.IAssociationRole doCreateRole(de.topicmapslab.majortom.model.core.IAssociation association, de.topicmapslab.majortom.model.core.ITopic type, de.topicmapslab.majortom.model.core.ITopic player)
          Create a new association role item.
protected abstract  de.topicmapslab.majortom.model.core.ITopic doCreateTopicByItemIdentifier(de.topicmapslab.majortom.model.core.ITopicMap topicMap, de.topicmapslab.majortom.model.core.ILocator itemIdentifier)
          Create a new topic item.
protected abstract  de.topicmapslab.majortom.model.core.ITopic doCreateTopicBySubjectIdentifier(de.topicmapslab.majortom.model.core.ITopicMap topicMap, de.topicmapslab.majortom.model.core.ILocator subjectIdentifier)
          Create a new topic item.
protected abstract  de.topicmapslab.majortom.model.core.ITopic doCreateTopicBySubjectLocator(de.topicmapslab.majortom.model.core.ITopicMap topicMap, de.topicmapslab.majortom.model.core.ILocator subjectLocator)
          Create a new topic item.
protected abstract  de.topicmapslab.majortom.model.core.ITopic doCreateTopicWithoutIdentifier(de.topicmapslab.majortom.model.core.ITopicMap topicMap)
          Create a new topic item without any identifier.
protected abstract  de.topicmapslab.majortom.model.core.IVariant doCreateVariant(de.topicmapslab.majortom.model.core.IName name, de.topicmapslab.majortom.model.core.ILocator value, java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
          Create a new variant for the given name.
protected abstract  de.topicmapslab.majortom.model.core.IVariant doCreateVariant(de.topicmapslab.majortom.model.core.IName name, java.lang.String value, java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
          Create a new variant for the given name.
protected abstract  de.topicmapslab.majortom.model.core.IVariant doCreateVariant(de.topicmapslab.majortom.model.core.IName name, java.lang.String value, de.topicmapslab.majortom.model.core.ILocator datatype, java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
          Create a new variant for the given name.
<T extends org.tmapi.core.Construct>
void
doMerge(T context, T... others)
          
protected abstract  void doMergeTopicMaps(org.tmapi.core.TopicMap context, org.tmapi.core.TopicMap other)
          Merge a topic map in the given topic map.
protected abstract  void doMergeTopics(de.topicmapslab.majortom.model.core.ITopic context, de.topicmapslab.majortom.model.core.ITopic other)
          Merge a topic in the given topic
 void doModify(de.topicmapslab.majortom.model.core.IConstruct context, de.topicmapslab.majortom.model.store.TopicMapStoreParameterType paramType, java.lang.Object... params)
          
protected abstract  void doModifyItemIdentifier(de.topicmapslab.majortom.model.core.IConstruct c, de.topicmapslab.majortom.model.core.ILocator itemIdentifier)
          Add a new item-identifier to the given construct
protected abstract  void doModifyMetaData(de.topicmapslab.majortom.model.revision.IRevision revision, java.lang.String key, java.lang.String value)
          Add a new meta data set to the given revision
protected abstract  void doModifyPlayer(de.topicmapslab.majortom.model.core.IAssociationRole role, de.topicmapslab.majortom.model.core.ITopic player)
          Modify the player of the given role.
protected abstract  void doModifyReifier(de.topicmapslab.majortom.model.core.IReifiable r, de.topicmapslab.majortom.model.core.ITopic reifier)
          Modify the reifier of the given reified item.
protected abstract  void doModifyScope(de.topicmapslab.majortom.model.core.IScopable s, de.topicmapslab.majortom.model.core.ITopic theme)
          Add a new theme to the given scoped item.
protected abstract  void doModifySubjectIdentifier(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.ILocator subjectIdentifier)
          Add a new subject-identifier to the given topic
protected abstract  void doModifySubjectLocator(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.ILocator subjectLocator)
          Add a new subject-locator to the given topic
protected abstract  void doModifySupertype(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.ITopic type)
          Add a new super type to the given topic
protected abstract  void doModifyTag(de.topicmapslab.majortom.model.core.ITopicMap tm, java.lang.String tag)
          Add a new tag to the given topic map for the current time stamp
protected abstract  void doModifyTag(de.topicmapslab.majortom.model.core.ITopicMap tm, java.lang.String tag, java.util.Calendar timestamp)
          Add a new tag to the given topic map for the given time stamp
protected abstract  void doModifyTopicType(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.ITopic type)
          Add a new type to the given topic.
protected abstract  void doModifyType(de.topicmapslab.majortom.model.core.ITypeable t, de.topicmapslab.majortom.model.core.ITopic type)
          Modify the type of the given typed item.
protected abstract  void doModifyValue(de.topicmapslab.majortom.model.core.IDatatypeAware t, java.lang.Object value)
          Modify the value and the data type of the given data-type-aware.
protected abstract  void doModifyValue(de.topicmapslab.majortom.model.core.IDatatypeAware t, java.lang.String value)
          Modify the value of the given data-type-aware.
protected abstract  void doModifyValue(de.topicmapslab.majortom.model.core.IDatatypeAware t, java.lang.String value, de.topicmapslab.majortom.model.core.ILocator datatype)
          Modify the value and the data type of the given data-type-aware.
protected abstract  void doModifyValue(de.topicmapslab.majortom.model.core.IName n, java.lang.String value)
          Modify the value of the given name.
 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)
          
protected abstract  void doRemoveAssociation(de.topicmapslab.majortom.model.core.IAssociation association, boolean cascade)
          Remove the association.
protected abstract  void doRemoveItemIdentifier(de.topicmapslab.majortom.model.core.IConstruct c, de.topicmapslab.majortom.model.core.ILocator itemIdentifier)
          Remove the given item identifier from the given construct.
protected abstract  void doRemoveName(de.topicmapslab.majortom.model.core.IName name, boolean cascade)
          Remove the name.
protected abstract  void doRemoveOccurrence(de.topicmapslab.majortom.model.core.IOccurrence occurrence, boolean cascade)
          Remove the occurrence.
protected abstract  void doRemoveRole(de.topicmapslab.majortom.model.core.IAssociationRole role, boolean cascade)
          Remove the association role.
protected abstract  void doRemoveScope(de.topicmapslab.majortom.model.core.IScopable s, de.topicmapslab.majortom.model.core.ITopic theme)
          Remove the theme from the given scoped item.
protected abstract  void doRemoveSubjectIdentifier(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.ILocator subjectIdentifier)
          Remove the subject-identifier from the given topic.
protected abstract  void doRemoveSubjectLocator(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.ILocator subjectLocator)
          Remove the subject-locator from the given topic.
protected abstract  void doRemoveSupertype(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.ITopic type)
          Remove the type from the given topic.
protected abstract  void doRemoveTopic(de.topicmapslab.majortom.model.core.ITopic topic, boolean cascade)
          Remove the topic.
protected abstract  void doRemoveTopicMap(de.topicmapslab.majortom.model.core.ITopicMap topicMap, boolean cascade)
          Remove the topic map.
protected abstract  void doRemoveType(de.topicmapslab.majortom.model.core.ITopic t, de.topicmapslab.majortom.model.core.ITopic type)
          Remove the super type from the given topic.
protected abstract  void doRemoveVariant(de.topicmapslab.majortom.model.core.IVariant variant, boolean cascade)
          Remove the variant.
 boolean existsTmdmDefaultNameType()
          Check if the topic type representing the default name type of the topic map data model exists.
 boolean existsTmdmInstanceRoleType()
          Check if the topic type representing the instance association role type of the topic map data model exists.
 boolean existsTmdmSubtypeRoleType()
          Check if the topic type representing the subtype association role type of the topic map data model exists.
 boolean existsTmdmSupertypeRoleType()
          Check if the topic type representing the supertype association role type of the topic map data model exists.
 boolean existsTmdmSupertypeSubtypeAssociationType()
          Check if the topic type representing the supertype-subtype association type of the topic map data model exists.
 boolean existsTmdmTypeInstanceAssociationType()
          Check if the topic type representing the type-instance association type of the topic map data model exists.
 boolean existsTmdmTypeRoleType()
          Check if the topic type representing the type association role type of the topic map data model exists.
 de.topicmapslab.majortom.model.core.ITopic getTmdmDefaultNameType()
          Returns the topic type representing the default name type of the topic map data model.
 de.topicmapslab.majortom.model.core.ITopic getTmdmInstanceRoleType()
          Returns the topic type representing the instance association role type of the topic map data model.
 de.topicmapslab.majortom.model.core.ITopic getTmdmSubtypeRoleType()
          Returns the topic type representing the subtype association role type of the topic map data model.
 de.topicmapslab.majortom.model.core.ITopic getTmdmSupertypeRoleType()
          Returns the topic type representing the supertype association role type of the topic map data model.
 de.topicmapslab.majortom.model.core.ITopic getTmdmSupertypeSubtypeAssociationType()
          Returns the topic type representing the supertype-subtype association type of the topic map data model.
 de.topicmapslab.majortom.model.core.ITopic getTmdmTypeInstanceAssociationType()
          Returns the topic type representing the type-instance association type of the topic map data model.
 de.topicmapslab.majortom.model.core.ITopic getTmdmTypeRoleType()
          Returns the topic type representing the type association role type of the topic map data model.
protected  boolean isTopicInUse(de.topicmapslab.majortom.model.core.ITopic topic)
          Method checks if the topic is used by any topic map relation.
protected  boolean isTopicUsedAsPlayer(de.topicmapslab.majortom.model.core.ITopic topic)
          Checks if the topic is used as player by any association item.
protected  boolean isTopicUsedAsReifier(de.topicmapslab.majortom.model.core.ITopic topic)
          Checks if the topic is used as reifier and reification is restricted for deletion
protected  boolean isTopicUsedAsSupertype(de.topicmapslab.majortom.model.core.ITopic topic)
          Checks if the topic is used as supertype by any topic item.
protected  boolean isTopicUsedAsTheme(de.topicmapslab.majortom.model.core.ITopic topic)
          Checks if the topic is used as theme by any scoped item.
protected  boolean isTopicUsedAsType(de.topicmapslab.majortom.model.core.ITopic topic)
          Checks if the topic is used as type by any typed item.
 void removeDuplicates()
          
protected  void removeSupertypeSubtypeAssociation(de.topicmapslab.majortom.model.core.ITopic type, de.topicmapslab.majortom.model.core.ITopic supertype, de.topicmapslab.majortom.model.revision.IRevision revision)
          Removes the corresponding association of the supertype-subtype relation between the given topics.
protected  void removeTypeInstanceAssociation(de.topicmapslab.majortom.model.core.ITopic instance, de.topicmapslab.majortom.model.core.ITopic type, de.topicmapslab.majortom.model.revision.IRevision revision)
          Removes the corresponding association of the type-instance relation between the given topics.
abstract  void storeRevision(de.topicmapslab.majortom.model.revision.IRevision revision, de.topicmapslab.majortom.model.event.TopicMapEventType type, de.topicmapslab.majortom.model.core.IConstruct context, java.lang.Object newValue, java.lang.Object oldValue)
          Store a change set for the given revision.
 void storeRevision(de.topicmapslab.majortom.model.event.TopicMapEventType type, de.topicmapslab.majortom.model.core.IConstruct context, java.lang.Object newValue, java.lang.Object oldValue)
          Store a change set for the given revision.
 
Methods inherited from class de.topicmapslab.majortom.store.ReadOnlyTopicMapStoreImpl
clearCache, close, commit, connect, createTransaction, doCreateLocator, doCreateScope, doRead, doReadAssociation, doReadAssociation, doReadAssociation, doReadAssociation, doReadAssociation, doReadAssociation, doReadAssociation, doReadAssociation, doReadBestIdentifier, doReadBestLabel, doReadBestLabel, doReadChangeSet, doReadChangeSetType, doReadCharacteristics, doReadCharacteristics, doReadCharacteristics, doReadCharacteristics, doReadConstruct, doReadConstruct, doReadDataType, doReadFutureRevision, doReadId, doReadItemIdentifiers, doReadLocator, doReadMetaData, doReadMetaData, doReadNames, doReadNames, doReadNames, doReadNames, doReadOccurrences, doReadOccurrences, doReadOccurrences, doReadOccurrences, doReadPastRevision, doReadPlayer, doReadReification, doReadReification, doReadRevisionTimestamp, doReadRoles, doReadRoles, doReadRoles, doReadRoles, doReadRoles, doReadRoleTypes, doReadScope, doReadSubjectIdentifiers, doReadSubjectLocators, doReadSuptertypes, doReadTopicBySubjectIdentifier, doReadTopicBySubjectLocator, doReadTopics, doReadTopics, doReadType, doReadTypes, doReadValue, doReadValue, doReadValue, doReadVariants, doReadVariants, enableCaching, getCache, internalDoRead, isCachingEnabled
 
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
 

Constructor Detail

ModifableTopicMapStoreImpl

public ModifableTopicMapStoreImpl()
constructor


ModifableTopicMapStoreImpl

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

Parameters:
topicMapSystem - the parent system
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

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

doCreateItemIdentifier

protected abstract de.topicmapslab.majortom.model.core.ILocator doCreateItemIdentifier(de.topicmapslab.majortom.model.core.ITopicMap topicMap)
Creates an internal item-identifier for a construct.

Parameters:
topicMap - the topic map
Returns:
the created item-identifier

doCreateAssociation

protected abstract de.topicmapslab.majortom.model.core.IAssociation doCreateAssociation(de.topicmapslab.majortom.model.core.ITopicMap topicMap,
                                                                                        de.topicmapslab.majortom.model.core.ITopic type)
                                                                                 throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new association item.

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

doCreateAssociation

protected abstract de.topicmapslab.majortom.model.core.IAssociation doCreateAssociation(de.topicmapslab.majortom.model.core.ITopicMap topicMap,
                                                                                        de.topicmapslab.majortom.model.core.ITopic type,
                                                                                        java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
                                                                                 throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new association item.

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

doCreateName

protected abstract de.topicmapslab.majortom.model.core.IName doCreateName(de.topicmapslab.majortom.model.core.ITopic topic,
                                                                          java.lang.String value)
                                                                   throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new name characteristics item.

Parameters:
topic - the parent topic
value - the characteristics value
Returns:
the created construct
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doCreateName

protected abstract de.topicmapslab.majortom.model.core.IName doCreateName(de.topicmapslab.majortom.model.core.ITopic topic,
                                                                          java.lang.String value,
                                                                          java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
                                                                   throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new name characteristics item.

Parameters:
topic - the parent topic
value - the characteristics value
themes - the scoping themes
Returns:
the created construct
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doCreateName

protected abstract de.topicmapslab.majortom.model.core.IName doCreateName(de.topicmapslab.majortom.model.core.ITopic topic,
                                                                          de.topicmapslab.majortom.model.core.ITopic type,
                                                                          java.lang.String value)
                                                                   throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new name characteristics item.

Parameters:
topic - the parent topic
type - the type
value - the characteristics value
Returns:
the created construct
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doCreateName

protected abstract de.topicmapslab.majortom.model.core.IName doCreateName(de.topicmapslab.majortom.model.core.ITopic topic,
                                                                          de.topicmapslab.majortom.model.core.ITopic type,
                                                                          java.lang.String value,
                                                                          java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
                                                                   throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new name characteristics item.

Parameters:
topic - the parent topic
type - the type
value - the characteristics value
themes - the scoping themes
Returns:
the created construct
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doCreateOccurrence

protected abstract de.topicmapslab.majortom.model.core.IOccurrence doCreateOccurrence(de.topicmapslab.majortom.model.core.ITopic topic,
                                                                                      de.topicmapslab.majortom.model.core.ITopic type,
                                                                                      java.lang.String value)
                                                                               throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new occurrence characteristics item.

Parameters:
topic - the parent topic
type - the type
value - the characteristics value
Returns:
the created construct
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doCreateOccurrence

protected abstract de.topicmapslab.majortom.model.core.IOccurrence doCreateOccurrence(de.topicmapslab.majortom.model.core.ITopic topic,
                                                                                      de.topicmapslab.majortom.model.core.ITopic type,
                                                                                      java.lang.String value,
                                                                                      java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
                                                                               throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new occurrence characteristics item.

Parameters:
topic - the parent topic
type - the type
value - the characteristics value
themes - the scoping themes
Returns:
the created construct
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doCreateOccurrence

protected abstract de.topicmapslab.majortom.model.core.IOccurrence doCreateOccurrence(de.topicmapslab.majortom.model.core.ITopic topic,
                                                                                      de.topicmapslab.majortom.model.core.ITopic type,
                                                                                      de.topicmapslab.majortom.model.core.ILocator value)
                                                                               throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new occurrence characteristics item.

Parameters:
topic - the parent topic
type - the type
value - the characteristics value
Returns:
the created construct
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doCreateOccurrence

protected abstract de.topicmapslab.majortom.model.core.IOccurrence doCreateOccurrence(de.topicmapslab.majortom.model.core.ITopic topic,
                                                                                      de.topicmapslab.majortom.model.core.ITopic type,
                                                                                      de.topicmapslab.majortom.model.core.ILocator value,
                                                                                      java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
                                                                               throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new occurrence characteristics item.

Parameters:
topic - the parent topic
type - the type
value - the characteristics value
themes - the scoping themes
Returns:
the created construct
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doCreateOccurrence

protected abstract de.topicmapslab.majortom.model.core.IOccurrence doCreateOccurrence(de.topicmapslab.majortom.model.core.ITopic topic,
                                                                                      de.topicmapslab.majortom.model.core.ITopic type,
                                                                                      java.lang.String value,
                                                                                      de.topicmapslab.majortom.model.core.ILocator datatype)
                                                                               throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new occurrence characteristics item.

Parameters:
topic - the parent topic
type - the type
value - the characteristics value
datatype - the data type
Returns:
the created construct
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doCreateOccurrence

protected abstract de.topicmapslab.majortom.model.core.IOccurrence doCreateOccurrence(de.topicmapslab.majortom.model.core.ITopic topic,
                                                                                      de.topicmapslab.majortom.model.core.ITopic type,
                                                                                      java.lang.String value,
                                                                                      de.topicmapslab.majortom.model.core.ILocator datatype,
                                                                                      java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
                                                                               throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new occurrence characteristics item.

Parameters:
topic - the parent topic
type - the type
value - the characteristics value
datatype - the data type
themes - the scoping themes
Returns:
the created construct
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doCreateRole

protected abstract de.topicmapslab.majortom.model.core.IAssociationRole doCreateRole(de.topicmapslab.majortom.model.core.IAssociation association,
                                                                                     de.topicmapslab.majortom.model.core.ITopic type,
                                                                                     de.topicmapslab.majortom.model.core.ITopic player)
                                                                              throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new association role item.

Parameters:
association - the parent association
type - the type
player - the role player
Returns:
the created construct
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doCreateTopicWithoutIdentifier

protected abstract de.topicmapslab.majortom.model.core.ITopic doCreateTopicWithoutIdentifier(de.topicmapslab.majortom.model.core.ITopicMap topicMap)
                                                                                      throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new topic item without any identifier.

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

doCreateTopicByItemIdentifier

protected abstract de.topicmapslab.majortom.model.core.ITopic doCreateTopicByItemIdentifier(de.topicmapslab.majortom.model.core.ITopicMap topicMap,
                                                                                            de.topicmapslab.majortom.model.core.ILocator itemIdentifier)
                                                                                     throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new topic item.

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

doCreateTopicBySubjectIdentifier

protected abstract de.topicmapslab.majortom.model.core.ITopic doCreateTopicBySubjectIdentifier(de.topicmapslab.majortom.model.core.ITopicMap topicMap,
                                                                                               de.topicmapslab.majortom.model.core.ILocator subjectIdentifier)
                                                                                        throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new topic item.

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

doCreateTopicBySubjectLocator

protected abstract de.topicmapslab.majortom.model.core.ITopic doCreateTopicBySubjectLocator(de.topicmapslab.majortom.model.core.ITopicMap topicMap,
                                                                                            de.topicmapslab.majortom.model.core.ILocator subjectLocator)
                                                                                     throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new topic item.

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

doCreateVariant

protected abstract de.topicmapslab.majortom.model.core.IVariant doCreateVariant(de.topicmapslab.majortom.model.core.IName name,
                                                                                java.lang.String value,
                                                                                java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
                                                                         throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new variant for the given name.

Parameters:
name - the parent name
value - the value
themes - the scoping themes
Returns:
the created variant
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doCreateVariant

protected abstract de.topicmapslab.majortom.model.core.IVariant doCreateVariant(de.topicmapslab.majortom.model.core.IName name,
                                                                                de.topicmapslab.majortom.model.core.ILocator value,
                                                                                java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
                                                                         throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new variant for the given name.

Parameters:
name - the parent name
value - the value
themes - the scoping themes
Returns:
the created variant
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doCreateVariant

protected abstract de.topicmapslab.majortom.model.core.IVariant doCreateVariant(de.topicmapslab.majortom.model.core.IName name,
                                                                                java.lang.String value,
                                                                                de.topicmapslab.majortom.model.core.ILocator datatype,
                                                                                java.util.Collection<de.topicmapslab.majortom.model.core.ITopic> themes)
                                                                         throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Create a new variant for the given name.

Parameters:
name - the parent name
value - the value
datatype - the data type
themes - the scoping themes
Returns:
the created variant
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

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

checkMergeConditionOfItemIdentifier

protected de.topicmapslab.majortom.model.core.ITopic checkMergeConditionOfItemIdentifier(de.topicmapslab.majortom.model.core.IConstruct c,
                                                                                         de.topicmapslab.majortom.model.core.ILocator identifier)
Method checks if there is another with the item-identifier

Parameters:
c - the construct
identifier - the identifier
Returns:
the topic to merge in the current one, null if no topic has to be merged
Throws:
org.tmapi.core.IdentityConstraintException - thrown if merge candidate detected and automatic merging is disabled or the constructs are not topics

doModifyItemIdentifier

protected abstract void doModifyItemIdentifier(de.topicmapslab.majortom.model.core.IConstruct c,
                                               de.topicmapslab.majortom.model.core.ILocator itemIdentifier)
                                        throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Add a new item-identifier to the given construct

Parameters:
c - the construct
itemIdentifier - the item identifier
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doModifyPlayer

protected abstract void doModifyPlayer(de.topicmapslab.majortom.model.core.IAssociationRole role,
                                       de.topicmapslab.majortom.model.core.ITopic player)
                                throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Modify the player of the given role.

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

checkReificationConstraintBeforeModification

protected void checkReificationConstraintBeforeModification(de.topicmapslab.majortom.model.core.IReifiable r,
                                                            de.topicmapslab.majortom.model.core.ITopic reifier)
                                                     throws org.tmapi.core.ModelConstraintException
Checks the reification constraint before calling modification method.

Parameters:
r - the reified construct
reifier - the reifier
Throws:
org.tmapi.core.ModelConstraintException - thrown if constraint check fails

doModifyReifier

protected abstract void doModifyReifier(de.topicmapslab.majortom.model.core.IReifiable r,
                                        de.topicmapslab.majortom.model.core.ITopic reifier)
                                 throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Modify the reifier of the given reified item.

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

doModifyScope

protected abstract void doModifyScope(de.topicmapslab.majortom.model.core.IScopable s,
                                      de.topicmapslab.majortom.model.core.ITopic theme)
                               throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Add a new theme to the given scoped item.

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

checkMergeConditionOfSubjectIdentifier

protected de.topicmapslab.majortom.model.core.ITopic checkMergeConditionOfSubjectIdentifier(de.topicmapslab.majortom.model.core.ITopic t,
                                                                                            de.topicmapslab.majortom.model.core.ILocator identifier)
                                                                                     throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Method checks if there is another with the subject-identifier

Parameters:
t - the topic
identifier - the identifier
Returns:
the topic to merge in the current one, null if no topic has to be merged
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if merging fails

doModifySubjectIdentifier

protected abstract void doModifySubjectIdentifier(de.topicmapslab.majortom.model.core.ITopic t,
                                                  de.topicmapslab.majortom.model.core.ILocator subjectIdentifier)
                                           throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Add a new subject-identifier to the given topic

Parameters:
t - the topic
subjectIdentifier - the subject-identifier
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

checkMergeConditionOfSubjectLocator

protected de.topicmapslab.majortom.model.core.ITopic checkMergeConditionOfSubjectLocator(de.topicmapslab.majortom.model.core.ITopic t,
                                                                                         de.topicmapslab.majortom.model.core.ILocator identifier)
                                                                                  throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Method checks if there is another with the subject-locator

Parameters:
t - the topic
identifier - the identifier
Returns:
the topic to merge in the current one, null if no topic has to be merged
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if merging fails

doModifySubjectLocator

protected abstract void doModifySubjectLocator(de.topicmapslab.majortom.model.core.ITopic t,
                                               de.topicmapslab.majortom.model.core.ILocator subjectLocator)
                                        throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Add a new subject-locator to the given topic

Parameters:
t - the topic
subjectLocator - the subject-locator
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doModifySupertype

protected abstract void doModifySupertype(de.topicmapslab.majortom.model.core.ITopic t,
                                          de.topicmapslab.majortom.model.core.ITopic type)
                                   throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Add a new super type to the given topic

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

doModifyTag

protected abstract void doModifyTag(de.topicmapslab.majortom.model.core.ITopicMap tm,
                                    java.lang.String tag)
                             throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Add a new tag to the given topic map for the current time stamp

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

doModifyTag

protected abstract void doModifyTag(de.topicmapslab.majortom.model.core.ITopicMap tm,
                                    java.lang.String tag,
                                    java.util.Calendar timestamp)
                             throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Add a new tag to the given topic map for the given time stamp

Parameters:
tm - the topic map
tag - the tag
timestamp - the time stamp
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doModifyType

protected abstract void doModifyType(de.topicmapslab.majortom.model.core.ITypeable t,
                                     de.topicmapslab.majortom.model.core.ITopic type)
                              throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Modify the type of the given typed item.

Parameters:
t - the typed item
type - the type
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doModifyTopicType

protected abstract void doModifyTopicType(de.topicmapslab.majortom.model.core.ITopic t,
                                          de.topicmapslab.majortom.model.core.ITopic type)
                                   throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Add a new type to the given topic.

Parameters:
t - the topic
type - the type to add
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doModifyValue

protected abstract void doModifyValue(de.topicmapslab.majortom.model.core.IName n,
                                      java.lang.String value)
                               throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Modify the value of the given name.

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

doModifyValue

protected abstract void doModifyValue(de.topicmapslab.majortom.model.core.IDatatypeAware t,
                                      java.lang.String value)
                               throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Modify the value of the given data-type-aware.

Parameters:
t - data-type-aware
value -
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doModifyValue

protected abstract void doModifyValue(de.topicmapslab.majortom.model.core.IDatatypeAware t,
                                      java.lang.String value,
                                      de.topicmapslab.majortom.model.core.ILocator datatype)
                               throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Modify the value and the data type of the given data-type-aware.

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

doModifyValue

protected abstract void doModifyValue(de.topicmapslab.majortom.model.core.IDatatypeAware t,
                                      java.lang.Object value)
                               throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Modify the value and the data type of the given data-type-aware.

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

doModifyMetaData

protected abstract void doModifyMetaData(de.topicmapslab.majortom.model.revision.IRevision revision,
                                         java.lang.String key,
                                         java.lang.String value)
                                  throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Add a new meta data set to the given revision

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

doMerge

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

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

doMergeTopics

protected abstract void doMergeTopics(de.topicmapslab.majortom.model.core.ITopic context,
                                      de.topicmapslab.majortom.model.core.ITopic other)
                               throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Merge a topic in the given topic

Parameters:
context - the topic to merge in
other - the topic to merge in
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

checkMergeConstraint

protected void checkMergeConstraint(de.topicmapslab.majortom.model.core.ITopic context,
                                    de.topicmapslab.majortom.model.core.ITopic other)
                             throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Method checks the merging constraints. At least one of the topics may not have a reified construct.

Parameters:
context - the context
other - the other topic
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException

doMergeTopicMaps

protected abstract void doMergeTopicMaps(org.tmapi.core.TopicMap context,
                                         org.tmapi.core.TopicMap other)
                                  throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Merge a topic map in the given topic map.

Parameters:
context - the topic map
other - the topic map to merge in
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

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

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

doRemoveItemIdentifier

protected abstract void doRemoveItemIdentifier(de.topicmapslab.majortom.model.core.IConstruct c,
                                               de.topicmapslab.majortom.model.core.ILocator itemIdentifier)
                                        throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Remove the given item identifier from the given construct.

Parameters:
c - the construct
itemIdentifier - the item identifier to remove
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doRemoveScope

protected abstract void doRemoveScope(de.topicmapslab.majortom.model.core.IScopable s,
                                      de.topicmapslab.majortom.model.core.ITopic theme)
                               throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Remove the theme from the given scoped item.

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

doRemoveSubjectIdentifier

protected abstract void doRemoveSubjectIdentifier(de.topicmapslab.majortom.model.core.ITopic t,
                                                  de.topicmapslab.majortom.model.core.ILocator subjectIdentifier)
                                           throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Remove the subject-identifier from the given topic.

Parameters:
t - the topic
subjectIdentifier - the subject-identifier
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doRemoveSubjectLocator

protected abstract void doRemoveSubjectLocator(de.topicmapslab.majortom.model.core.ITopic t,
                                               de.topicmapslab.majortom.model.core.ILocator subjectLocator)
                                        throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Remove the subject-locator from the given topic.

Parameters:
t - the topic
subjectLocator - the subject-locator
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

doRemoveSupertype

protected abstract void doRemoveSupertype(de.topicmapslab.majortom.model.core.ITopic t,
                                          de.topicmapslab.majortom.model.core.ITopic type)
                                   throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Remove the type from the given topic.

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

doRemoveType

protected abstract void doRemoveType(de.topicmapslab.majortom.model.core.ITopic t,
                                     de.topicmapslab.majortom.model.core.ITopic type)
                              throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Remove the super type from the given topic.

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

doRemove

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

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

doRemoveTopicMap

protected abstract void doRemoveTopicMap(de.topicmapslab.majortom.model.core.ITopicMap topicMap,
                                         boolean cascade)
                                  throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Remove the topic map.

Parameters:
topicMap - the topic map
cascade - flag indicates if the dependent construct should removed too
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException

isTopicInUse

protected boolean isTopicInUse(de.topicmapslab.majortom.model.core.ITopic topic)
Method checks if the topic is used by any topic map relation.

Parameters:
topic - the topic to check
Returns:
true if the topic is used as type, reifier etc. , false otherwise.

isTopicUsedAsTheme

protected boolean isTopicUsedAsTheme(de.topicmapslab.majortom.model.core.ITopic topic)
Checks if the topic is used as theme by any scoped item.

Parameters:
topic - the topic
Returns:
true if the topic is used as theme, false otherwise

isTopicUsedAsType

protected boolean isTopicUsedAsType(de.topicmapslab.majortom.model.core.ITopic topic)
Checks if the topic is used as type by any typed item.

Parameters:
topic - the topic
Returns:
true if the topic is used as type, false otherwise

isTopicUsedAsSupertype

protected boolean isTopicUsedAsSupertype(de.topicmapslab.majortom.model.core.ITopic topic)
Checks if the topic is used as supertype by any topic item.

Parameters:
topic - the topic
Returns:
true if the topic is used as supertype, false otherwise

isTopicUsedAsPlayer

protected boolean isTopicUsedAsPlayer(de.topicmapslab.majortom.model.core.ITopic topic)
Checks if the topic is used as player by any association item.

Parameters:
topic - the topic
Returns:
true if the topic is used as player, false otherwise

isTopicUsedAsReifier

protected boolean isTopicUsedAsReifier(de.topicmapslab.majortom.model.core.ITopic topic)
Checks if the topic is used as reifier and reification is restricted for deletion

Parameters:
topic - the topic
Returns:
true if the topic is used as reifier and reification is restricted for deletion, false otherwise

doRemoveTopic

protected abstract void doRemoveTopic(de.topicmapslab.majortom.model.core.ITopic topic,
                                      boolean cascade)
                               throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Remove the topic.

Parameters:
topic - the topic
cascade - flag indicates if the dependent construct should removed too
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException

doRemoveName

protected abstract void doRemoveName(de.topicmapslab.majortom.model.core.IName name,
                                     boolean cascade)
                              throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Remove the name.

Parameters:
name - the name
cascade - flag indicates if the dependent construct should removed too
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException

doRemoveOccurrence

protected abstract void doRemoveOccurrence(de.topicmapslab.majortom.model.core.IOccurrence occurrence,
                                           boolean cascade)
                                    throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Remove the occurrence.

Parameters:
occurrence - the occurrence
cascade - flag indicates if the dependent construct should removed too
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException

doRemoveAssociation

protected abstract void doRemoveAssociation(de.topicmapslab.majortom.model.core.IAssociation association,
                                            boolean cascade)
                                     throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Remove the association.

Parameters:
association - the association
cascade - flag indicates if the dependent construct should removed too
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException

doRemoveRole

protected abstract void doRemoveRole(de.topicmapslab.majortom.model.core.IAssociationRole role,
                                     boolean cascade)
                              throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Remove the association role.

Parameters:
role - the role
cascade - flag indicates if the dependent construct should removed too
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException

doRemoveVariant

protected abstract void doRemoveVariant(de.topicmapslab.majortom.model.core.IVariant variant,
                                        boolean cascade)
                                 throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Remove the variant.

Parameters:
variant - the variant
cascade - flag indicates if the dependent construct should removed too
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException

convert

private static java.util.Set<de.topicmapslab.majortom.model.core.ITopic> convert(org.tmapi.core.Topic[] array)
Transform the given array to a set of the specific type.

Type Parameters:
T - the type
Parameters:
array - the array
Returns:
the transformed set

createTypeInstanceAssociation

protected void createTypeInstanceAssociation(de.topicmapslab.majortom.model.core.ITopic instance,
                                             de.topicmapslab.majortom.model.core.ITopic type,
                                             de.topicmapslab.majortom.model.revision.IRevision revision)
Create the specific association of the topic maps data model representing a type-instance relation between the given topics.

Parameters:
instance - the instance
type - the type

createSupertypeSubtypeAssociation

protected void createSupertypeSubtypeAssociation(de.topicmapslab.majortom.model.core.ITopic type,
                                                 de.topicmapslab.majortom.model.core.ITopic supertype,
                                                 de.topicmapslab.majortom.model.revision.IRevision revision)
Create the specific association of the topic maps data model representing a supertype-subtype relation between the given topics.

Parameters:
type - the type
supertype - the supertype

removeSupertypeSubtypeAssociation

protected void removeSupertypeSubtypeAssociation(de.topicmapslab.majortom.model.core.ITopic type,
                                                 de.topicmapslab.majortom.model.core.ITopic supertype,
                                                 de.topicmapslab.majortom.model.revision.IRevision revision)
                                          throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Removes the corresponding association of the supertype-subtype relation between the given topics.

Parameters:
type - the type
supertype - the supertype
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

removeTypeInstanceAssociation

protected void removeTypeInstanceAssociation(de.topicmapslab.majortom.model.core.ITopic instance,
                                             de.topicmapslab.majortom.model.core.ITopic type,
                                             de.topicmapslab.majortom.model.revision.IRevision revision)
                                      throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Removes the corresponding association of the type-instance relation between the given topics.

Parameters:
instance - the instance
type - the type
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

getTmdmTypeInstanceAssociationType

public de.topicmapslab.majortom.model.core.ITopic getTmdmTypeInstanceAssociationType()
                                                                              throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Returns the topic type representing the type-instance association type of the topic map data model.

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

getTmdmTypeRoleType

public de.topicmapslab.majortom.model.core.ITopic getTmdmTypeRoleType()
                                                               throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Returns the topic type representing the type association role type of the topic map data model.

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

getTmdmInstanceRoleType

public de.topicmapslab.majortom.model.core.ITopic getTmdmInstanceRoleType()
                                                                   throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Returns the topic type representing the instance association role type of the topic map data model.

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

getTmdmSupertypeSubtypeAssociationType

public de.topicmapslab.majortom.model.core.ITopic getTmdmSupertypeSubtypeAssociationType()
                                                                                  throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Returns the topic type representing the supertype-subtype association type of the topic map data model.

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

getTmdmSupertypeRoleType

public de.topicmapslab.majortom.model.core.ITopic getTmdmSupertypeRoleType()
                                                                    throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Returns the topic type representing the supertype association role type of the topic map data model.

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

getTmdmSubtypeRoleType

public de.topicmapslab.majortom.model.core.ITopic getTmdmSubtypeRoleType()
                                                                  throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Returns the topic type representing the subtype association role type of the topic map data model.

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

getTmdmDefaultNameType

public de.topicmapslab.majortom.model.core.ITopic getTmdmDefaultNameType()
                                                                  throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Returns the topic type representing the default name type of the topic map data model.

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

existsTmdmTypeInstanceAssociationType

public boolean existsTmdmTypeInstanceAssociationType()
                                              throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Check if the topic type representing the type-instance association type of the topic map data model exists.

Returns:
true if this topic type exists, false otherwise
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

existsTmdmTypeRoleType

public boolean existsTmdmTypeRoleType()
                               throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Check if the topic type representing the type association role type of the topic map data model exists.

Returns:
true if this topic type exists, false otherwise
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

existsTmdmInstanceRoleType

public boolean existsTmdmInstanceRoleType()
                                   throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Check if the topic type representing the instance association role type of the topic map data model exists.

Returns:
true if this topic type exists, false otherwise
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

existsTmdmSupertypeSubtypeAssociationType

public boolean existsTmdmSupertypeSubtypeAssociationType()
                                                  throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Check if the topic type representing the supertype-subtype association type of the topic map data model exists.

Returns:
true if this topic type exists, false otherwise
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

existsTmdmSupertypeRoleType

public boolean existsTmdmSupertypeRoleType()
                                    throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Check if the topic type representing the supertype association role type of the topic map data model exists.

Returns:
true if this topic type exists, false otherwise
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

existsTmdmSubtypeRoleType

public boolean existsTmdmSubtypeRoleType()
                                  throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Check if the topic type representing the subtype association role type of the topic map data model exists.

Returns:
true if this topic type exists, false otherwise
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails

existsTmdmDefaultNameType

public boolean existsTmdmDefaultNameType()
                                  throws de.topicmapslab.majortom.model.exception.TopicMapStoreException
Check if the topic type representing the default name type of the topic map data model exists.

Returns:
true if this topic type exists, false otherwise
Throws:
de.topicmapslab.majortom.model.exception.TopicMapStoreException - thrown if operation fails
Since:
1.1.2

storeRevision

public abstract void storeRevision(de.topicmapslab.majortom.model.revision.IRevision revision,
                                   de.topicmapslab.majortom.model.event.TopicMapEventType type,
                                   de.topicmapslab.majortom.model.core.IConstruct context,
                                   java.lang.Object newValue,
                                   java.lang.Object oldValue)
Store a change set for the given revision. The change set will be created by the given arguments.

Parameters:
revision - the revision the change set should add to
type - the type of change
context - the context of change
newValue - the new value after change
oldValue - the old value before change

storeRevision

public void storeRevision(de.topicmapslab.majortom.model.event.TopicMapEventType type,
                          de.topicmapslab.majortom.model.core.IConstruct context,
                          java.lang.Object newValue,
                          java.lang.Object oldValue)
Store a change set for the given revision. The change set will be created by the given arguments.

Parameters:
revision - the revision the change set should add to
type - the type of change
context - the context of change
newValue - the new value after change
oldValue - the old value before change

createRevision

protected abstract de.topicmapslab.majortom.model.revision.IRevision createRevision(de.topicmapslab.majortom.model.event.TopicMapEventType type)
Creating a new revision object.

Parameters:
the - event type for the internal change set
Returns:
the new revision object

removeDuplicates

public void removeDuplicates()

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

clear

public void clear()

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