001/*
002 *    GeoAPI - Java interfaces for OGC/ISO standards
003 *    Copyright © 2012-2023 Open Geospatial Consortium, Inc.
004 *    http://www.geoapi.org
005 *
006 *    Licensed under the Apache License, Version 2.0 (the "License");
007 *    you may not use this file except in compliance with the License.
008 *    You may obtain a copy of the License at
009 *
010 *        http://www.apache.org/licenses/LICENSE-2.0
011 *
012 *    Unless required by applicable law or agreed to in writing, software
013 *    distributed under the License is distributed on an "AS IS" BASIS,
014 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 *    See the License for the specific language governing permissions and
016 *    limitations under the License.
017 */
018package org.opengis.filter;
019
020import java.util.Optional;
021import org.opengis.annotation.UML;
022import org.opengis.annotation.Classifier;
023import org.opengis.annotation.Stereotype;
024
025import static org.opengis.annotation.Obligation.OPTIONAL;
026import static org.opengis.annotation.Specification.ISO_19143;
027
028
029/**
030 * An action that performs a search over some set of resources and returns a subset of those resources.
031 *
032 * @author  Johann Sorel (Geomatys)
033 * @author  Martin Desruisseaux (Geomatys)
034 * @version 3.1
035 * @since   3.1
036 */
037@Classifier(Stereotype.ABSTRACT)
038@UML(identifier="QueryExpression", specification=ISO_19143)
039public interface QueryExpression {
040    /**
041     * User-defined identifier for the purpose of error handling or correlating the response to a query.
042     *
043     * @return user-defined identifier.
044     */
045    @UML(identifier="handle", obligation=OPTIONAL, specification=ISO_19143)
046    default Optional<String> getHandle() {
047        return Optional.empty();
048    }
049}