|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.expr.AbstractExpr
org.geotools.expr.AbstractMathExpr
Field Summary | |
protected FilterFactory |
factory
|
Constructor Summary | |
AbstractMathExpr()
|
Method Summary | |
MathExpr |
add(double number)
|
MathExpr |
add(MathExpr expr)
|
MathExpr |
add(java.lang.Number number)
|
Expr |
and(Expr expr)
Explicit Expr chain extention - required for custom Expressions. |
Expr |
bbox(com.vividsolutions.jts.geom.Envelope bbox)
Convience method for: geom().disjoint( geom( bbox )).not() |
Expr |
between(double min,
double max)
|
Expr |
between(Expr min,
Expr max)
min <= expr <= max |
Expr |
between(java.lang.Number min,
java.lang.Number max)
|
MathExpr |
divide(double number)
|
MathExpr |
divide(MathExpr expr)
|
MathExpr |
divide(java.lang.Number number)
|
Expr |
eq(double number)
|
Expr |
eq(Expr expr)
expr == expr |
Expr |
eq(java.lang.Number number)
|
Expr |
eval()
Evaludate Expr - with LiteralExpr as a goal. |
Expression |
expression(FeatureType schema)
Turns a Filter into an a logical true/false expression. |
Expr |
fid(java.util.Set fids)
expr.filter( fids ) Restruct current Expr to provided featureId(s). |
Expr |
fid(java.lang.String featureID)
Convience method for accessing a single fid |
Filter |
filter(FeatureType schema)
Useful super class that casts expressions into a Filter. |
Expr |
fn(java.lang.String name)
name( expr ) |
Expr |
fn(java.lang.String name,
Expr expr)
name( expr, expr ) |
Expr |
fn(java.lang.String name,
Expr[] expr)
name( expr[0], expr[0], ... ) |
Expr |
gt(double number)
|
Expr |
gt(Expr expr)
expr > expr |
Expr |
gt(java.lang.Number number)
|
Expr |
gte(double number)
|
Expr |
gte(Expr expr)
expr >= expr |
Expr |
gte(java.lang.Number number)
|
Expr |
lt(double number)
|
Expr |
lt(Expr expr)
expr < expr |
Expr |
lt(java.lang.Number number)
|
Expr |
lte(double number)
|
Expr |
lte(Expr expr)
expr <= expr |
Expr |
lte(java.lang.Number number)
|
MathExpr |
multiply(double number)
|
MathExpr |
multiply(MathExpr expr)
|
MathExpr |
multiply(java.lang.Number number)
|
Expr |
ne(double number)
|
Expr |
ne(Expr expr)
expr ! |
Expr |
ne(java.lang.Number number)
|
Expr |
not()
! |
Expr |
notNull()
expr ! |
Expr |
or(Expr expr)
Expr Disjunction |
Expr |
reduce(java.lang.String bind)
Reduce attributes matching "bind/x" to "x". |
Expr |
resolve(org.opengis.catalog.MetadataEntity metadata)
Bind all meta entries according to provided metadata. |
Expr |
resolve(java.lang.String bind,
Feature feature)
Bind attributes matching "bind/x" to feature.getAttribute("x"). |
MathExpr |
subtract(double number)
|
MathExpr |
subtract(MathExpr expr)
|
MathExpr |
subtract(java.lang.Number number)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.geotools.expr.Expr |
and, bbox, between, eq, eval, expression, fid, fid, filter, fn, fn, fn, gt, gte, lt, lte, ne, not, notNull, or, reduce, resolve, resolve |
Field Detail |
protected FilterFactory factory
Constructor Detail |
public AbstractMathExpr()
Method Detail |
public MathExpr add(MathExpr expr)
add
in interface MathExpr
public MathExpr add(java.lang.Number number)
add
in interface MathExpr
public MathExpr add(double number)
add
in interface MathExpr
public MathExpr subtract(MathExpr expr)
subtract
in interface MathExpr
public MathExpr subtract(java.lang.Number number)
subtract
in interface MathExpr
public MathExpr subtract(double number)
subtract
in interface MathExpr
public MathExpr divide(MathExpr expr)
divide
in interface MathExpr
public MathExpr divide(java.lang.Number number)
divide
in interface MathExpr
public MathExpr divide(double number)
divide
in interface MathExpr
public MathExpr multiply(MathExpr expr)
multiply
in interface MathExpr
public MathExpr multiply(java.lang.Number number)
multiply
in interface MathExpr
public MathExpr multiply(double number)
multiply
in interface MathExpr
public Expr eq(java.lang.Number number)
eq
in interface MathExpr
public Expr eq(double number)
eq
in interface MathExpr
public Expr gt(java.lang.Number number)
gt
in interface MathExpr
public Expr gt(double number)
gt
in interface MathExpr
public Expr gte(java.lang.Number number)
gte
in interface MathExpr
public Expr gte(double number)
gte
in interface MathExpr
public Expr lt(java.lang.Number number)
lt
in interface MathExpr
public Expr lt(double number)
lt
in interface MathExpr
public Expr lte(java.lang.Number number)
lte
in interface MathExpr
public Expr lte(double number)
lte
in interface MathExpr
public Expr ne(java.lang.Number number)
ne
in interface MathExpr
public Expr ne(double number)
ne
in interface MathExpr
public Expr between(java.lang.Number min, java.lang.Number max)
between
in interface MathExpr
public Expr between(double min, double max)
between
in interface MathExpr
public Expr eval()
By default this method simply returns the current Expr.
eval
in interface Expr
public Expr resolve(org.opengis.catalog.MetadataEntity metadata)
Feature
resolve
in interface Expr
metadata
-
public Expr reduce(java.lang.String bind)
This may be used to reduce an Expr as part of an otter join, to something simple that can be passed off to an DataStore by way of filter( FeatureType ).
Example:
FeatureType RIVER = river.getSchema();
FeatureType HAZZARD = hazard.getSchema();
Expr joinExpr = Exprs.attribute("river/name").eq( Exprs.attribute("hazzard/river") );
FeatureReader outer = river.getFeatures().reader();
while( reader.hasNext() ){
Feature aRiver = outer.next();
Expr inner = joinExpr.resolve( "river", aRiver ).reduce( "hazzard" );
FeatureReader inner = district.getFeatures( inner.filter( HAZZARD ) );
while( inner.hasNext() ){
Feature aHazzard = inner.next();
// code here has access to both aRiver and aHazzard
}
inner.close();
}
outer.close();
reduce
in interface Expr
public Expr resolve(java.lang.String bind, Feature feature)
This may be used to reduce an Expr as part of an otter join, to something simple that can be passed off to an DataStore by way of filter( FeatureType ).
resolve
in interface Expr
bind
- feature
-
public Filter filter(FeatureType schema) throws java.io.IOException
To turn Expression into a Filter I am going to follow the usual Perl defaults of "true".
filter
in interface Expr
java.io.IOException
public Expression expression(FeatureType schema) throws java.io.IOException
expression
in interface Expr
java.io.IOException
public Expr bbox(com.vividsolutions.jts.geom.Envelope bbox)
bbox
in interface Expr
public Expr fid(java.lang.String featureID)
fid
in interface Expr
public Expr fid(java.util.Set fids)
Expr
Restruct current Expr to provided featureId(s).
fid
in interface Expr
public Expr not()
Expr
Invert of logical TRUTH value. Can be used to test for non contained fitler contents or FALSE Expressions
not
in interface Expr
public Expr and(Expr expr)
Expr
and
in interface Expr
expr
-
public Expr or(Expr expr)
Expr
or
in interface Expr
public Expr eq(Expr expr)
Expr
eq
in interface Expr
public Expr gt(Expr expr)
Expr
gt
in interface Expr
public Expr gte(Expr expr)
Expr
gte
in interface Expr
public Expr lt(Expr expr)
Expr
lt
in interface Expr
public Expr lte(Expr expr)
Expr
lte
in interface Expr
public Expr ne(Expr expr)
Expr
ne
in interface Expr
public Expr between(Expr min, Expr max)
Expr
between
in interface Expr
public Expr notNull()
Expr
notNull
in interface Expr
public Expr fn(java.lang.String name)
Expr
fn
in interface Expr
public Expr fn(java.lang.String name, Expr expr)
Expr
fn
in interface Expr
public Expr fn(java.lang.String name, Expr[] expr)
Expr
fn
in interface Expr
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |