Package com.attivio.util.parser
Class QueryParsers
- java.lang.Object
-
- com.attivio.util.parser.QueryParsers
-
public class QueryParsers extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description QueryParsers()QueryParsers(QueryOperators operators)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PhraseQuerycreatePhraseQuery(SearchTerm term, boolean quoted)Hook to allow initializing aPhraseQuery.Queryeval(QueryString query)Hook to allow inline parsing ofquery.java.lang.StringgetDefaultSearchField()java.util.TimeZonegetTimeZone()java.lang.ObjectparseObject(StringParser reader)Parse a value.PhraseparsePhrase(ScopeTerm scope, StringParser reader)Parse the nextPhrasefromreader.PhraseparsePhrase(java.lang.String op, int startOffset, ScopeTerm scope, StringParser reader)PhraseparsePhraseTerm(ScopeTerm scope, java.lang.String text, StringParser reader)QueryparseQuery(ScopeTerm scope, StringParser reader)Parse the next Query.QueryparseQuery(java.lang.String value)QueryparseQuery(java.lang.String op, int startOffset, ScopeTerm scope, StringParser reader)Parseopas a query.QueryparseQueryEx(java.lang.String value)QueryparseQueryTerm(ScopeTerm scope, java.lang.String text, StringParser reader)SearchTermparseSearchTerm(StringParser reader)SearchTermsetOffset(SearchTerm term, int startOffset, int endOffset)Hook to allow annotating search terms with start/end offset.
-
-
-
Constructor Detail
-
QueryParsers
public QueryParsers()
-
QueryParsers
public QueryParsers(QueryOperators operators)
-
-
Method Detail
-
getDefaultSearchField
public java.lang.String getDefaultSearchField()
-
getTimeZone
public java.util.TimeZone getTimeZone()
-
parseQuery
public Query parseQuery(java.lang.String value)
-
parseQueryEx
public Query parseQueryEx(java.lang.String value) throws java.text.ParseException
- Throws:
java.text.ParseException
-
eval
public Query eval(QueryString query)
Hook to allow inline parsing ofquery.
-
createPhraseQuery
public PhraseQuery createPhraseQuery(SearchTerm term, boolean quoted)
Hook to allow initializing aPhraseQuery.
-
setOffset
public SearchTerm setOffset(SearchTerm term, int startOffset, int endOffset)
Hook to allow annotating search terms with start/end offset.
-
parseSearchTerm
public SearchTerm parseSearchTerm(StringParser reader) throws java.text.ParseException
- Throws:
java.text.ParseException
-
parseObject
public java.lang.Object parseObject(StringParser reader) throws java.text.ParseException
Parse a value.- Throws:
java.text.ParseException
-
parseQuery
public Query parseQuery(ScopeTerm scope, StringParser reader) throws java.text.ParseException
Parse the next Query.- Throws:
java.text.ParseException
-
parseQuery
public Query parseQuery(java.lang.String op, int startOffset, ScopeTerm scope, StringParser reader) throws java.text.ParseException
Parseopas a query.- Throws:
java.text.ParseException
-
parsePhrase
public Phrase parsePhrase(ScopeTerm scope, StringParser reader) throws java.text.ParseException
Parse the nextPhrasefromreader.- Throws:
java.text.ParseException
-
parsePhrase
public Phrase parsePhrase(java.lang.String op, int startOffset, ScopeTerm scope, StringParser reader) throws java.text.ParseException
- Throws:
java.text.ParseException
-
parseQueryTerm
public Query parseQueryTerm(ScopeTerm scope, java.lang.String text, StringParser reader) throws java.text.ParseException
- Throws:
java.text.ParseException
-
parsePhraseTerm
public Phrase parsePhraseTerm(ScopeTerm scope, java.lang.String text, StringParser reader) throws java.text.ParseException
- Throws:
java.text.ParseException
-
-