|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--edu.ucsb.adl.middleware.Query.Constraint
|
+--edu.ucsb.adl.middleware.Query.SimpleConstraint
|
+--edu.ucsb.adl.middleware.Query.SpatialConstraint
A spatial (i.e., geographic) constraint.
| Nested Class Summary | |
static class |
Query.SpatialConstraint.Vertex
A polygon vertex. |
| Field Summary | |
static int |
BOX
Identifies the box type of target region. |
static int |
POLYGON
Identifies the spherical polygon type of target region. |
| Fields inherited from class edu.ucsb.adl.middleware.Query.SimpleConstraint |
m_bucket, m_field, m_operator |
| Fields inherited from class edu.ucsb.adl.middleware.Query.Constraint |
m_parent |
| Constructor Summary | |
Query.SpatialConstraint(java.lang.String bucket,
Query.Field field,
java.lang.String operator,
double northBoundary,
double southBoundary,
double eastBoundary,
double westBoundary)
Constructs a SpatialConstraint whose target
region is a box. |
|
Query.SpatialConstraint(java.lang.String bucket,
Query.Field field,
java.lang.String operator,
double northBoundary,
double southBoundary,
double eastBoundary,
double westBoundary,
Query.SpatialConstraint.Vertex[] vertices)
Constructs a SpatialConstraint whose target
region is a spherical polygon. |
|
| Method Summary | |
double |
getEastBoundary()
Returns the east boundary of the target region. |
double |
getNorthBoundary()
Returns the north boundary of the target region. |
double |
getSouthBoundary()
Returns the south boundary of the target region. |
int |
getType()
Returns the target region type. |
Query.SpatialConstraint.Vertex[] |
getVertices()
Returns the vertices of a polygon target region. |
double |
getWestBoundary()
Returns the west boundary of the target region. |
java.lang.String |
toHTML(java.lang.String mapServerURL)
Converts the constraint to HTML. |
java.lang.String |
toXML(int level)
Converts the constraint to XML. |
| Methods inherited from class edu.ucsb.adl.middleware.Query.SimpleConstraint |
commonFieldsToXML, getBucket, getField, getOperator |
| Methods inherited from class edu.ucsb.adl.middleware.Query.Constraint |
getParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int BOX
public static final int POLYGON
| Constructor Detail |
public Query.SpatialConstraint(java.lang.String bucket,
Query.Field field,
java.lang.String operator,
double northBoundary,
double southBoundary,
double eastBoundary,
double westBoundary)
SpatialConstraint whose target
region is a box.
bucket - The bucket to constrain, e.g.,
"geographic-locations".field - The field to constrain, or null.operator - The constraint operator, e.g., "overlaps".northBoundary - The north boundary of the box in degrees north of the
equator.southBoundary - The south boundary of the box in degrees north of the
equator.eastBoundary - The east boundary of the box in degrees east of the
Greenwich meridian.westBoundary - The west boundary of the box in degrees east of the
Greenwich meridian.
java.lang.IllegalArgumentException - If any of the boundary coordinates is invalid.
java.lang.NullPointerException - If bucket or operator are
null.
public Query.SpatialConstraint(java.lang.String bucket,
Query.Field field,
java.lang.String operator,
double northBoundary,
double southBoundary,
double eastBoundary,
double westBoundary,
Query.SpatialConstraint.Vertex[] vertices)
SpatialConstraint whose target
region is a spherical polygon.
bucket - The bucket to constrain, e.g.,
"geographic-locations".field - The field to constrain, or null.operator - The constraint operator, e.g., "overlaps".northBoundary - The north boundary of the polygon's bounding box in degrees
north of the equator.southBoundary - The south boundary of the polygon's bounding box in degrees
north of the equator.eastBoundary - The east boundary of the polygon's bounding box in degrees
east of the Greenwich meridian.westBoundary - The west boundary of the polygon's bounding box in degrees
east of the Greenwich meridian.vertices - The vertices of the polygon in counterclockwise order. The
array should not be modified after calling this method.
java.lang.IllegalArgumentException - If any of the boundary coordinates is invalid, if
vertices has fewer than three elements, or if
any vertex coordinate is invalid. Note that it is not
checked that the polygon is in fact simple. Nor is it
checked that the bounding coordinates do in fact define the
polygon's bounding box.
java.lang.NullPointerException - If any argument other than field, or any
element of vertices, is null.| Method Detail |
public int getType()
public double getNorthBoundary()
public double getSouthBoundary()
public double getEastBoundary()
public double getWestBoundary()
public Query.SpatialConstraint.Vertex[] getVertices()
public java.lang.String toHTML(java.lang.String mapServerURL)
toHTML in class Query.ConstraintmapServerURL - The template URL of a map server or null.
<li> elements.public java.lang.String toXML(int level)
toXML in class Query.Constraintlevel - The current indentation level; should be nonnegative.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||