001/*
002 * Copyright 2014 Global Biodiversity Information Facility (GBIF)
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.gbif.api.model.occurrence.predicate;
017
018import org.codehaus.jackson.annotate.JsonSubTypes;
019import org.codehaus.jackson.annotate.JsonTypeInfo;
020
021import static org.codehaus.jackson.annotate.JsonSubTypes.Type;
022
023@JsonTypeInfo(
024  use = JsonTypeInfo.Id.NAME,
025  include = JsonTypeInfo.As.PROPERTY,
026  property = "type")
027@JsonSubTypes({@Type(value = ConjunctionPredicate.class, name = "and"),
028               @Type(value = DisjunctionPredicate.class, name = "or"),
029               @Type(value = EqualsPredicate.class, name = "equals"),
030               @Type(value = LikePredicate.class, name = "like"),
031               @Type(value = LessThanPredicate.class, name = "lessThan"),
032               @Type(value = LessThanOrEqualsPredicate.class, name = "lessThanOrEquals"),
033               @Type(value = GreaterThanPredicate.class, name = "greaterThan"),
034               @Type(value = GreaterThanOrEqualsPredicate.class, name = "greaterThanOrEquals"),
035               @Type(value = InPredicate.class, name = "in"),
036               @Type(value = WithinPredicate.class, name = "within"),
037               @Type(value = NotPredicate.class, name = "not"),
038               @Type(value = IsNotNullPredicate.class, name = "isNotNull")})
039public interface Predicate {
040
041}