Class RemoteTopicIndex
- java.lang.Object
-
- net.ontopia.topicmaps.utils.tmrap.RemoteTopicIndex
-
- All Implemented Interfaces:
IndexIF
,TopicIndexIF
public class RemoteTopicIndex extends Object implements TopicIndexIF
EXPERIMENTAL: An implementation that looks up topics on remote servers using the TM RAP protocol.
-
-
Field Summary
Fields Modifier and Type Field Description protected String
editBaseuri
protected TopicMapStoreFactoryIF
storefactory
protected String
tmid
protected String
viewBaseuri
static String
VIRTUAL_URN
-
Constructor Summary
Constructors Constructor Description RemoteTopicIndex(String editBaseuri, String viewBaseuri)
RemoteTopicIndex(String editBaseuri, String viewBaseuri, TopicMapStoreFactoryIF factory)
RemoteTopicIndex(String editBaseuri, String viewBaseuri, TopicMapStoreFactoryIF factory, String tmid)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Lets go of any underlying resources used by the index.protected InputSource
getInputSource(String method, String params, boolean compress)
Collection<TopicPage>
getTopicPages(Collection<LocatorIF> indicators, Collection<LocatorIF> sources, Collection<LocatorIF> subjects)
Returns all known topic pages for the topics whose identity matches one of the locators passed as arguments.TopicPages
getTopicPages2(Collection<LocatorIF> indicators, Collection<LocatorIF> sources, Collection<LocatorIF> subjects)
Returns all known topic pages for the topics whose identity matches one of the locators passed as arguments.Collection<TopicIF>
getTopics(Collection<LocatorIF> indicators, Collection<LocatorIF> sources, Collection<LocatorIF> subjects)
Returns all topics the index knows about whose identity matches one the of the locators passed as arguments.static boolean
isVirtualReference(String address)
void
loadAssociationTypes(TopicMapIF topicmap)
void
loadQuery(TopicMapIF topicmap, String query)
Collection<TopicIF>
loadRelatedTopics(Collection<LocatorIF> indicators, Collection<LocatorIF> sources, Collection<LocatorIF> subjects, boolean two_steps)
void
loadTopicTypes(TopicMapIF topicmap)
static String
resolveVirtualReference(String address, String tmid)
void
setStoreFactory(TopicMapStoreFactoryIF storefactory)
static String
sourceTopicMapFromVirtualReference(String address)
-
-
-
Field Detail
-
VIRTUAL_URN
public static final String VIRTUAL_URN
- See Also:
- Constant Field Values
-
editBaseuri
protected String editBaseuri
-
viewBaseuri
protected String viewBaseuri
-
storefactory
protected TopicMapStoreFactoryIF storefactory
-
tmid
protected String tmid
-
-
Constructor Detail
-
RemoteTopicIndex
public RemoteTopicIndex(String editBaseuri, String viewBaseuri, TopicMapStoreFactoryIF factory)
-
RemoteTopicIndex
public RemoteTopicIndex(String editBaseuri, String viewBaseuri, TopicMapStoreFactoryIF factory, String tmid)
-
-
Method Detail
-
getTopics
public Collection<TopicIF> getTopics(Collection<LocatorIF> indicators, Collection<LocatorIF> sources, Collection<LocatorIF> 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 interfaceTopicIndexIF
- 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 Collection<TopicIF> loadRelatedTopics(Collection<LocatorIF> indicators, Collection<LocatorIF> sources, Collection<LocatorIF> subjects, boolean two_steps)
- Specified by:
loadRelatedTopics
in interfaceTopicIndexIF
-
getTopicPages
public Collection<TopicPage> getTopicPages(Collection<LocatorIF> indicators, Collection<LocatorIF> sources, Collection<LocatorIF> 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 interfaceTopicIndexIF
- 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(Collection<LocatorIF> indicators, Collection<LocatorIF> sources, Collection<LocatorIF> 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 interfaceTopicIndexIF
- 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 IOException
- Throws:
IOException
-
loadTopicTypes
public void loadTopicTypes(TopicMapIF topicmap) throws IOException
- Throws:
IOException
-
loadQuery
public void loadQuery(TopicMapIF topicmap, String query) throws IOException
- Throws:
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 interfaceTopicIndexIF
-
setStoreFactory
public void setStoreFactory(TopicMapStoreFactoryIF storefactory)
-
getInputSource
protected InputSource getInputSource(String method, String params, boolean compress) throws IOException
- Throws:
IOException
-
isVirtualReference
public static boolean isVirtualReference(String address)
-
-