net.ontopia.topicmaps.utils.tmrap
Class RemoteTopicIndex

java.lang.Object
  extended by net.ontopia.topicmaps.utils.tmrap.RemoteTopicIndex
All Implemented Interfaces:
IndexIF, TopicIndexIF

public class RemoteTopicIndex
extends java.lang.Object
implements TopicIndexIF

EXPERIMENTAL: An implementation that looks up topics on remote servers using the TM RAP protocol.


Field Summary
protected  java.lang.String editBaseuri
           
protected  TopicMapStoreFactoryIF storefactory
           
protected  java.lang.String tmid
           
protected  java.lang.String viewBaseuri
           
static java.lang.String VIRTUAL_URN
           
 
Constructor Summary
RemoteTopicIndex(java.lang.String editBaseuri, java.lang.String viewBaseuri)
           
RemoteTopicIndex(java.lang.String editBaseuri, java.lang.String viewBaseuri, TopicMapStoreFactoryIF factory)
           
RemoteTopicIndex(java.lang.String editBaseuri, java.lang.String viewBaseuri, TopicMapStoreFactoryIF factory, java.lang.String tmid)
           
 
Method Summary
 void close()
          Lets go of any underlying resources used by the index.
protected  org.xml.sax.InputSource getInputSource(java.lang.String method, java.lang.String params, boolean compress)
           
 java.util.Collection getTopicPages(java.util.Collection indicators, java.util.Collection sources, java.util.Collection subjects)
          Returns all known topic pages for the topics whose identity matches one of the locators passed as arguments.
 TopicPages getTopicPages2(java.util.Collection indicators, java.util.Collection sources, java.util.Collection subjects)
          Returns all known topic pages for the topics whose identity matches one of the locators passed as arguments.
 java.util.Collection getTopics(java.util.Collection indicators, java.util.Collection sources, java.util.Collection subjects)
          Returns all topics the index knows about whose identity matches one the of the locators passed as arguments.
static boolean isVirtualReference(java.lang.String address)
           
 void loadAssociationTypes(TopicMapIF topicmap)
           
 void loadQuery(TopicMapIF topicmap, java.lang.String query)
           
 java.util.Collection loadRelatedTopics(java.util.Collection indicators, java.util.Collection sources, java.util.Collection subjects, boolean two_steps)
           
 void loadTopicTypes(TopicMapIF topicmap)
           
static java.lang.String resolveVirtualReference(java.lang.String address, java.lang.String tmid)
           
 void setStoreFactory(TopicMapStoreFactoryIF storefactory)
           
static java.lang.String sourceTopicMapFromVirtualReference(java.lang.String address)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

editBaseuri

protected java.lang.String editBaseuri

viewBaseuri

protected java.lang.String viewBaseuri

storefactory

protected TopicMapStoreFactoryIF storefactory

tmid

protected java.lang.String tmid

VIRTUAL_URN

public static final java.lang.String VIRTUAL_URN
See Also:
Constant Field Values
Constructor Detail

RemoteTopicIndex

public RemoteTopicIndex(java.lang.String editBaseuri,
                        java.lang.String viewBaseuri)

RemoteTopicIndex

public RemoteTopicIndex(java.lang.String editBaseuri,
                        java.lang.String viewBaseuri,
                        TopicMapStoreFactoryIF factory)

RemoteTopicIndex

public RemoteTopicIndex(java.lang.String editBaseuri,
                        java.lang.String viewBaseuri,
                        TopicMapStoreFactoryIF factory,
                        java.lang.String tmid)
Method Detail

getTopics

public java.util.Collection getTopics(java.util.Collection indicators,
                                      java.util.Collection sources,
                                      java.util.Collection subjects)
Description copied from interface: TopicIndexIF
Returns all topics the index knows about whose identity matches one the of the locators passed as arguments.

Specified by:
getTopics in interface TopicIndexIF
Parameters:
indicators - A collection of subject identifiers as LocatorIF objects.
sources - A collection of source locators as LocatorIF objects.
subjects - A colleciton of subject locators as LocatorIF objects.
Returns:
Collection of TopicIF

loadRelatedTopics

public java.util.Collection loadRelatedTopics(java.util.Collection indicators,
                                              java.util.Collection sources,
                                              java.util.Collection subjects,
                                              boolean two_steps)
Specified by:
loadRelatedTopics in interface TopicIndexIF

getTopicPages

public java.util.Collection getTopicPages(java.util.Collection indicators,
                                          java.util.Collection sources,
                                          java.util.Collection subjects)
Description copied from interface: TopicIndexIF
Returns all known topic pages for the topics whose identity matches one of the locators passed as arguments.

Specified by:
getTopicPages in interface TopicIndexIF
Parameters:
indicators - A collection of subject identifiers as LocatorIF objects.
sources - A collection of source locators as LocatorIF objects.
subjects - A colleciton of subject locators as LocatorIF objects.
Returns:
Collection of TopicPage

getTopicPages2

public TopicPages getTopicPages2(java.util.Collection indicators,
                                 java.util.Collection sources,
                                 java.util.Collection subjects)
Description copied from interface: TopicIndexIF
Returns all known topic pages for the topics whose identity matches one of the locators passed as arguments.

Specified by:
getTopicPages2 in interface TopicIndexIF
Parameters:
indicators - A collection of subject identifiers as LocatorIF objects.
sources - A collection of source locators as LocatorIF objects.
subjects - A colleciton of subject locators as LocatorIF objects.
Returns:
Collection of TopicPage

loadAssociationTypes

public void loadAssociationTypes(TopicMapIF topicmap)
                          throws java.io.IOException
Throws:
java.io.IOException

loadTopicTypes

public void loadTopicTypes(TopicMapIF topicmap)
                    throws java.io.IOException
Throws:
java.io.IOException

loadQuery

public void loadQuery(TopicMapIF topicmap,
                      java.lang.String query)
               throws java.io.IOException
Throws:
java.io.IOException

close

public void close()
Description copied from interface: TopicIndexIF
Lets go of any underlying resources used by the index. Must be called when used with the RDBMS backend.

Specified by:
close in interface TopicIndexIF

setStoreFactory

public void setStoreFactory(TopicMapStoreFactoryIF storefactory)

getInputSource

protected org.xml.sax.InputSource getInputSource(java.lang.String method,
                                                 java.lang.String params,
                                                 boolean compress)
                                          throws java.io.IOException
Throws:
java.io.IOException

isVirtualReference

public static boolean isVirtualReference(java.lang.String address)

resolveVirtualReference

public static java.lang.String resolveVirtualReference(java.lang.String address,
                                                       java.lang.String tmid)

sourceTopicMapFromVirtualReference

public static java.lang.String sourceTopicMapFromVirtualReference(java.lang.String address)


Copyright © 2000-2012 Ontopia.