|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.topicmaps.query.impl.basic.AbstractQueryProcessor net.ontopia.topicmaps.query.impl.basic.QueryProcessor
public class QueryProcessor
INTERNAL: This query processor implementation can be used to query any topic map implementation; it makes no assumptions about the stored form of the topic map.
Field Summary | |
---|---|
protected java.text.Collator |
collator
|
protected TologOptions |
options
|
protected TologParser |
parser
|
protected TopicMapIF |
topicmap
|
Constructor Summary | |
---|---|
QueryProcessor(TopicMapIF topicmap)
|
|
QueryProcessor(TopicMapIF topicmap,
LocatorIF base)
|
Method Summary | |
---|---|
QueryMatches |
count(TologQuery query,
QueryMatches matches)
INTERNAL: Replaces count($A) variables by their relevant counts. |
QueryMatches |
createInitialMatches(TologQuery query,
java.util.Collection items,
java.util.Map arguments)
|
QueryMatches |
createInitialMatches(TologQuery query,
java.util.Map arguments)
|
QueryResultIF |
execute(java.lang.String query)
PUBLIC: Parses and executes the query, returning the results. |
QueryResultIF |
execute(java.lang.String query,
DeclarationContextIF context)
PUBLIC: Parses and executes the query in the given context, returning the results. |
QueryResultIF |
execute(java.lang.String query,
java.util.Map arguments)
PUBLIC: Parses and executes the query binding the parameters in the query to the values given in the 'arguments' map, returning the results. |
QueryResultIF |
execute(java.lang.String query,
java.util.Map arguments,
DeclarationContextIF context)
PUBLIC: Parses and executes the query in the given context binding the parameters in the query to the values given in the 'arguments' map, returning the results. |
QueryResultIF |
execute(TologQuery query)
|
QueryResultIF |
execute(TologQuery query,
java.util.Map arguments)
|
TologOptions |
getOptions()
|
void |
load(java.io.Reader ruleset)
DEPRECATED: Loads a set of rules into the query processor from a reader object. |
void |
load(java.lang.String ruleset)
DEPRECATED: Loads a set of rules into the query processor from a string. |
ParsedQueryIF |
parse(java.lang.String query)
PUBLIC: Parses the query, returning an object representing the result. |
ParsedQueryIF |
parse(java.lang.String query,
DeclarationContextIF context)
PUBLIC: Parses the query in the given context, returning an object representing the result. |
protected TologQuery |
parseQuery(java.lang.String query,
DeclarationContextIF context)
|
ParsedModificationStatementIF |
parseUpdate(java.lang.String statement)
PUBLIC: Parses the update statement, returning an object representing the result. |
ParsedModificationStatementIF |
parseUpdate(java.lang.String statement,
DeclarationContextIF context)
PUBLIC: Parses the update statement in the given context, returning an object representing the result. |
protected ModificationStatement |
parseUpdateStatement(java.lang.String statement,
DeclarationContextIF ctx)
|
QueryMatches |
reduce(TologQuery query,
QueryMatches matches)
INTERNAL: Projects the query results onto the set of variables specified in the 'select' clause. |
protected int |
runUpdate(ModificationStatement statement,
java.util.Map<java.lang.String,?> params)
|
void |
sort(TologQuery query,
QueryMatches matches)
INTERNAL: Sorts the query result as requested. |
int |
update(java.lang.String query)
PUBLIC: Runs the update statement, returning the number of modified objects. |
int |
update(java.lang.String query,
DeclarationContextIF context)
PUBLIC: Runs the update statement in the given declaration context, returning the number of modified objects. |
int |
update(java.lang.String query,
java.util.Map<java.lang.String,?> params)
PUBLIC: Runs the update statement with the given parameters, returning the number of modified objects. |
int |
update(java.lang.String query,
java.util.Map<java.lang.String,?> params,
DeclarationContextIF context)
PUBLIC: Runs the update statement in the given declaration context with the given parameters, returning the number of modified objects. |
Methods inherited from class net.ontopia.topicmaps.query.impl.basic.AbstractQueryProcessor |
---|
findClauseItems, findClauseVariables, satisfy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected TopicMapIF topicmap
protected java.text.Collator collator
protected TologOptions options
protected TologParser parser
Constructor Detail |
---|
public QueryProcessor(TopicMapIF topicmap)
public QueryProcessor(TopicMapIF topicmap, LocatorIF base)
Method Detail |
---|
public TologOptions getOptions()
public QueryResultIF execute(java.lang.String query) throws InvalidQueryException
QueryProcessorIF
execute
in interface QueryProcessorIF
InvalidQueryException
public QueryResultIF execute(java.lang.String query, DeclarationContextIF context) throws InvalidQueryException
QueryProcessorIF
execute
in interface QueryProcessorIF
InvalidQueryException
public QueryResultIF execute(java.lang.String query, java.util.Map arguments) throws InvalidQueryException
QueryProcessorIF
execute
in interface QueryProcessorIF
InvalidQueryException
public QueryResultIF execute(java.lang.String query, java.util.Map arguments, DeclarationContextIF context) throws InvalidQueryException
QueryProcessorIF
execute
in interface QueryProcessorIF
InvalidQueryException
public ParsedQueryIF parse(java.lang.String query) throws InvalidQueryException
QueryProcessorIF
parse
in interface QueryProcessorIF
InvalidQueryException
public ParsedQueryIF parse(java.lang.String query, DeclarationContextIF context) throws InvalidQueryException
QueryProcessorIF
parse
in interface QueryProcessorIF
InvalidQueryException
protected TologQuery parseQuery(java.lang.String query, DeclarationContextIF context) throws InvalidQueryException
InvalidQueryException
public void load(java.lang.String ruleset) throws InvalidQueryException
QueryProcessorIF
load
in interface QueryProcessorIF
InvalidQueryException
public void load(java.io.Reader ruleset) throws InvalidQueryException, java.io.IOException
QueryProcessorIF
load
in interface QueryProcessorIF
InvalidQueryException
java.io.IOException
public QueryResultIF execute(TologQuery query) throws InvalidQueryException
InvalidQueryException
public QueryResultIF execute(TologQuery query, java.util.Map arguments) throws InvalidQueryException
InvalidQueryException
public int update(java.lang.String query) throws InvalidQueryException
QueryProcessorIF
update
in interface QueryProcessorIF
InvalidQueryException
public int update(java.lang.String query, DeclarationContextIF context) throws InvalidQueryException
QueryProcessorIF
update
in interface QueryProcessorIF
InvalidQueryException
public int update(java.lang.String query, java.util.Map<java.lang.String,?> params) throws InvalidQueryException
QueryProcessorIF
update
in interface QueryProcessorIF
InvalidQueryException
public int update(java.lang.String query, java.util.Map<java.lang.String,?> params, DeclarationContextIF context) throws InvalidQueryException
QueryProcessorIF
update
in interface QueryProcessorIF
InvalidQueryException
public ParsedModificationStatementIF parseUpdate(java.lang.String statement) throws InvalidQueryException
QueryProcessorIF
parseUpdate
in interface QueryProcessorIF
InvalidQueryException
public ParsedModificationStatementIF parseUpdate(java.lang.String statement, DeclarationContextIF context) throws InvalidQueryException
QueryProcessorIF
parseUpdate
in interface QueryProcessorIF
InvalidQueryException
protected ModificationStatement parseUpdateStatement(java.lang.String statement, DeclarationContextIF ctx) throws InvalidQueryException
InvalidQueryException
protected int runUpdate(ModificationStatement statement, java.util.Map<java.lang.String,?> params) throws InvalidQueryException
InvalidQueryException
public QueryMatches createInitialMatches(TologQuery query, java.util.Map arguments)
public QueryMatches createInitialMatches(TologQuery query, java.util.Collection items, java.util.Map arguments)
public QueryMatches reduce(TologQuery query, QueryMatches matches)
query
- The parsed query.matches
- The query result.public QueryMatches count(TologQuery query, QueryMatches matches)
query
- The parsed query.matches
- The query result.public void sort(TologQuery query, QueryMatches matches)
query
- The parsed query.matches
- The query result.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |