Class FilterEncoding

java.lang.Object
org.gvsig.catalog.languages.AbstractGeneralLanguage
org.gvsig.catalog.languages.FilterEncoding
All Implemented Interfaces:
ILanguages

public class FilterEncoding extends AbstractGeneralLanguage
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 Details

  • Constructor Details

    • FilterEncoding

      public FilterEncoding(String prefix, String wildCard, String singleChar, String escape)
      Create a new Filter Encoding Parser
      Parameters:
      prefix - Prefix of the labels (if its necessary). Typically "ogc".
      wildCard - It Depends of the server
      singleChar - It Depends of the server
      escape - 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 name
      propertyValue - The property value
      concordancia - "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

      public void addClauses(String propertyName, String propertyValue, String concordancia)
      It Adds a new clause of the query
      Parameters:
      propertyName - The property name
      propertyValue - The property value
      concordancia - "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 name
      propertyValues - The property value separated by blank spaces
      concordancia - "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

      protected void addCurrentClauseQuery(String operator)
      It adds the "and" label to join different operations
      Parameters:
      operator -
    • toString

      public String toString()
      It returns the encoded query
      Specified by:
      toString in interface ILanguages
      Overrides:
      toString in class Object
      Returns:
    • addBoundingBox

      public void addBoundingBox(Coordinates coordinates, String propertyName, boolean not)
      It Adds a Bounding Box query
      Parameters:
      coordinates - Coordinates to find
      propertyName - Property that contains the geom field
      not - If we have to envolve the query with the "NOT" tag.
    • getWildCard

      public String getWildCard()
      Returns:
      the wildCard
    • getWildCardLabel

      public String getWildCardLabel()
      Returns:
      the wildCardLabel
    • setWildCardLabel

      public void setWildCardLabel(String wildCardLabel)
      Parameters:
      wildCardLabel - the wildCardLabel to set
    • getEscapeCharLabel

      public String getEscapeCharLabel()
      Returns:
      the escapeCharLabel
    • setEscapeCharLabel

      public void setEscapeCharLabel(String escapeCharLabel)
      Parameters:
      escapeCharLabel - the escapeCharLabel to set
    • getSingleCharLabel

      public String getSingleCharLabel()
      Returns:
      the singleCharLabel
    • setSingleCharLabel

      public void setSingleCharLabel(String singleCharLabel)
      Parameters:
      singleCharLabel - the singleCharLabel to set