Package net.ontopia.topicmaps.query.spi
Interface SearcherIF
-
- All Known Implementing Classes:
AbstractSearcher,HTTPSearcher,RDBMSSearcher
public interface SearcherIFPUBLIC: Simple searcher interface that one can implement and refer to by name through a java module import declaration.
-
-
Field Summary
Fields Modifier and Type Field Description static intITEM_IDENTIFIERPUBLIC: Value type indicating that the result value is an item identifier and should be used to look up the corresponding topic map object.static intOBJECT_IDPUBLIC: Value type indicating that the result value is an object id and should be used to look up the corresponding topic map object.static intOBJECT_VALUEPUBLIC: Value type indicating that the result value should be represented as-is (as an object).static intOCCURRENCE_URIPUBLIC: Value type indicating that the result value is an external occurrence value identifier and should be used to look up the corresponding occurrence objects.static intSTRING_VALUEPUBLIC: Value type indicating that the result value should be represented as a string.static intSUBJECT_IDENTIFIERPUBLIC: Value type indicating that the result value is a subject identifier and should be used to look up the topic that has that subject identifier.static intSUBJECT_LOCATORPUBLIC: Value type indicating that the result value is a subject locator and should be used to look up the topic that has that subject locator.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SearchResultIFgetResult(String query)PUBLIC: Returns the String value of the field.intgetValueType()PUBLIC: Returns type of values returned by the search result.voidsetModuleURI(String moduleURI)PUBLIC: Called by the query engine before using the instance to pass the module URI to the searcher.voidsetParameters(Map parameters)PUBLIC: Called by the query engine before using the instance to pass the parameters in the module URI to the searcher.voidsetPredicateName(String predicateName)PUBLIC: Called by the query engine before using the instance to pass the name of the predicate (the part after the colon in the QName) to the searcher.voidsetTopicMap(TopicMapIF topicmap)PUBLIC: Called by the query engine before using the instance to pass the topic map being queried to the predicate.
-
-
-
Field Detail
-
STRING_VALUE
static final int STRING_VALUE
PUBLIC: Value type indicating that the result value should be represented as a string.- See Also:
- Constant Field Values
-
OBJECT_VALUE
static final int OBJECT_VALUE
PUBLIC: Value type indicating that the result value should be represented as-is (as an object).- See Also:
- Constant Field Values
-
OBJECT_ID
static final int OBJECT_ID
PUBLIC: Value type indicating that the result value is an object id and should be used to look up the corresponding topic map object.- See Also:
- Constant Field Values
-
SUBJECT_LOCATOR
static final int SUBJECT_LOCATOR
PUBLIC: Value type indicating that the result value is a subject locator and should be used to look up the topic that has that subject locator.- See Also:
- Constant Field Values
-
SUBJECT_IDENTIFIER
static final int SUBJECT_IDENTIFIER
PUBLIC: Value type indicating that the result value is a subject identifier and should be used to look up the topic that has that subject identifier.- See Also:
- Constant Field Values
-
ITEM_IDENTIFIER
static final int ITEM_IDENTIFIER
PUBLIC: Value type indicating that the result value is an item identifier and should be used to look up the corresponding topic map object.- See Also:
- Constant Field Values
-
OCCURRENCE_URI
static final int OCCURRENCE_URI
PUBLIC: Value type indicating that the result value is an external occurrence value identifier and should be used to look up the corresponding occurrence objects.- See Also:
- Constant Field Values
-
-
Method Detail
-
getValueType
int getValueType()
PUBLIC: Returns type of values returned by the search result. See constants declared in this class.
-
getResult
SearchResultIF getResult(String query)
PUBLIC: Returns the String value of the field. Note that null is returned if the field has a reader set.
-
setModuleURI
void setModuleURI(String moduleURI)
PUBLIC: Called by the query engine before using the instance to pass the module URI to the searcher. No specific behaviour is required from the searcher.
-
setPredicateName
void setPredicateName(String predicateName)
PUBLIC: Called by the query engine before using the instance to pass the name of the predicate (the part after the colon in the QName) to the searcher. No specific behaviour is required from the searcher.
-
setTopicMap
void setTopicMap(TopicMapIF topicmap)
PUBLIC: Called by the query engine before using the instance to pass the topic map being queried to the predicate. No specific behaviour is required from the searcher.
-
setParameters
void setParameters(Map parameters)
PUBLIC: Called by the query engine before using the instance to pass the parameters in the module URI to the searcher. The map will contain {"foo" : "bar"} if the URI ends in "?foo=bar". No specific behaviour is required from the searcher.
-
-