Package net.ontopia.topicmaps.impl.rdbms
Class TopicMap
java.lang.Object
net.ontopia.persistence.proxy.AbstractRWPersistent
net.ontopia.topicmaps.impl.rdbms.TMObject
net.ontopia.topicmaps.impl.rdbms.TopicMap
- All Implemented Interfaces:
PersistentIF,ReifiableIF,TMObjectIF,TopicMapIF
INTERNAL: The rdbms topic map implementation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected static final String[]protected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected RDBMSTopicMapTransactionFields inherited from class net.ontopia.topicmaps.impl.rdbms.TMObject
LF_topicmapFields inherited from class net.ontopia.persistence.proxy.AbstractRWPersistent
id, MASKS, txn, valuesFields inherited from interface net.ontopia.topicmaps.core.ReifiableIF
EVENT_SET_REIFIERFields inherited from interface net.ontopia.topicmaps.core.TMObjectIF
EVENT_ADD_ITEMIDENTIFIER, EVENT_REMOVE_ITEMIDENTIFIER, MSG_NULL_ARGUMENTFields inherited from interface net.ontopia.topicmaps.core.TopicMapIF
EVENT_ADD_ASSOCIATION, EVENT_ADD_TOPIC, EVENT_REMOVE_ASSOCIATION, EVENT_REMOVE_TOPIC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintprotected voidaddAssociation(AssociationIF association) Adds an association to the set of associations.protected voidAdds a topic to the set of topics.voidclear()PUBLIC: Clears the topic map by removing all topics and associations.voiddetach()getAssocations(TopicIF topic) PUBLIC: Gets all associations in this topic map.getAssociationsByType(TopicIF topic, TopicIF type) PUBLIC: Gets a topic map builder for use with this transaction.INTERNAL: Returns the token that can be used to indicate the class of this instance.PUBLIC: Gets an index by name.getObjectById(String object_id) PUBLIC: Gets the topic map object that has the given object id, from this topic map.getObjectByItemIdentifier(LocatorIF locator) PUBLIC: Gets the topic map object that has the given item identifier (given as a LocatorIF object), from this topic map.PUBLIC: Gets the id of this object.getOccurrencesByType(TopicIF topic, TopicIF type) PUBLIC: Returns the topic that reifies this object.getRolesByType(TopicIF player, TopicIF rtype) getRolesByType(TopicIF player, TopicIF rtype, TopicIF atype) getStore()PUBLIC: Gets the store to which the topic map's transaction is connected.getTitle()getTopicBySubjectIdentifier(LocatorIF locator) PUBLIC: Gets the topic that has the specified subject identifier, given as a locator.getTopicBySubjectLocator(LocatorIF locator) PUBLIC: Gets the topic in this topic map that represents the given addressable subject (locator given as a LocatorIF object).PUBLIC: Gets the topic map that this object belongs to.getTopicNamesByType(TopicIF topic, TopicIF type) PUBLIC: Gets all topics in this topic map.voidremove()PUBLIC: Removes the object from its parent.protected voidremoveAssociation(AssociationIF association) Removes an associations from the set of associations.protected voidremoveTopic(TopicIF topic) Removes a topic from the set of topics.voidsetBaseAddress(LocatorIF baseAddress) voidsetComments(String comments) voidsetReifier(TopicIF _reifier) PUBLIC: Sets the reifier of this object.voidprotected voidsetTopicMap(TopicMapIF topicmap) voidsetTransaction(RDBMSTopicMapTransaction transaction) voidsyncAfterMerge(IdentityIF source, IdentityIF target) toString()Methods inherited from class net.ontopia.topicmaps.impl.rdbms.TMObject
addItemIdentifier, fireEvent, getItemIdentifiers, getLongId, isReadOnly, removeItemIdentifier, transactionChangedMethods inherited from class net.ontopia.persistence.proxy.AbstractRWPersistent
_p_getIdentity, _p_getTransaction, _p_getType, _p_setIdentity, _p_setTransaction, _p_toString, clearAll, detachCollectionField, detachField, executeQuery, getValue, isDeleted, isDirty, isDirty, isDirtyFlushed, isDirtyFlushed, isInDatabase, isLoaded, isNewObject, isPersistent, isTransient, loadCollectionField, loadField, loadFieldNoCheck, loadValue, nextDirty, nextDirty, nextDirtyFlushed, nextDirtyFlushed, setDeleted, setDirty, setDirtyFlushed, setInDatabase, setNewObject, setPersistent, setValue, syncFieldsAfterMerge, unsetValue, valueAdded, valueChanged, valueRemovedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.ontopia.topicmaps.core.TMObjectIF
addItemIdentifier, getItemIdentifiers, isReadOnly, removeItemIdentifier
-
Field Details
-
CLASS_INDICATOR
- See Also:
-
LF_sources
protected static final int LF_sources- See Also:
-
LF_title
protected static final int LF_title- See Also:
-
LF_base_address
protected static final int LF_base_address- See Also:
-
LF_comments
protected static final int LF_comments- See Also:
-
LF_reifier
protected static final int LF_reifier- See Also:
-
fields
-
transaction
-
-
Constructor Details
-
TopicMap
public TopicMap() -
TopicMap
-
-
Method Details
-
detach
public void detach()- Specified by:
detachin interfacePersistentIF- Specified by:
detachin classAbstractRWPersistent
-
getBaseAddress
-
setBaseAddress
-
getTitle
-
setTitle
-
getComments
-
setComments
-
_p_getFieldCount
public int _p_getFieldCount()- Specified by:
_p_getFieldCountin interfacePersistentIF
-
getClassIndicator
Description copied from class:TMObjectINTERNAL: Returns the token that can be used to indicate the class of this instance. This indicator is currently only used by source locators.- Specified by:
getClassIndicatorin classTMObject
-
getObjectId
Description copied from interface:TMObjectIFPUBLIC: Gets the id of this object. The object id is part of the topic map id space, and must be unique. The object id is not significant (or unique) outside the current topic map. The object id is immutable. The object id is thus stable through this object's lifetime.- Specified by:
getObjectIdin interfaceTMObjectIF- Specified by:
getObjectIdin classTMObject- Returns:
- string which is this object's id.
-
getTopicMap
Description copied from interface:TMObjectIFPUBLIC: Gets the topic map that this object belongs to. If the object has been removed from its topic map or not added to a topic map yet this will be null.- Specified by:
getTopicMapin interfaceTMObjectIF- Overrides:
getTopicMapin classTMObject- Returns:
- A topic map; an object implementing TopicMapIF.
-
setTopicMap
-
getStore
Description copied from interface:TopicMapIFPUBLIC: Gets the store to which the topic map's transaction is connected.- Specified by:
getStorein interfaceTopicMapIF
-
getTransaction
-
getBuilder
Description copied from interface:TopicMapIFPUBLIC: Gets a topic map builder for use with this transaction.- Specified by:
getBuilderin interfaceTopicMapIF- Returns:
- An object implementing TopicMapBuilderIF
-
getIndex
Description copied from interface:TopicMapIFPUBLIC: Gets an index by name. An index is usually named by the IndexIF subinterface that it implements. All indexes are kept up-to-date at all times.- Specified by:
getIndexin interfaceTopicMapIF- Parameters:
name- A string; the index name, i.e.g the interface that it implements.- Returns:
- An instance implementing the index interface.
-
setTransaction
-
getTopics
Description copied from interface:TopicMapIFPUBLIC: Gets all topics in this topic map. No specific order is guaranteed.- Specified by:
getTopicsin interfaceTopicMapIF- Returns:
- A collection of TopicIF objects.
-
addTopic
Adds a topic to the set of topics. -
removeTopic
Removes a topic from the set of topics. -
getAssociations
Description copied from interface:TopicMapIFPUBLIC: Gets all associations in this topic map. No specific order is guaranteed.- Specified by:
getAssociationsin interfaceTopicMapIF- Returns:
- A collection of AssociationIF objects.
-
addAssociation
Adds an association to the set of associations. -
removeAssociation
Removes an associations from the set of associations. -
getObjectById
Description copied from interface:TopicMapIFPUBLIC: Gets the topic map object that has the given object id, from this topic map. If there is no object with that object id in this topic map, then null is returned.- Specified by:
getObjectByIdin interfaceTopicMapIF- Parameters:
object_id- A string; the object id of the object to get.- Returns:
- A topic map object; an object implementing TMObjectIF.
-
remove
public void remove()Description copied from interface:TMObjectIFPUBLIC: Removes the object from its parent.- Specified by:
removein interfaceTMObjectIF
-
clear
public void clear()Description copied from interface:TopicMapIFPUBLIC: Clears the topic map by removing all topics and associations.- Specified by:
clearin interfaceTopicMapIF
-
getObjectByItemIdentifier
Description copied from interface:TopicMapIFPUBLIC: Gets the topic map object that has the given item identifier (given as a LocatorIF object), from this topic map. If there is no object with the given locator in this topic map, null is returned.- Specified by:
getObjectByItemIdentifierin interfaceTopicMapIF- Parameters:
locator- The given locator; an object implementing LocatorIF.- Returns:
- A topic map object; an object implementing TMObjectIF.
-
getTopicBySubjectLocator
Description copied from interface:TopicMapIFPUBLIC: Gets the topic in this topic map that represents the given addressable subject (locator given as a LocatorIF object). If there is no topic that represents the given addressable subject in this topic map, null is returned.- Specified by:
getTopicBySubjectLocatorin interfaceTopicMapIF- Parameters:
locator- The given locator; an object implementing LocatorIF.- Returns:
- A topic; an object implementing TopicIF.
-
getTopicBySubjectIdentifier
Description copied from interface:TopicMapIFPUBLIC: Gets the topic that has the specified subject identifier, given as a locator. If there is no topic that has that subject identifier in this topic map, null is returned.- Specified by:
getTopicBySubjectIdentifierin interfaceTopicMapIF- Parameters:
locator- The given locator; an object implementing LocatorIF.- Returns:
- A topic; an object implementing TopicIF.
-
getRolesByType
-
getRolesByType
-
getOccurrencesByType
-
getTopicNamesByType
-
getAssocations
-
getAssociationsByType
-
getReifier
Description copied from interface:ReifiableIFPUBLIC: Returns the topic that reifies this object.- Specified by:
getReifierin interfaceReifiableIF
-
setReifier
Description copied from interface:ReifiableIFPUBLIC: Sets the reifier of this object.- Specified by:
setReifierin interfaceReifiableIF
-
toString
-
syncAfterMerge
- Specified by:
syncAfterMergein classAbstractRWPersistent
-