public class QueryTopicMap extends ContainerTopicMap implements TopicMapListener, ContainerTopicMapListener
| Modifier and Type | Class and Description |
|---|---|
static class |
QueryTopicMap.QueryInfo |
| Modifier and Type | Field and Description |
|---|---|
protected Wandora |
admin |
protected java.util.HashMap<Tuples.T2<Locator,Locator>,java.util.ArrayList<QueryAssociation>> |
associationCache |
protected LayerStack |
layerStack |
protected java.util.Collection<QueryTopicMap.QueryInfo> |
originalQueries |
protected java.util.HashMap<Locator,Directive> |
queries |
containerListenersconsistencyCheck, consistencyCheckWhenXTMImport, EDITTIME_SI, isReadOnly, logger, parentTopicMap| Constructor and Description |
|---|
QueryTopicMap(Wandora admin) |
| Modifier and Type | Method and Description |
|---|---|
void |
addLayer(Layer l,
int index)
Inserts a layer at the specified position in the container.
|
void |
addTopicMapListener(TopicMapListener listener)
Adds a topic map listener.
|
void |
associationChanged(Association a)
A notification used to report general or large changes in association.
|
void |
associationPlayerChanged(Association a,
Topic role,
Topic newPlayer,
Topic oldPlayer)
A notification that a player in an association with a certain role has
been changed.
|
void |
associationRemoved(Association a)
A notification that an association has been completely removed.
|
void |
associationTypeChanged(Association a,
Topic newType,
Topic oldType)
A notification that association type has changed.
|
void |
cacheAssociations(Locator topic,
Locator type,
java.util.ArrayList<QueryAssociation> associations) |
void |
cacheAssociations(QueryTopic topic,
QueryTopic type,
java.util.ArrayList<QueryAssociation> associations) |
void |
clearAssociationCache() |
void |
clearTopicMap()
Completely clears the topic map.
|
void |
clearTopicMapIndexes()
If the topic map implementation keeps indexes or caches of topics, calling
this method will clear such data structures and cause further methods to
retrieve data directly from the original data source.
|
void |
close()
Close the topic map.
|
Association |
copyAssociationIn(Association a)
Copies an association of a different topic map in this topic map.
|
void |
copyTopicAssociationsIn(Topic t)
Copies all associations of a topic of a different topic map in this topic
map using copyAssociationIn.
|
Topic |
copyTopicIn(Topic t,
boolean deep)
Copies a topic of different topic map in this topic map.
|
Association |
createAssociation(Topic type)
Creates a new association of the given type without any members.
|
Topic |
createTopic()
Creates a new topic without base name, subject identifier, data or any associations.
|
Topic |
createTopic(java.lang.String id)
Creates a new topic without base name, subject identifier, data or any associations.
|
void |
disableAllListeners() |
void |
enableAllListeners() |
java.util.Iterator<Association> |
getAssociations()
Returns all associations in the topic map.
|
java.util.Collection<Association> |
getAssociationsOfType(Topic type)
Returns all associations in the topic map that are of the given type.
|
java.util.ArrayList<QueryAssociation> |
getCachedAssociations(Locator topic,
Locator type) |
java.util.ArrayList<QueryAssociation> |
getCachedAssociations(QueryTopic topic,
QueryTopic type) |
Layer |
getLayer(java.lang.String name)
Gets the layer with the specified name.
|
java.util.List<Layer> |
getLayers()
Gets all layers in the order they are in the container.
|
LayerStack |
getLayerStack() |
int |
getLayerZPos(Layer l)
Gets layer position in the container.
|
int |
getNumAssociations()
Returns the number of associations in topic map.
|
int |
getNumTopics()
Returns the number of topics in topic map.
|
java.util.Collection<QueryTopicMap.QueryInfo> |
getOriginalQueries() |
java.util.HashMap<Locator,Directive> |
getQueries() |
int |
getSelectedIndex()
Gets the selected layer position in the stack.
|
Layer |
getSelectedLayer()
Gets the selected layer.
|
TopicMapStatData |
getStatistics(TopicMapStatOptions options) |
Topic |
getTopic(Locator si)
Gets a topic with subject identifier.
|
Topic |
getTopicBySubjectLocator(Locator sl)
Gets a topic with subject locator.
|
java.util.List<TopicMapListener> |
getTopicMapListeners()
Gets all topic map listeners.
|
java.util.Iterator<Topic> |
getTopics()
Gets all topics in the topic map.
|
Topic[] |
getTopics(java.lang.String[] sis)
Gets the topics whose subject identifiers are given in the array.
|
java.util.Collection<Topic> |
getTopicsForLayer(Layer l,
Topic t) |
java.util.Collection<Topic> |
getTopicsOfType(Topic type)
Gets all topics in the topic map that are of the given type.
|
Topic |
getTopicWithBaseName(java.lang.String name)
Gets a topic with topic base name.
|
java.util.List<Layer> |
getVisibleLayers()
Gets all visible layers in the order they are in the container.
|
boolean |
isReadOnly()
Checks if the topic map is in a read only state.
|
boolean |
isTopicMapChanged()
Checks if the topic map has been changed since the last call to resetTopicMapChanged.
|
void |
layerAdded(Layer l) |
void |
layerChanged(Layer oldLayer,
Layer newLayer) |
void |
layerRemoved(Layer l) |
void |
layerStructureChanged() |
void |
layerVisibilityChanged(Layer l) |
void |
notifyLayersChanged() |
boolean |
removeLayer(Layer l)
Removes the specified layer.
|
void |
removeTopicMapListener(TopicMapListener listener)
Removes a topic map listener.
|
boolean |
resetTopicMapChanged() |
void |
reverseLayerOrder() |
java.util.Collection<Topic> |
search(java.lang.String query,
TopicMapSearchOptions options)
Searches the topic map for the given string.
|
void |
selectLayer(Layer layer)
Makes the specified layer the selected layer.
|
void |
setLayer(Layer l,
int pos)
Sets layer in the specified position removing old layer at that position.
|
void |
setLayerStack(LayerStack tm) |
void |
setQueries(java.util.Collection<QueryTopicMap.QueryInfo> queryInfos) |
void |
setTrackDependent(boolean v)
NOTE: The two trackDependent methods are mostly deprecated.
|
void |
topicBaseNameChanged(Topic t,
java.lang.String newName,
java.lang.String oldName)
Notification that the base name has been changed.
|
void |
topicChanged(Topic t)
A notification used to report general or large changes in topic, for example when topics are merged.
|
void |
topicDataChanged(Topic t,
Topic type,
Topic version,
java.lang.String newValue,
java.lang.String oldValue)
Notification that topic occurrence has been changed.
|
void |
topicRemoved(Topic t)
Notification that a topic has been completely removed.
|
void |
topicSubjectIdentifierChanged(Topic t,
Locator added,
Locator removed)
Notification that a subject identifier has changed.
|
void |
topicSubjectLocatorChanged(Topic t,
Locator newLocator,
Locator oldLocator)
Notification that the subject locator has been changed.
|
void |
topicTypeChanged(Topic t,
Topic added,
Topic removed)
Notification that a topic type has changed.
|
void |
topicVariantChanged(Topic t,
java.util.Collection<Topic> scope,
java.lang.String newName,
java.lang.String oldName)
Notification that a variant name has been changed.
|
boolean |
trackingDependent() |
addContainerListener, addContainerListeners, addLayer, fireLayerAdded, fireLayerChanged, fireLayerRemoved, fireLayerStructureChanged, fireLayerVisibilityChanged, getContainerListeners, getLeafLayer, getLeafLayers, getLeafLayers, getNumLayers, getSelectedTreeLayer, getTopicForLayer, getTopicForSelectedTreeLayer, getTopicsForAllLeafLayers, getTopicsForSelectedTreeLayer, getTopicsForTreeLayer, getTreeLayer, getTreeLayer, getTreeLayerPath, getTreeLayerPath, getTreeLayers, getTreeLayers, moveLayer, removeContainerListeneraddTopicMapListeners, checkAssociationConsistency, checkAssociationConsistency, copyTopicCollectionIn, createLocator, createLocator, escapeXML, exportJTM, exportJTM, exportJTM, exportJTM, exportLTM, exportLTM, exportLTM, exportLTM, exportTopicMap, exportTopicMap, exportXTM, exportXTM, exportXTM, exportXTM, exportXTM10, exportXTM10, exportXTM10, exportXTM20, exportXTM20, forceStop, getConsistencyCheck, getLogger, getMergingTopics, getParentTopicMap, getRootTopicMap, getTopic, getTopicBySubjectLocator, getTopics, getTopicsOfType, hlog, importJTM, importJTM, importJTM, importJTM, importJTM, importJTM, importLTM, importLTM, importLTM, importLTM, importLTM, importLTM, importTopicMap, importTopicMap, importTopicMap, importXTM, importXTM, importXTM, importXTM, importXTM, isConnected, log, log, log, makeJTMString, makeJTMTopicId, makeLTMString, makeLTMTopicId, makeSubjectIndicator, makeSubjectIndicatorAsLocator, mergeIn, mergeIn, setConsistencyCheck, setLogger, setLogTitle, setParentTopicMap, setProgress, setProgressMax, setReadOnlyprotected LayerStack layerStack
protected Wandora admin
protected java.util.Collection<QueryTopicMap.QueryInfo> originalQueries
protected java.util.HashMap<Tuples.T2<Locator,Locator>,java.util.ArrayList<QueryAssociation>> associationCache
public QueryTopicMap(Wandora admin)
public void addLayer(Layer l, int index)
ContainerTopicMapaddLayer in class ContainerTopicMappublic Layer getLayer(java.lang.String name)
ContainerTopicMapgetLayer in class ContainerTopicMappublic int getLayerZPos(Layer l)
ContainerTopicMapgetLayerZPos in class ContainerTopicMappublic java.util.List<Layer> getLayers()
ContainerTopicMapgetLayers in class ContainerTopicMappublic int getSelectedIndex()
ContainerTopicMapgetSelectedIndex in class ContainerTopicMappublic Layer getSelectedLayer()
ContainerTopicMapgetSelectedLayer in class ContainerTopicMappublic java.util.Collection<Topic> getTopicsForLayer(Layer l, Topic t)
getTopicsForLayer in class ContainerTopicMappublic java.util.List<Layer> getVisibleLayers()
ContainerTopicMapgetVisibleLayers in class ContainerTopicMappublic void notifyLayersChanged()
notifyLayersChanged in class ContainerTopicMappublic boolean removeLayer(Layer l)
ContainerTopicMapremoveLayer in class ContainerTopicMappublic void reverseLayerOrder()
reverseLayerOrder in class ContainerTopicMappublic void selectLayer(Layer layer)
ContainerTopicMapselectLayer in class ContainerTopicMappublic void setLayer(Layer l, int pos)
ContainerTopicMapsetLayer in class ContainerTopicMappublic void setQueries(java.util.Collection<QueryTopicMap.QueryInfo> queryInfos)
public java.util.Collection<QueryTopicMap.QueryInfo> getOriginalQueries()
public java.util.ArrayList<QueryAssociation> getCachedAssociations(Locator topic, Locator type)
public java.util.ArrayList<QueryAssociation> getCachedAssociations(QueryTopic topic, QueryTopic type)
public void cacheAssociations(Locator topic, Locator type, java.util.ArrayList<QueryAssociation> associations)
public void cacheAssociations(QueryTopic topic, QueryTopic type, java.util.ArrayList<QueryAssociation> associations)
public void clearAssociationCache()
public void setLayerStack(LayerStack tm)
public LayerStack getLayerStack()
public boolean isReadOnly()
TopicMapisReadOnly in class TopicMappublic Topic getTopic(Locator si) throws TopicMapException
TopicMapgetTopic in class TopicMapTopicMapExceptionpublic Topic getTopicBySubjectLocator(Locator sl) throws TopicMapException
TopicMapgetTopicBySubjectLocator in class TopicMapTopicMapExceptionpublic Topic getTopicWithBaseName(java.lang.String name) throws TopicMapException
TopicMapgetTopicWithBaseName in class TopicMapTopicMapExceptionpublic java.util.Iterator<Topic> getTopics() throws TopicMapException
TopicMapgetTopics in class TopicMapTopicMapExceptionpublic Topic[] getTopics(java.lang.String[] sis) throws TopicMapException
TopicMapgetTopics in class TopicMapTopicMapExceptionpublic java.util.Collection<Topic> getTopicsOfType(Topic type) throws TopicMapException
TopicMapgetTopicsOfType in class TopicMapTopicMapExceptionpublic java.util.Collection<Topic> search(java.lang.String query, TopicMapSearchOptions options) throws TopicMapException
TopicMapsearch in class TopicMapTopicMapExceptionpublic java.util.Iterator<Association> getAssociations() throws TopicMapException
TopicMapgetAssociations in class TopicMapTopicMapExceptionpublic java.util.Collection<Association> getAssociationsOfType(Topic type) throws TopicMapException
TopicMapgetAssociationsOfType in class TopicMapTopicMapExceptionpublic int getNumAssociations()
throws TopicMapException
TopicMapgetNumAssociations in class TopicMapTopicMapExceptionpublic int getNumTopics()
throws TopicMapException
TopicMapgetNumTopics in class TopicMapTopicMapExceptionpublic TopicMapStatData getStatistics(TopicMapStatOptions options) throws TopicMapException
getStatistics in class TopicMapTopicMapExceptionpublic boolean isTopicMapChanged()
throws TopicMapException
TopicMapisTopicMapChanged in class TopicMapTopicMapExceptionpublic boolean resetTopicMapChanged()
throws TopicMapException
resetTopicMapChanged in class TopicMapTopicMapExceptionTopicMap.isTopicMapChanged()public void clearTopicMapIndexes()
throws TopicMapException
TopicMapclearTopicMapIndexes in class TopicMapTopicMapExceptionpublic void clearTopicMap()
throws TopicMapException
TopicMapclearTopicMap in class TopicMapTopicMapExceptionpublic void close()
TopicMappublic Association copyAssociationIn(Association a) throws TopicMapException
TopicMapcopyAssociationIn in class TopicMapTopicMapExceptionpublic void copyTopicAssociationsIn(Topic t) throws TopicMapException
TopicMapcopyTopicAssociationsIn in class TopicMapTopicMapExceptionpublic Topic copyTopicIn(Topic t, boolean deep) throws TopicMapException
TopicMapcopyTopicIn in class TopicMapTopicMapExceptionpublic Association createAssociation(Topic type) throws TopicMapException
TopicMapcreateAssociation in class TopicMapTopicMapExceptionpublic Topic createTopic(java.lang.String id) throws TopicMapException
TopicMapcreateTopic in class TopicMapTopicMapExceptionpublic Topic createTopic() throws TopicMapException
TopicMapcreateTopic in class TopicMapTopicMapExceptionpublic java.util.List<TopicMapListener> getTopicMapListeners()
TopicMapgetTopicMapListeners in class TopicMappublic void addTopicMapListener(TopicMapListener listener)
TopicMapaddTopicMapListener in class TopicMappublic void removeTopicMapListener(TopicMapListener listener)
TopicMapremoveTopicMapListener in class TopicMappublic void disableAllListeners()
disableAllListeners in class TopicMappublic void enableAllListeners()
enableAllListeners in class TopicMappublic void setTrackDependent(boolean v)
throws TopicMapException
TopicMapsetTrackDependent in class TopicMapTopicMapExceptionpublic boolean trackingDependent()
throws TopicMapException
trackingDependent in class TopicMapTopicMapExceptionpublic void associationChanged(Association a) throws TopicMapException
TopicMapListenerassociationChanged in interface TopicMapListenerTopicMapExceptionpublic void associationPlayerChanged(Association a, Topic role, Topic newPlayer, Topic oldPlayer) throws TopicMapException
TopicMapListenerassociationPlayerChanged in interface TopicMapListenerTopicMapExceptionpublic void associationRemoved(Association a) throws TopicMapException
TopicMapListenerassociationRemoved in interface TopicMapListenerTopicMapExceptionpublic void associationTypeChanged(Association a, Topic newType, Topic oldType) throws TopicMapException
TopicMapListenerassociationTypeChanged in interface TopicMapListenerTopicMapExceptionpublic void topicBaseNameChanged(Topic t, java.lang.String newName, java.lang.String oldName) throws TopicMapException
TopicMapListenertopicBaseNameChanged in interface TopicMapListenerTopicMapExceptionpublic void topicChanged(Topic t) throws TopicMapException
TopicMapListenertopicChanged in interface TopicMapListenerTopicMapExceptionpublic void topicDataChanged(Topic t, Topic type, Topic version, java.lang.String newValue, java.lang.String oldValue) throws TopicMapException
TopicMapListenertopicDataChanged in interface TopicMapListenerTopicMapExceptionpublic void topicRemoved(Topic t) throws TopicMapException
TopicMapListenertopicRemoved in interface TopicMapListenerTopicMapExceptionpublic void topicSubjectIdentifierChanged(Topic t, Locator added, Locator removed) throws TopicMapException
TopicMapListenertopicSubjectIdentifierChanged in interface TopicMapListenerTopicMapExceptionpublic void topicSubjectLocatorChanged(Topic t, Locator newLocator, Locator oldLocator) throws TopicMapException
TopicMapListenertopicSubjectLocatorChanged in interface TopicMapListenerTopicMapExceptionpublic void topicTypeChanged(Topic t, Topic added, Topic removed) throws TopicMapException
TopicMapListenertopicTypeChanged in interface TopicMapListenerTopicMapExceptionpublic void topicVariantChanged(Topic t, java.util.Collection<Topic> scope, java.lang.String newName, java.lang.String oldName) throws TopicMapException
TopicMapListenertopicVariantChanged in interface TopicMapListenerTopicMapExceptionpublic void layerAdded(Layer l)
layerAdded in interface ContainerTopicMapListenerpublic void layerChanged(Layer oldLayer, Layer newLayer)
layerChanged in interface ContainerTopicMapListenerpublic void layerRemoved(Layer l)
layerRemoved in interface ContainerTopicMapListenerpublic void layerStructureChanged()
layerStructureChanged in interface ContainerTopicMapListenerpublic void layerVisibilityChanged(Layer l)
layerVisibilityChanged in interface ContainerTopicMapListenerCopyright 2004-2015 Wandora Team