001 /*
002 * GeoAPI - Java interfaces for OGC/ISO standards
003 * http://www.geoapi.org
004 *
005 * Copyright (C) 2006-2012 Open Geospatial Consortium, Inc.
006 * All Rights Reserved. http://www.opengeospatial.org/ogc/legal
007 *
008 * Permission to use, copy, and modify this software and its documentation, with
009 * or without modification, for any purpose and without fee or royalty is hereby
010 * granted, provided that you include the following on ALL copies of the software
011 * and documentation or portions thereof, including modifications, that you make:
012 *
013 * 1. The full text of this NOTICE in a location viewable to users of the
014 * redistributed or derivative work.
015 * 2. Notice of any changes or modifications to the OGC files, including the
016 * date changes were made.
017 *
018 * THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE
019 * NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
020 * TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT
021 * THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY
022 * PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
023 *
024 * COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
025 * CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION.
026 *
027 * The name and trademarks of copyright holders may NOT be used in advertising or
028 * publicity pertaining to the software without specific, written prior permission.
029 * Title to copyright in this software and any associated documentation will at all
030 * times remain with copyright holders.
031 */
032 package org.opengis.filter;
033
034 // OpenGIS direct dependencies
035 import org.opengis.annotation.Profile;
036 import org.opengis.annotation.XmlElement;
037 import org.opengis.filter.expression.Expression;
038
039
040 /**
041 * Filter operator that performs the equivalent of the SQL "{@code like}" operator
042 * on properties of a feature. The {@code PropertyIsLike} element is intended to encode
043 * a character string comparison operator with pattern matching. The pattern is defined
044 * by a combination of regular characters, the {@link #getWildCard wildCard} character,
045 * the {@link #getSingleChar singleChar} character, and the {@link #getEscape escape}
046 * character. The {@code wildCard} character matches zero or more characters. The
047 * {@code singleChar} character matches exactly one character. The {@code escape}
048 * character is used to escape the meaning of the {@code wildCard}, {@code singleChar}
049 * and {@code escape} itself.
050 *
051 * @version <A HREF="http://www.opengis.org/docs/02-059.pdf">Implementation specification 1.0</A>
052 * @author Chris Dillard (SYS Technologies)
053 * @since GeoAPI 2.0
054 */
055 @XmlElement("PropertyIsLike")
056 public interface PropertyIsLike extends Filter {
057 /** Operator name used to check FilterCapabilities */
058 public static String NAME = "Like";
059 /**
060 * Returns the expression whose value will be compared against the wildcard-
061 * containing string provided by the getLiteral() method.
062 */
063 @XmlElement("PropertyName")
064 Expression getExpression();
065
066 /**
067 * Returns the wildcard-containing string that will be used to check the
068 * feature's properties.
069 */
070 @XmlElement("Literal")
071 String getLiteral();
072
073 /**
074 * Returns the string that can be used in the "literal" property of this
075 * object to match any sequence of characters.
076 * <p>
077 * The default value for this property is the one character string "%".
078 */
079 @XmlElement("wildCard")
080 String getWildCard();
081
082 /**
083 * Returns the string that can be used in the "literal" property of this
084 * object to match exactly one character.
085 * <p>
086 * The default value for this property is the one character string "_".
087 */
088 @XmlElement("singleChar")
089 String getSingleChar();
090
091 /**
092 * Returns the string that can be used in the "literal" property of this
093 * object to prefix one of the wild card characters to indicate that it
094 * should be matched literally in the content of the feature's property.
095 * The default value for this property is the single character "'".
096 */
097 @XmlElement("escape")
098 String getEscape();
099
100 /**
101 * Flag controlling wither comparisons are case sensitive.
102 * <p>
103 * The ability to match case is pending the Filter 2.0 specification.
104 *
105 * @return <code>true</code> if the comparison is case sensetive, otherwise <code>false</code>.
106 */
107 @XmlElement("matchCase")
108 boolean isMatchingCase();
109 }