Package net.ontopia.topicmaps.impl.rdbms
Class Topic
java.lang.Object
net.ontopia.persistence.proxy.AbstractRWPersistent
net.ontopia.topicmaps.impl.rdbms.TMObject
net.ontopia.topicmaps.impl.rdbms.Topic
- All Implemented Interfaces:
PersistentIF,TMObjectIF,TopicIF
INTERNAL: The rdbms topic 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 static final intprotected static final intFields inherited from class net.ontopia.topicmaps.impl.rdbms.TMObject
LF_sources, LF_topicmapFields inherited from class net.ontopia.persistence.proxy.AbstractRWPersistent
id, MASKS, txn, valuesFields inherited from interface net.ontopia.topicmaps.core.TMObjectIF
EVENT_ADD_ITEMIDENTIFIER, EVENT_REMOVE_ITEMIDENTIFIER, MSG_NULL_ARGUMENTFields inherited from interface net.ontopia.topicmaps.core.TopicIF
EVENT_ADD_OCCURRENCE, EVENT_ADD_SUBJECTIDENTIFIER, EVENT_ADD_SUBJECTLOCATOR, EVENT_ADD_TOPICNAME, EVENT_ADD_TYPE, EVENT_ADDED, EVENT_MODIFIED, EVENT_REMOVE_OCCURRENCE, EVENT_REMOVE_SUBJECTIDENTIFIER, EVENT_REMOVE_SUBJECTLOCATOR, EVENT_REMOVE_TOPICNAME, EVENT_REMOVE_TYPE, EVENT_REMOVED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintprotected voidaddOccurrence(OccurrenceIF occurrence) protected voidaddRole(AssociationRoleIF assoc_role) INTERNAL: Adds the association role to the set of association roles in which the topic participates.voidaddSubjectIdentifier(LocatorIF subject_indicator) PUBLIC: Adds the given subject identifier to the set of subject identifiers for this topic.voidaddSubjectLocator(LocatorIF subject_locator) PUBLIC: Adds the given subject locator to the set of subject locators for this topic.protected voidaddTopicName(TopicNameIF name) voidPUBLIC: Adds a type to this topic.voiddetach()PUBLIC: Gets the associations that have roles played by this topic.getAssociationsByType(TopicIF type) PUBLIC: Gets the associations that have roles played by this topic, where the association is of specified type.INTERNAL: Returns the token that can be used to indicate the class of this instance.PUBLIC: Gets the id of this object.PUBLIC: Gets the occurrences of this topic.getOccurrencesByType(TopicIF type) PUBLIC: Gets the occurrences of this topic with a specified type.PUBLIC: Returns the topic map object that this topic reifies.getRoles()PUBLIC: Gets the association roles played by this topic.getRolesByType(TopicIF roletype) PUBLIC: Gets the association roles of the specifed type played by this topic.getRolesByType(TopicIF roletype, TopicIF assoc_type) PUBLIC: Gets the association roles of the specifed type played by this topic.PUBLIC: Gets the subject identitifers of this topic.PUBLIC: Gets the subject locators of this topic.PUBLIC: Gets the names of this topic.getTopicNamesByType(TopicIF type) PUBLIC: Gets the topic names of this topic with a specified type.getTypes()PUBLIC: Gets the types that this topic is an instance of.voidEXPERIMENTAL: Merges the characteristics of one topic into another topic.voidremove()PUBLIC: Removes the object from its parent.protected voidremoveOccurrence(OccurrenceIF occurrence) protected voidremoveRole(AssociationRoleIF assoc_role) INTERNAL: Removes the association role from the set of association roles in which the topic participates.voidremoveSubjectIdentifier(LocatorIF subject_indicator) PUBLIC: Removes the given subject identifier from the set of subject identifiers for this topic.voidremoveSubjectLocator(LocatorIF subject_locator) PUBLIC: Removes the given subject locator from the set of subject locators for this topic.protected voidremoveTopicName(TopicNameIF name) voidremoveType(TopicIF type) PUBLIC: Removes a type from this topic.protected voidsetReified(ReifiableIF reified) protected voidsetTopicMap(TopicMap topicmap) INTERNAL: Sets the topic map that the object belongs to.voidsyncAfterMerge(IdentityIF source, IdentityIF target) toString()Methods inherited from class net.ontopia.topicmaps.impl.rdbms.TMObject
addItemIdentifier, fireEvent, getItemIdentifiers, getLongId, getTopicMap, 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, getTopicMap, isReadOnly, removeItemIdentifier
-
Field Details
-
CLASS_INDICATOR
- See Also:
-
LF_subjects
protected static final int LF_subjects- See Also:
-
LF_indicators
protected static final int LF_indicators- See Also:
-
LF_types
protected static final int LF_types- See Also:
-
LF_names
protected static final int LF_names- See Also:
-
LF_occurrences
protected static final int LF_occurrences- See Also:
-
LF_roles
protected static final int LF_roles- See Also:
-
LF_reified
protected static final int LF_reified- See Also:
-
fields
-
-
Constructor Details
-
Topic
public Topic() -
Topic
-
-
Method Details
-
detach
public void detach()- Specified by:
detachin interfacePersistentIF- Specified by:
detachin classAbstractRWPersistent
-
_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.
-
setTopicMap
INTERNAL: Sets the topic map that the object belongs to. [parent] -
getSubjectLocators
Description copied from interface:TopicIFPUBLIC: Gets the subject locators of this topic. These are locators for resources that directly address the subject of this topic. Such a resource is also called an addressable subject. The subject locators are not guaranteed to have any specific order within the returned collection.- Specified by:
getSubjectLocatorsin interfaceTopicIF- Returns:
- A collection of LocatorIF objects serving as subject locators.
-
addSubjectLocator
Description copied from interface:TopicIFPUBLIC: Adds the given subject locator to the set of subject locators for this topic.- Specified by:
addSubjectLocatorin interfaceTopicIF- Parameters:
subject_locator- A locator for the subject locator to be added; an object implementing LocatorIF.- Throws:
ConstraintViolationException- Thrown if the topic map already has a topic with this subject locator.
-
removeSubjectLocator
Description copied from interface:TopicIFPUBLIC: Removes the given subject locator from the set of subject locators for this topic. If the topic does not have the given subject locator then this method has no effect.- Specified by:
removeSubjectLocatorin interfaceTopicIF- Parameters:
subject_locator- A locator for the subject locator to be removed; an object implementing LocatorIF.
-
getSubjectIdentifiers
Description copied from interface:TopicIFPUBLIC: Gets the subject identitifers of this topic. These are locators for resources that indirectly address or otherwise indicate the subject of this topic. A subject identifier is intended as a surrogate for a subject which cannot be addressed directly. The subject identifiers are not guaranteed to have any specific order within the returned collection.- Specified by:
getSubjectIdentifiersin interfaceTopicIF- Returns:
- A collection of LocatorIF objects serving as subject identifiers.
-
addSubjectIdentifier
Description copied from interface:TopicIFPUBLIC: Adds the given subject identifier to the set of subject identifiers for this topic.- Specified by:
addSubjectIdentifierin interfaceTopicIF- Parameters:
subject_indicator- A locator for the subject identifier to be added; an object implementing LocatorIF.- Throws:
ConstraintViolationException- Thrown if the topic map already has a topic with this addressable subject.
-
removeSubjectIdentifier
Description copied from interface:TopicIFPUBLIC: Removes the given subject identifier from the set of subject identifiers for this topic. If the topic does not have the given subject identifier then this method has no effect.- Specified by:
removeSubjectIdentifierin interfaceTopicIF- Parameters:
subject_indicator- A locator for the subject identifier to be removed; an object implementing LocatorIF.
-
getTopicNames
Description copied from interface:TopicIFPUBLIC: Gets the names of this topic.- Specified by:
getTopicNamesin interfaceTopicIF- Returns:
- A collection of TopicNameIF objects.
-
getTopicNamesByType
Description copied from interface:TopicIFPUBLIC: Gets the topic names of this topic with a specified type.- Specified by:
getTopicNamesByTypein interfaceTopicIF- Returns:
- A collection of TopicNameIF objects typed by specified type.
-
addTopicName
-
removeTopicName
-
getOccurrences
Description copied from interface:TopicIFPUBLIC: Gets the occurrences of this topic. The occurrences are not guaranteed to have any specific order.- Specified by:
getOccurrencesin interfaceTopicIF- Returns:
- A collection of OccurrenceIF objects.
-
getOccurrencesByType
Description copied from interface:TopicIFPUBLIC: Gets the occurrences of this topic with a specified type. The occurrences are not guaranteed to have any specific order.- Specified by:
getOccurrencesByTypein interfaceTopicIF- Returns:
- A collection of OccurrenceIF objects typed by specified type.
-
addOccurrence
-
removeOccurrence
-
getRoles
Description copied from interface:TopicIFPUBLIC: Gets the association roles played by this topic. There is no guarantee as to the order these are returned in. -
getRolesByType
Description copied from interface:TopicIFPUBLIC: Gets the association roles of the specifed type played by this topic. There is no guarantee as to the order these are returned in.- Specified by:
getRolesByTypein interfaceTopicIF- Returns:
- A collection of AssociationRoleIF objects.
-
getRolesByType
Description copied from interface:TopicIFPUBLIC: Gets the association roles of the specifed type played by this topic. The association roles must be part of an association of the specified type. There is no guarantee as to the order these are returned in.- Specified by:
getRolesByTypein interfaceTopicIF- Returns:
- A collection of AssociationRoleIF objects.
-
getAssociations
Description copied from interface:TopicIFPUBLIC: Gets the associations that have roles played by this topic. There is no guarantee as to the order these are returned in.- Specified by:
getAssociationsin interfaceTopicIF- Returns:
- A collection of AssociationIF objects.
-
getAssociationsByType
Description copied from interface:TopicIFPUBLIC: Gets the associations that have roles played by this topic, where the association is of specified type. There is no guarantee as to the order these are returned in.- Specified by:
getAssociationsByTypein interfaceTopicIF- Returns:
- A collection of AssociationIF objects.
-
merge
Description copied from interface:TopicIFEXPERIMENTAL: Merges the characteristics of one topic into another topic. The source topic stripped of characteristics, all of which are moved to the target topic. Duplicate characteristics are suppressed. The topics must be in the same topic map, and the source topic is removed from the topic map. -
addRole
INTERNAL: Adds the association role to the set of association roles in which the topic participates. -
removeRole
INTERNAL: Removes the association role from the set of association roles in which the topic participates. -
remove
public void remove()Description copied from interface:TMObjectIFPUBLIC: Removes the object from its parent.- Specified by:
removein interfaceTMObjectIF
-
getTypes
Description copied from interface:TopicIFPUBLIC: Gets the types that this topic is an instance of. There is no guarantee as to which order these will be returned in. -
addType
Description copied from interface:TopicIFPUBLIC: Adds a type to this topic. -
removeType
Description copied from interface:TopicIFPUBLIC: Removes a type from this topic. If the given topic is not present amongst the types, then the method has no effect.- Specified by:
removeTypein interfaceTopicIF- Parameters:
type- The type to be removed; an object implementing TopicIF.
-
getReified
Description copied from interface:TopicIFPUBLIC: Returns the topic map object that this topic reifies.- Specified by:
getReifiedin interfaceTopicIF
-
setReified
-
toString
-
syncAfterMerge
- Specified by:
syncAfterMergein classAbstractRWPersistent
-