Package net.ontopia.topicmaps.query.spi
Class RDBMSSearcher
- java.lang.Object
-
- net.ontopia.topicmaps.query.spi.AbstractSearcher
-
- net.ontopia.topicmaps.query.spi.RDBMSSearcher
-
- All Implemented Interfaces:
SearcherIF
public class RDBMSSearcher extends AbstractSearcher
EXPERIMENTAL: RDBMS searcher implementation that executes a SQL query in the same database as the topic map is stored in. The query must return two columns, the first the object id of the result topic map object (a string), the second the score (a float).The name of the predicate is used as the key to look up the query itself. The queries are read from a properties file called RDBMSSearcher.props from the CLASSPATH.
The sql query can be specified directly via the 'sql' URI parameter on the searcher class. Just make sure that the query is URI encoded. The query file name can be overriden with the 'queryFile' parameter.
-
-
Field Summary
-
Fields inherited from class net.ontopia.topicmaps.query.spi.AbstractSearcher
moduleURI, parameters, predicateName, topicmap
-
Fields inherited from interface net.ontopia.topicmaps.query.spi.SearcherIF
ITEM_IDENTIFIER, OBJECT_ID, OBJECT_VALUE, OCCURRENCE_URI, STRING_VALUE, SUBJECT_IDENTIFIER, SUBJECT_LOCATOR
-
-
Constructor Summary
Constructors Constructor Description RDBMSSearcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchResultIF
getResult(String query)
PUBLIC: Returns the String value of the field.int
getValueType()
PUBLIC: Returns type of values returned by the search result.-
Methods inherited from class net.ontopia.topicmaps.query.spi.AbstractSearcher
setModuleURI, setParameters, setPredicateName, setTopicMap
-
-
-
-
Method Detail
-
getValueType
public int getValueType()
Description copied from interface:SearcherIF
PUBLIC: Returns type of values returned by the search result. See constants declared in this class.
-
getResult
public SearchResultIF getResult(String query)
Description copied from interface:SearcherIF
PUBLIC: Returns the String value of the field. Note that null is returned if the field has a reader set.
-
-