Package org.yamcs.utils.parser
Class FilterParser<T>
java.lang.Object
org.yamcs.utils.parser.FilterParser<T>
- All Implemented Interfaces:
FilterParserConstants
-
Field Summary
Modifier and TypeFieldDescriptionNext token.Current token.Generated Token Manager.Fields inherited from interface org.yamcs.utils.parser.FilterParserConstants
AND, DEFAULT, EOF, EQUAL_TO, GREATER_THAN, GREATER_THAN_OR_EQUAL_TO, HAS, LESS_THAN, LESS_THAN_OR_EQUAL_TO, LPAREN, MINUS, NOT, NOT_EQUAL_TO, OR, QUOTED_STRING, RE_EQUAL_TO, RE_NOT_EQUAL_TO, RPAREN, SINGLE_LINE_COMMENT, STRING, tokenImage, WS
-
Constructor Summary
ConstructorDescriptionFilterParser
(InputStream stream) Constructor with InputStream.FilterParser
(InputStream stream, String encoding) Constructor with InputStream and supplied encodingFilterParser
(Reader stream) Constructor.Constructor with generated Token Manager. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBinaryField
(String field, Function<T, byte[]> resolver) void
addBooleanField
(String field, Function<T, Boolean> resolver) <E extends Enum<?>>
voidaddEnumField
(String field, Class<E> enumClass, Function<T, E> resolver) void
addNumberField
(String field, Function<T, Number> resolver) void
addPrefixField
(String field, BiFunction<T, String, String> resolver) void
addStringField
(String field, Function<T, String> resolver) final AndExpression
and()
final Comparator
final Comparison
final void
Disable tracing.final void
Enable tracing.final AndExpression
expr()
<E extends Enum<?>>
EFinds the constant for an Enum label, but case-insensitive.Generate ParseException.getBinaryResolver
(String field) getBooleanResolver
(String field) getEnumClass
(String field) getEnumResolver
(String field) final Token
Get the next Token.getNumberResolver
(String field) getPrefixResolver
(String field) getStringResolver
(String field) final Token
getToken
(int index) Get the specific Token.boolean
boolean
isQueryField
(String field) final OrExpression
or()
final AndExpression
parse()
void
ReInit
(InputStream stream) Reinitialise.void
ReInit
(InputStream stream, String encoding) Reinitialise.void
Reinitialise.void
Reinitialise.final String
term()
final UnaryExpression
unary()
-
Field Details
-
token_source
Generated Token Manager. -
token
Current token. -
jj_nt
Next token.
-
-
Constructor Details
-
FilterParser
Constructor with InputStream. -
FilterParser
Constructor with InputStream and supplied encoding -
FilterParser
Constructor. -
FilterParser
Constructor with generated Token Manager.
-
-
Method Details
-
isQueryField
-
includesTextSearch
public boolean includesTextSearch() -
addPrefixField
-
addStringField
-
addEnumField
-
addNumberField
-
addBooleanField
-
addBinaryField
-
getPrefixResolver
-
getStringResolver
-
getNumberResolver
-
getBooleanResolver
-
getBinaryResolver
-
getEnumResolver
-
getEnumClass
-
findEnum
Finds the constant for an Enum label, but case-insensitive. -
parse
- Throws:
ParseException
-
expr
- Throws:
ParseException
-
and
- Throws:
ParseException
-
or
- Throws:
ParseException
-
unary
- Throws:
ParseException
-
comparison
- Throws:
ParseException
-
term
- Throws:
ParseException
-
comparator
- Throws:
ParseException
-
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
getNextToken
Get the next Token. -
getToken
Get the specific Token. -
generateParseException
Generate ParseException. -
enable_tracing
public final void enable_tracing()Enable tracing. -
disable_tracing
public final void disable_tracing()Disable tracing.
-