public class TopicMap extends TMObject implements TopicMapIF, EventManagerIF
| Modifier and Type | Field and Description |
|---|---|
protected Set<AssociationIF> |
assocs |
protected CollectionFactoryIF |
cfactory |
protected Map<String,EventListenerIF[]> |
listeners |
protected TopicIF |
reifier |
protected UniqueSet<TopicIF> |
scope |
UniqueSet<TopicIF> |
setpool |
protected SubjectIdentityCache |
sicache |
protected Set<TopicIF> |
topics |
protected InMemoryTopicMapTransaction |
txn |
oid, parent, sources, topicmapEVENT_ADD_ASSOCIATION, EVENT_ADD_TOPIC, EVENT_REMOVE_ASSOCIATION, EVENT_REMOVE_TOPICEVENT_SET_REIFIEREVENT_ADD_ITEMIDENTIFIER, EVENT_REMOVE_ITEMIDENTIFIER, MSG_NULL_ARGUMENT| Modifier and Type | Method and Description |
|---|---|
void |
addAssociation(AssociationIF _association)
Adds an association to the set of associations.
|
void |
addListener(EventListenerIF listener,
String event)
INTERNAL: Register the listener as a listener for the event.
|
void |
addTopic(TopicIF _topic)
Adds a topic to the set of topics.
|
void |
clear()
PUBLIC: Clears the topic map by removing all topics and associations.
|
protected void |
fireEvent(String event,
Object new_value,
Object old_value)
INTERNAL: Fires an event, so that listeners can be informed about
the event.
|
Collection<AssociationIF> |
getAssociations()
PUBLIC: Gets all associations in this topic map.
|
TopicMapBuilderIF |
getBuilder()
PUBLIC: Gets a topic map builder for use with this transaction.
|
Object |
getIndex(String name)
PUBLIC: Gets an index by name.
|
TMObjectIF |
getObjectById(String object_id)
PUBLIC: Gets the topic map object that has the given object
id, from this topic map.
|
TMObjectIF |
getObjectByItemIdentifier(LocatorIF locator)
PUBLIC: Gets the topic map object that has the given item
identifier (given as a LocatorIF object), from this topic map.
|
TopicIF |
getReifier()
PUBLIC: Returns the topic that reifies this object.
|
TopicMapStoreIF |
getStore()
PUBLIC: Gets the store to which the topic map's transaction is
connected.
|
protected SubjectIdentityCache |
getSubjectIdentityCache() |
TopicIF |
getTopicBySubjectIdentifier(LocatorIF locator)
PUBLIC: Gets the topic that has the specified subject identifier,
given as a locator.
|
TopicIF |
getTopicBySubjectLocator(LocatorIF locator)
PUBLIC: Gets the topic in this topic map that represents the
given addressable subject (locator given as a LocatorIF object).
|
TopicMapIF |
getTopicMap()
PUBLIC: Gets the topic map that this object belongs to.
|
Collection<TopicIF> |
getTopics()
PUBLIC: Gets all topics in this topic map.
|
TopicMapTransactionIF |
getTransaction() |
void |
processEvent(Object object,
String event,
Object new_value,
Object old_value)
INTERNAL: A method that receives notification when an event has been triggered.
|
void |
remove()
PUBLIC: Removes the object from its parent.
|
void |
removeAssociation(AssociationIF _association)
Removes an associations from the set of associations.
|
void |
removeListener(EventListenerIF listener,
String event)
INTERNAL: Unregister the listener as a listener for the event.
|
void |
removeTopic(TopicIF _topic)
Removes a topic from the set of topics.
|
void |
setReifier(TopicIF _reifier)
PUBLIC: Sets the reifier of this object.
|
protected void |
setSubjectIdentityCache(SubjectIdentityCache sicache) |
String |
toString() |
addItemIdentifier, getItemIdentifiers, getObjectId, isConnected, isReadOnly, removeItemIdentifierclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddItemIdentifier, getItemIdentifiers, getObjectId, isReadOnly, removeItemIdentifierprotected transient InMemoryTopicMapTransaction txn
protected transient CollectionFactoryIF cfactory
protected transient SubjectIdentityCache sicache
protected TopicIF reifier
protected Set<AssociationIF> assocs
protected Map<String,EventListenerIF[]> listeners
public TopicMapIF getTopicMap()
TMObjectIFgetTopicMap in interface TMObjectIFgetTopicMap in class TMObjectpublic TopicMapStoreIF getStore()
TopicMapIFgetStore in interface TopicMapIFpublic TopicMapTransactionIF getTransaction()
public TopicMapBuilderIF getBuilder()
TopicMapIFgetBuilder in interface TopicMapIFpublic Object getIndex(String name)
TopicMapIFgetIndex in interface TopicMapIFname - A string; the index name, i.e.g the interface that it
implements.protected SubjectIdentityCache getSubjectIdentityCache()
protected void setSubjectIdentityCache(SubjectIdentityCache sicache)
public Collection<TopicIF> getTopics()
TopicMapIFgetTopics in interface TopicMapIFpublic void addTopic(TopicIF _topic)
public void removeTopic(TopicIF _topic)
public Collection<AssociationIF> getAssociations()
TopicMapIFgetAssociations in interface TopicMapIFpublic void addAssociation(AssociationIF _association)
public void removeAssociation(AssociationIF _association)
public void remove()
TMObjectIFremove in interface TMObjectIFpublic void clear()
TopicMapIFclear in interface TopicMapIFpublic TMObjectIF getObjectById(String object_id)
TopicMapIFgetObjectById in interface TopicMapIFobject_id - A string; the object id of the object to get.public TMObjectIF getObjectByItemIdentifier(LocatorIF locator)
TopicMapIFgetObjectByItemIdentifier in interface TopicMapIFlocator - The given locator; an object implementing LocatorIF.public TopicIF getTopicBySubjectLocator(LocatorIF locator)
TopicMapIFgetTopicBySubjectLocator in interface TopicMapIFlocator - The given locator; an object implementing LocatorIF.public TopicIF getTopicBySubjectIdentifier(LocatorIF locator)
TopicMapIFgetTopicBySubjectIdentifier in interface TopicMapIFlocator - The given locator; an object implementing LocatorIF.public TopicIF getReifier()
ReifiableIFgetReifier in interface ReifiableIFpublic void setReifier(TopicIF _reifier)
ReifiableIFsetReifier in interface ReifiableIFprotected void fireEvent(String event, Object new_value, Object old_value)
TMObjectpublic void addListener(EventListenerIF listener, String event)
EventManagerIFaddListener in interface EventManagerIFpublic void removeListener(EventListenerIF listener, String event)
EventManagerIFremoveListener in interface EventManagerIFpublic void processEvent(Object object, String event, Object new_value, Object old_value)
EventListenerIFprocessEvent in interface EventListenerIF