Package org.gvsig.catalog.languages
Class FilterEncoding
java.lang.Object
org.gvsig.catalog.languages.AbstractGeneralLanguage
org.gvsig.catalog.languages.FilterEncoding
- All Implemented Interfaces:
ILanguages
This class implements the Filter Encoding Language. It is used to
create queries in this language
- Author:
- Jorge Piera Llodra (jorge.piera@iver.es)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.gvsig.catalog.languages.AbstractGeneralLanguage
ALL_WORDS, and, AND, ANY_WORDS, currentClause, currentQuery, EXACT_WORDS, or, OR -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new Filter Encoding Parser with the deafault valuesFilterEncoding(String prefix, String wildCard, String singleChar, String escape) Create a new Filter Encoding Parser -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBoundingBox(Coordinates coordinates, String propertyName, boolean not) It Adds a Bounding Box queryvoidaddClauses(String propertyName, String propertyValue, String concordancia) It Adds a new clause of the queryvoidaddClauses(String propertyName, String propertyValue, String concordancia, String relationship, String type, String operator) It Adds a new clause of the queryvoidaddClauses(String propertyName, Iterator propertyValues, String concordancia, String relationship, String type, String operator) It Adds a new clause of the queryprotected voidaddCurrentClauseQuery(String operator) It adds the "and" label to join different operationsvoidsetEscapeCharLabel(String escapeCharLabel) voidsetSingleCharLabel(String singleCharLabel) voidsetWildCardLabel(String wildCardLabel) toString()It returns the encoded queryMethods inherited from class org.gvsig.catalog.languages.AbstractGeneralLanguage
getOperator, parseValues, parseValues
-
Field Details
-
PROPERTY_IS_LIKE
- See Also:
-
PROPERTY_IS_LESS
- See Also:
-
PROPERTY_IS_GREATER
- See Also:
-
PROPERTY_IS_GREATER_THAN
- See Also:
-
PROPERTY_IS_LESS_THAN
- See Also:
-
PROPERTY_IS_EQUALS_TO
- See Also:
-
TYPE_LITERAL
- See Also:
-
TYPE_TWO_PROPERTIES
- See Also:
-
DEFAULT_PREFIX
- See Also:
-
DEFAULT_WILDCARD
- See Also:
-
DEFAULT_SINGLECHAR
- See Also:
-
DEFAULT_ESCAPE
- See Also:
-
DEFAULT_NAMESPACE
- See Also:
-
-
Constructor Details
-
FilterEncoding
Create a new Filter Encoding Parser- Parameters:
prefix- Prefix of the labels (if its necessary). Typically "ogc".wildCard- It Depends of the serversingleChar- It Depends of the serverescape- It Depends of the server
-
FilterEncoding
public FilterEncoding()Create a new Filter Encoding Parser with the deafault values
-
-
Method Details
-
addClauses
public void addClauses(String propertyName, String propertyValue, String concordancia, String relationship, String type, String operator) It Adds a new clause of the query- Parameters:
propertyName- The property namepropertyValue- The property valueconcordancia- "E" (Exact phrase), "A" (All words) or "Y" (anY word).relationship- PropertyIsLike, PropertyIsLess, PropertyIsGreater,... See the File encoding Documentation.type- Values: "P" (to comparate two propertyes) or "L" (to comparate one property and one literal value)operator- "And" or "Or". Operator between fields
-
addClauses
It Adds a new clause of the query- Parameters:
propertyName- The property namepropertyValue- The property valueconcordancia- "E" (Exact phrase), "A" (All words) or "Y" (anY word).
-
addClauses
public void addClauses(String propertyName, Iterator propertyValues, String concordancia, String relationship, String type, String operator) It Adds a new clause of the query- Parameters:
propertyName- The property namepropertyValues- The property value separated by blank spacesconcordancia- "E" (Exact phrase), "A" (All words) or "Y" (anY word).relationship- PropertyIsLike, PropertyIsLess, PropertyIsGreater,... See the File encoding Documentation.type- Values: "P" (to comparate two propertyes) or "L" (to comparate one property and one literal value)operator- "And" or "Or". Operator between fields
-
addCurrentClauseQuery
It adds the "and" label to join different operations- Parameters:
operator-
-
toString
It returns the encoded query- Specified by:
toStringin interfaceILanguages- Overrides:
toStringin classObject- Returns:
-
addBoundingBox
It Adds a Bounding Box query- Parameters:
coordinates- Coordinates to findpropertyName- Property that contains the geom fieldnot- If we have to envolve the query with the "NOT" tag.
-
getWildCard
- Returns:
- the wildCard
-
getWildCardLabel
- Returns:
- the wildCardLabel
-
setWildCardLabel
- Parameters:
wildCardLabel- the wildCardLabel to set
-
getEscapeCharLabel
- Returns:
- the escapeCharLabel
-
setEscapeCharLabel
- Parameters:
escapeCharLabel- the escapeCharLabel to set
-
getSingleCharLabel
- Returns:
- the singleCharLabel
-
setSingleCharLabel
- Parameters:
singleCharLabel- the singleCharLabel to set
-