public class RemoteTopicMap extends TopicMapImpl
Modifier and Type | Field and Description |
---|---|
private java.lang.Object |
connectionParams |
private java.util.HashSet |
deletedTopicSIs |
private java.util.HashSet |
editedAssociations |
private java.util.HashSet |
editedTopics |
private java.util.HashSet |
fetchedBaseNames |
private java.util.HashSet |
fetchedSIs |
private java.util.HashSet |
fullTopics |
private java.util.HashSet |
gotTopicsOfType |
(package private) int |
importing |
private ServerInterface |
server |
consistencyCheck, consistencyCheckWhenXTMImport, EDITTIME_SI, isReadOnly, logger, parentTopicMap
Constructor and Description |
---|
RemoteTopicMap(ServerInterface server) |
RemoteTopicMap(ServerInterface server,
java.lang.Object params)
Creates a new instance of RemoteTopicMap
|
Modifier and Type | Method and Description |
---|---|
private void |
_associationChanged(Association a) |
private void |
_topicChanged(Topic t) |
private void |
addFetchedTopicToCatalog(Topic t) |
void |
associationChanged(Association a) |
void |
associationPlayerChanged(Association a,
Topic role,
Topic newPlayer,
Topic oldPlayer) |
void |
associationRemoved(Association a) |
void |
associationTypeChanged(Association a,
Topic newType,
Topic oldType) |
boolean |
cipher() |
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.
|
void |
commit() |
void |
commitSession(java.lang.StringBuffer session,
TopicMap edited) |
void |
connect() |
protected AssociationImpl |
constructAssociation(Topic type) |
protected TopicImpl |
constructTopic() |
Association |
copyAssociationIn(Association a)
Copies an association of a different topic map in this topic map.
|
private Topic |
copyFetchedTopicIn(Topic t) |
private Topic |
copyFetchedTopicIn(Topic t,
boolean overwrite) |
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.
|
java.lang.String |
customCommand(java.lang.String command) |
private void |
doCommit() |
void |
duplicateAssociationRemoved(Association a,
Association removeda) |
java.util.Iterator |
getAssociations()
Returns all associations in the topic map.
|
java.util.Collection |
getAssociationsOfType(Topic type)
Returns all associations in the topic map that are of the given type.
|
java.lang.Object |
getConnectionParams() |
java.util.Collection |
getEditedAssociations() |
TopicMap |
getEditedTopicMap() |
java.util.Collection |
getEditedTopics() |
int |
getNumAssociations()
Returns the number of associations in topic map.
|
int |
getNumTopics()
Returns the number of topics in topic map.
|
java.lang.StringBuffer |
getSession() |
TopicMapStatData |
getStatistics(TopicMapStatOptions options) |
Topic |
getTopic(Locator si)
Gets a topic with subject identifier.
|
java.util.Iterator |
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.
|
Topic[] |
getTopics(java.lang.String[] sis,
boolean overwrite) |
java.util.Collection |
getTopicsOfType(java.lang.String si)
Gets all topics in the topic map that are of the given type.
|
java.util.Collection |
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.
|
boolean |
gzip() |
void |
handleServerError(java.lang.Exception e) |
boolean |
isConnected()
Checks if this topic map is connected to the service providing the topic map.
|
private boolean |
isFetchedTopicDeleted(Topic t) |
boolean |
isLocal() |
boolean |
isUncommitted() |
boolean |
login(java.lang.String user,
java.lang.String password) |
Topic |
makeFull(Topic t) |
void |
mergeIn() |
boolean |
needLogin() |
Topic |
refreshTopic(Topic t) |
void |
removeTopicBaseName(Topic topic) |
void |
removeTopicData(Topic topic,
Topic type,
Topic version) |
void |
removeTopicSubjectIdentifier(Topic topic,
Locator l) |
void |
removeTopicType(Topic topic,
Topic type) |
void |
removeTopicVariant(Topic topic,
java.util.Collection scope) |
void |
rollback() |
void |
saveSession(Wandora parent) |
java.util.Collection<Topic> |
search(java.lang.String query,
TopicMapSearchOptions options)
Searches the topic map for the given string.
|
void |
setErrorHandler(ErrorHandler handler) |
void |
setTopicData(Topic topic,
Topic type,
Topic version) |
void |
setTopicSubjectLocator(Topic topic,
Locator locator,
Locator oldLocator) |
void |
topicBaseNameChanged(Topic t,
java.lang.String newName,
java.lang.String oldName) |
void |
topicChanged(Topic t) |
void |
topicDataChanged(Topic t,
Topic type,
Topic version,
java.lang.String newValue,
java.lang.String oldValue) |
void |
topicRemoved(Topic t) |
void |
topicsMerged(Topic newtopic,
Topic deletedtopic) |
void |
topicSubjectIdentifierChanged(Topic t,
Locator added,
Locator removed) |
void |
topicSubjectLocatorChanged(Topic t,
Locator newLocator,
Locator oldLocator) |
void |
topicTypeChanged(Topic t,
Topic added,
Topic removed) |
void |
topicVariantChanged(Topic t,
java.util.Collection<Topic> scope,
java.lang.String newName,
java.lang.String oldName) |
void |
writelog(java.lang.String lvl,
java.lang.String msg) |
boolean |
writeTopicMapTo(java.io.OutputStream out) |
addTopicMapListener, addTopicSubjectIdentifier, addTopicType, checkAssociationConsistency, constructTopic, createTopic, disableAllListeners, enableAllListeners, getTopic, getTopicBySubjectLocator, getTopicMapListeners, getTypeTopics, isTopicMapChanged, mergeIn, removeTopicMapListener, removeTopicSubjectLocator, resetTopicMapChanged, setAssociationType, setTopicName, setTrackDependent, trackingDependent
addTopicMapListeners, 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, hlog, importJTM, importJTM, importJTM, importJTM, importJTM, importJTM, importLTM, importLTM, importLTM, importLTM, importLTM, importLTM, importTopicMap, importTopicMap, importTopicMap, importXTM, importXTM, importXTM, importXTM, importXTM, isReadOnly, log, log, log, makeJTMString, makeJTMTopicId, makeLTMString, makeLTMTopicId, makeSubjectIndicator, makeSubjectIndicatorAsLocator, mergeIn, setConsistencyCheck, setLogger, setLogTitle, setParentTopicMap, setProgress, setProgressMax, setReadOnly
private ServerInterface server
private java.util.HashSet fullTopics
private java.util.HashSet editedTopics
private java.util.HashSet editedAssociations
private java.util.HashSet deletedTopicSIs
private java.util.HashSet gotTopicsOfType
private java.util.HashSet fetchedBaseNames
private java.util.HashSet fetchedSIs
int importing
private java.lang.Object connectionParams
public RemoteTopicMap(ServerInterface server, java.lang.Object params)
public RemoteTopicMap(ServerInterface server)
public java.lang.Object getConnectionParams()
public void clearTopicMap() throws TopicMapException
TopicMap
clearTopicMap
in class TopicMapImpl
TopicMapException
public void clearTopicMapIndexes() throws TopicMapException
TopicMap
clearTopicMapIndexes
in class TopicMapImpl
TopicMapException
public java.util.Collection getEditedTopics()
public java.util.Collection getEditedAssociations()
public Association copyAssociationIn(Association a) throws TopicMapException
TopicMap
copyAssociationIn
in class TopicMapImpl
TopicMapException
public void copyTopicAssociationsIn(Topic t) throws TopicMapException
TopicMap
copyTopicAssociationsIn
in class TopicMapImpl
TopicMapException
public Topic copyTopicIn(Topic t, boolean deep) throws TopicMapException
TopicMap
copyTopicIn
in class TopicMapImpl
TopicMapException
public Association createAssociation(Topic type) throws TopicMapException
TopicMap
createAssociation
in class TopicMapImpl
TopicMapException
protected TopicImpl constructTopic() throws TopicMapException
constructTopic
in class TopicMapImpl
TopicMapException
protected AssociationImpl constructAssociation(Topic type) throws TopicMapException
constructAssociation
in class TopicMapImpl
TopicMapException
public Topic createTopic() throws TopicMapException
TopicMap
createTopic
in class TopicMapImpl
TopicMapException
public Topic[] getTopics(java.lang.String[] sis) throws TopicMapException
TopicMap
getTopics
in class TopicMapImpl
TopicMapException
public Topic[] getTopics(java.lang.String[] sis, boolean overwrite) throws TopicMapException
TopicMapException
public Topic getTopic(Locator si) throws TopicMapException
TopicMap
getTopic
in class TopicMapImpl
TopicMapException
public Topic getTopicWithBaseName(java.lang.String name) throws TopicMapException
TopicMap
getTopicWithBaseName
in class TopicMapImpl
TopicMapException
public java.util.Collection getTopicsOfType(Topic type) throws TopicMapException
TopicMap
getTopicsOfType
in class TopicMapImpl
TopicMapException
public java.util.Collection getTopicsOfType(java.lang.String si) throws TopicMapException
TopicMap
getTopicsOfType
in class TopicMap
TopicMapException
private boolean isFetchedTopicDeleted(Topic t) throws TopicMapException
TopicMapException
private void addFetchedTopicToCatalog(Topic t) throws TopicMapException
TopicMapException
private Topic copyFetchedTopicIn(Topic t) throws TopicMapException
TopicMapException
private Topic copyFetchedTopicIn(Topic t, boolean overwrite) throws TopicMapException
TopicMapException
public Topic makeFull(Topic t) throws TopicMapException
TopicMapException
public Topic refreshTopic(Topic t) throws TopicMapException
TopicMapException
public void topicRemoved(Topic t) throws TopicMapException
topicRemoved
in class TopicMapImpl
TopicMapException
private void _topicChanged(Topic t) throws TopicMapException
TopicMapException
private void _associationChanged(Association a) throws TopicMapException
TopicMapException
public void topicChanged(Topic t) throws TopicMapException
topicChanged
in class TopicMapImpl
TopicMapException
public void associationChanged(Association a) throws TopicMapException
associationChanged
in class TopicMapImpl
TopicMapException
public void associationRemoved(Association a) throws TopicMapException
associationRemoved
in class TopicMapImpl
TopicMapException
public void topicSubjectIdentifierChanged(Topic t, Locator added, Locator removed) throws TopicMapException
topicSubjectIdentifierChanged
in class TopicMapImpl
TopicMapException
public void topicBaseNameChanged(Topic t, java.lang.String newName, java.lang.String oldName) throws TopicMapException
topicBaseNameChanged
in class TopicMapImpl
TopicMapException
public void topicTypeChanged(Topic t, Topic added, Topic removed) throws TopicMapException
topicTypeChanged
in class TopicMapImpl
TopicMapException
public void topicVariantChanged(Topic t, java.util.Collection<Topic> scope, java.lang.String newName, java.lang.String oldName) throws TopicMapException
topicVariantChanged
in class TopicMapImpl
TopicMapException
public void topicDataChanged(Topic t, Topic type, Topic version, java.lang.String newValue, java.lang.String oldValue) throws TopicMapException
topicDataChanged
in class TopicMapImpl
TopicMapException
public void topicSubjectLocatorChanged(Topic t, Locator newLocator, Locator oldLocator) throws TopicMapException
topicSubjectLocatorChanged
in class TopicMapImpl
TopicMapException
public void associationTypeChanged(Association a, Topic newType, Topic oldType) throws TopicMapException
associationTypeChanged
in class TopicMapImpl
TopicMapException
public void associationPlayerChanged(Association a, Topic role, Topic newPlayer, Topic oldPlayer) throws TopicMapException
associationPlayerChanged
in class TopicMapImpl
TopicMapException
public void topicsMerged(Topic newtopic, Topic deletedtopic)
topicsMerged
in class TopicMapImpl
public void duplicateAssociationRemoved(Association a, Association removeda)
duplicateAssociationRemoved
in class TopicMapImpl
public void removeTopicData(Topic topic, Topic type, Topic version) throws TopicMapException
TopicMapException
public void removeTopicBaseName(Topic topic) throws TopicMapException
TopicMapException
public void removeTopicSubjectIdentifier(Topic topic, Locator l) throws TopicMapException
removeTopicSubjectIdentifier
in class TopicMapImpl
TopicMapException
public void removeTopicType(Topic topic, Topic type) throws TopicMapException
removeTopicType
in class TopicMapImpl
TopicMapException
public void removeTopicVariant(Topic topic, java.util.Collection scope) throws TopicMapException
TopicMapException
public void setTopicData(Topic topic, Topic type, Topic version) throws TopicMapException
TopicMapException
public void setTopicSubjectLocator(Topic topic, Locator locator, Locator oldLocator) throws TopicMapException
setTopicSubjectLocator
in class TopicMapImpl
TopicMapException
public java.util.Collection getAssociationsOfType(Topic type) throws TopicMapException
TopicMap
getAssociationsOfType
in class TopicMapImpl
TopicMapException
public java.util.Iterator getAssociations() throws TopicMapException
TopicMap
getAssociations
in class TopicMapImpl
TopicMapException
public int getNumAssociations() throws TopicMapException
TopicMap
getNumAssociations
in class TopicMapImpl
TopicMapException
public int getNumTopics() throws TopicMapException
TopicMap
getNumTopics
in class TopicMapImpl
TopicMapException
public java.util.Iterator getTopics() throws TopicMapException
TopicMap
getTopics
in class TopicMapImpl
TopicMapException
public java.lang.String customCommand(java.lang.String command) throws ServerException
ServerException
public boolean writeTopicMapTo(java.io.OutputStream out) throws java.io.IOException, ServerException
java.io.IOException
ServerException
public void saveSession(Wandora parent)
public java.lang.StringBuffer getSession()
public TopicMap getEditedTopicMap() throws TopicMapException
TopicMapException
public void writelog(java.lang.String lvl, java.lang.String msg) throws ServerException
ServerException
public boolean gzip() throws ServerException
ServerException
public boolean cipher() throws ServerException
ServerException
public boolean login(java.lang.String user, java.lang.String password) throws ServerException
ServerException
public boolean needLogin() throws ServerException
ServerException
public void close()
TopicMap
close
in class TopicMapImpl
public void connect() throws java.io.IOException
java.io.IOException
public void handleServerError(java.lang.Exception e)
public void setErrorHandler(ErrorHandler handler)
public boolean isLocal()
public boolean isConnected()
TopicMap
isConnected
in class TopicMap
public java.util.Collection<Topic> search(java.lang.String query, TopicMapSearchOptions options)
TopicMap
search
in class TopicMapImpl
public TopicMapStatData getStatistics(TopicMapStatOptions options) throws TopicMapException
getStatistics
in class TopicMapImpl
TopicMapException
public void commitSession(java.lang.StringBuffer session, TopicMap edited) throws ServerException, WandoraException
ServerException
WandoraException
public void rollback() throws ServerException
ServerException
private void doCommit() throws WandoraException, ServerException
WandoraException
ServerException
public void mergeIn() throws ServerException, TopicMapException
ServerException
TopicMapException
public boolean isUncommitted()
public void commit() throws WandoraException, ServerException
WandoraException
ServerException
Copyright 2004-2015 Wandora Team