All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.anno4j.querying.Comparison Maven / Gradle / Ivy

Go to download

Read and write API for W3C Web Annotation Data Model (http://www.w3.org/TR/annotation-model/) and W3C Open Annotation Data Model (http://www.openannotation.org/spec/core/)

There is a newer version: 2.4
Show newest version
package com.github.anno4j.querying;

import org.openrdf.query.algebra.evaluation.function.string.Contains;

/**
 * Possible comparison methods
 */
public enum Comparison {
    /**
     * Equal
     */
    EQ("="),

    /**
     * Greater than or equal
     */
    GTE(">="),

    /**
     * Greater than
     */
    GT(">"),

    /**
     * Lower than
     */
    LT("<"),

    /**
     * Lower than or equals
     */
    LTE("<="),

    CONTAINS("contains"),

    STARTS_WITH("startsWith"),

    ENDS_WITH("endWith");

    private String sparqlOperator;

    /**
     * Constructor
     * @param sparqlOperator comparison operator in SPARQL
     */
    Comparison(String sparqlOperator) {
        this.sparqlOperator = sparqlOperator;
    }

    /**
     * Getter for the SPARQL comparison operator
     * @return comparison operator in SPARQL
     */
    public String getSparqlOperator() {
        return sparqlOperator;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy