|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.layer.vpf.GeoSymAttExpression
public class GeoSymAttExpression
This parser class takes a string representing a logic statement and parses it into objects that can be used for evaluating attributes of features. It's based on expressions specified in the GeoSym Handbook MIL-HDBK-857A.
It can parse the expression given per the specification, such as 42|1|bfc|1|0|1, or the strings specified in the symbol tables in the MIL-DTL-89045A, like bfc=81 AND sta<>0and<>1and<>2and<>3and<>5and<>6and<>11.
Nested Class Summary | |
---|---|
static class |
GeoSymAttExpression.ColumnExpression
A ColumnExpression is the comparison of an FCI column value against another column value. |
static class |
GeoSymAttExpression.CompareExpression
|
static class |
GeoSymAttExpression.Connector
Connector class is the part of the expression that contains the logic operation, AND, OR, and and or. |
static class |
GeoSymAttExpression.ECDISExpression
The ECDISExpression checks the warehouse for user set values when evaluating. |
static interface |
GeoSymAttExpression.Expression
The Expression interface allows for the recursive queries of Connectors and Value/CompareExpressions. |
static class |
GeoSymAttExpression.StringExpression
The ECDISExpression checks the warehouse for user set values when evaluating. |
static class |
GeoSymAttExpression.ValueExpression
The ValueExpression is a comparison of a FCI value to a numerical value. |
Field Summary | |
---|---|
static int |
and_CONN
|
static int |
AND_CONN
|
static int |
EQUALS_OP
|
protected GeoSymAttExpression.Expression |
exp
|
static int |
GREATER_THAN_OP
|
static int |
GT_EQUALS_OP
|
static int |
LESS_THAN_OP
|
static int |
LT_EQUALS_OP
|
static int |
NO_OP
|
static int |
NONE_CONN
|
static int |
NOT_EQUALS_OP
|
protected static java.lang.String[] |
ops
The NOOP goes first to preserve the index value of each operator, as specifed in the GeoSym spec. |
static int |
or_CONN
|
static int |
OR_CONN
|
protected VPFAutoFeatureGraphicWarehouse |
warehouse
|
Constructor Summary | |
---|---|
GeoSymAttExpression(java.lang.String source,
VPFAutoFeatureGraphicWarehouse warehouse)
Create the expression object given a text representation of it. |
Method Summary | |
---|---|
boolean |
evaluate(FeatureClassInfo fci,
int row)
Does the feature in row of fci pass the conditions of this expression. |
boolean |
evaluate(FeatureClassInfo fci,
java.util.List<java.lang.Object> row)
This one is used by the CoverageTable. |
protected GeoSymAttExpression.Expression |
findExpression(java.lang.String source)
Recursive parsing statement. |
protected GeoSymAttExpression.Expression |
findMathOp(java.lang.String source)
|
protected GeoSymAttExpression.Connector |
findMiniOp(java.lang.String source)
|
protected GeoSymAttExpression.Connector |
findOp(java.lang.String source)
|
static void |
main(java.lang.String[] args)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int NO_OP
public static final int EQUALS_OP
public static final int NOT_EQUALS_OP
public static final int LESS_THAN_OP
public static final int GREATER_THAN_OP
public static final int LT_EQUALS_OP
public static final int GT_EQUALS_OP
public static final int NONE_CONN
public static final int or_CONN
public static final int AND_CONN
public static final int and_CONN
public static final int OR_CONN
protected VPFAutoFeatureGraphicWarehouse warehouse
protected GeoSymAttExpression.Expression exp
protected static java.lang.String[] ops
Constructor Detail |
---|
public GeoSymAttExpression(java.lang.String source, VPFAutoFeatureGraphicWarehouse warehouse)
source
- warehouse
- used to resolve the ECDIS variables.Method Detail |
---|
protected GeoSymAttExpression.Connector findOp(java.lang.String source)
public java.lang.String toString()
toString
in class java.lang.Object
protected GeoSymAttExpression.Connector findMiniOp(java.lang.String source)
protected GeoSymAttExpression.Expression findMathOp(java.lang.String source)
protected GeoSymAttExpression.Expression findExpression(java.lang.String source)
source
-
public boolean evaluate(FeatureClassInfo fci, int row)
fci
- row
-
public boolean evaluate(FeatureClassInfo fci, java.util.List<java.lang.Object> row)
fci
- row
-
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |