Package org.intermine.metadata
Class ConstraintOp
- java.lang.Object
-
- org.intermine.metadata.ConstraintOp
-
public final class ConstraintOp extends java.lang.Object
Operations used in building constraints. TODO: These should be enums so that they are switchable.- Author:
- Mark Woodbridge, Matthew Wakeling
-
-
Field Summary
Fields Modifier and Type Field Description static ConstraintOp
AND
Combine constraints with the AND operationstatic ConstraintOp
CONTAINS
Require that the first argument contains the secondstatic ConstraintOp
DOES_NOT_CONTAIN
Require that the first argument does not contain the secondstatic ConstraintOp
DOES_NOT_EXIST
Subquery does not existstatic ConstraintOp
DOES_NOT_MATCH
Require that the two arguments do not matchstatic ConstraintOp
DOES_NOT_OVERLAP
Require that a range does not overlap another rangestatic ConstraintOp
EQUALS
Require that the two arguments are equal, regardless of case for stringsstatic ConstraintOp
EXACT_MATCH
Require that the two arguments are exactly equalstatic ConstraintOp
EXISTS
Subquery existsstatic ConstraintOp
GREATER_THAN
Require that the first argument is greater than the secondstatic ConstraintOp
GREATER_THAN_EQUALS
Require that the first argument is greater than or equal to the secondstatic ConstraintOp
IN
Require that the first argument is IN the secondstatic ConstraintOp
IS_EMPTY
Synonym for IS NULLstatic ConstraintOp
IS_NOT_EMPTY
Synonym for IS NOT NULLstatic ConstraintOp
IS_NOT_NULL
Require that the argument is not nullstatic ConstraintOp
IS_NULL
Require that the argument is nullstatic ConstraintOp
ISA
Require that the first argument be of the type named by the right argumentstatic ConstraintOp
ISNT
Require that the first argument be of the type named by the right argumentstatic ConstraintOp
LESS_THAN
Require that the first argument is less than the secondstatic ConstraintOp
LESS_THAN_EQUALS
Require that the first argument is less than or equal to the secondstatic ConstraintOp
LOOKUP
Special operation indicating a bag upload step should be used, for the webapp only.static ConstraintOp
MATCHES
Require that the two arguments matchstatic ConstraintOp
NAND
Combine constraints with the NAND operationstatic ConstraintOp
NONE_OF
Require that the first argument is not one of a list of valuesstatic ConstraintOp
NOR
Combine constraints with the NOR operationstatic ConstraintOp
NOT_EQUALS
Require that the two arguments are not equal, ignoring case for stringsstatic ConstraintOp
NOT_IN
Require that the first argument is NOT IN the secondstatic ConstraintOp
ONE_OF
Require that the first argument is one of a list a valuesstatic ConstraintOp
OR
Combine constraints with the OR operationstatic ConstraintOp
OUTSIDE
Require that some part of the first argument lie outside the second.static ConstraintOp
OVERLAPS
Require that a range overlaps another rangestatic ConstraintOp
STRICT_NOT_EQUALS
Require that the two arguments are not equalstatic ConstraintOp
WITHIN
Require that the first argument lie entirely within the second.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConstraintOp
getConstraintOp(java.lang.String operationCode)
Get ConstraintOp for given operation code.java.lang.Integer
getIndex()
Get an index for this ConstraintOp TODO: expunge this horror.static ConstraintOp
getOpForIndex(java.lang.Integer index)
Convert an index to a ConstraintOp (Only for use in webapp)static java.util.List<ConstraintOp>
getValues()
Get the the internal list of ConstraintOps (Only for use in webapp)ConstraintOp
negate()
Get the negated opjava.lang.String
toString()
Get the String representation of this ConstraintOp
-
-
-
Field Detail
-
EQUALS
public static final ConstraintOp EQUALS
Require that the two arguments are equal, regardless of case for strings
-
EXACT_MATCH
public static final ConstraintOp EXACT_MATCH
Require that the two arguments are exactly equal
-
NOT_EQUALS
public static final ConstraintOp NOT_EQUALS
Require that the two arguments are not equal, ignoring case for strings
-
STRICT_NOT_EQUALS
public static final ConstraintOp STRICT_NOT_EQUALS
Require that the two arguments are not equal
-
LESS_THAN
public static final ConstraintOp LESS_THAN
Require that the first argument is less than the second
-
LESS_THAN_EQUALS
public static final ConstraintOp LESS_THAN_EQUALS
Require that the first argument is less than or equal to the second
-
GREATER_THAN
public static final ConstraintOp GREATER_THAN
Require that the first argument is greater than the second
-
GREATER_THAN_EQUALS
public static final ConstraintOp GREATER_THAN_EQUALS
Require that the first argument is greater than or equal to the second
-
MATCHES
public static final ConstraintOp MATCHES
Require that the two arguments match
-
DOES_NOT_MATCH
public static final ConstraintOp DOES_NOT_MATCH
Require that the two arguments do not match
-
IS_NULL
public static final ConstraintOp IS_NULL
Require that the argument is null
-
IS_EMPTY
public static final ConstraintOp IS_EMPTY
Synonym for IS NULL
-
IS_NOT_NULL
public static final ConstraintOp IS_NOT_NULL
Require that the argument is not null
-
IS_NOT_EMPTY
public static final ConstraintOp IS_NOT_EMPTY
Synonym for IS NOT NULL
-
CONTAINS
public static final ConstraintOp CONTAINS
Require that the first argument contains the second
-
DOES_NOT_CONTAIN
public static final ConstraintOp DOES_NOT_CONTAIN
Require that the first argument does not contain the second
-
IN
public static final ConstraintOp IN
Require that the first argument is IN the second
-
NOT_IN
public static final ConstraintOp NOT_IN
Require that the first argument is NOT IN the second
-
EXISTS
public static final ConstraintOp EXISTS
Subquery exists
-
DOES_NOT_EXIST
public static final ConstraintOp DOES_NOT_EXIST
Subquery does not exist
-
AND
public static final ConstraintOp AND
Combine constraints with the AND operation
-
OR
public static final ConstraintOp OR
Combine constraints with the OR operation
-
NAND
public static final ConstraintOp NAND
Combine constraints with the NAND operation
-
NOR
public static final ConstraintOp NOR
Combine constraints with the NOR operation
-
LOOKUP
public static final ConstraintOp LOOKUP
Special operation indicating a bag upload step should be used, for the webapp only.
-
OVERLAPS
public static final ConstraintOp OVERLAPS
Require that a range overlaps another range
-
DOES_NOT_OVERLAP
public static final ConstraintOp DOES_NOT_OVERLAP
Require that a range does not overlap another range
-
ONE_OF
public static final ConstraintOp ONE_OF
Require that the first argument is one of a list a values
-
NONE_OF
public static final ConstraintOp NONE_OF
Require that the first argument is not one of a list of values
-
WITHIN
public static final ConstraintOp WITHIN
Require that the first argument lie entirely within the second.
-
OUTSIDE
public static final ConstraintOp OUTSIDE
Require that some part of the first argument lie outside the second.
-
ISA
public static final ConstraintOp ISA
Require that the first argument be of the type named by the right argument
-
ISNT
public static final ConstraintOp ISNT
Require that the first argument be of the type named by the right argument
-
-
Method Detail
-
toString
public java.lang.String toString()
Get the String representation of this ConstraintOp- Overrides:
toString
in classjava.lang.Object
- Returns:
- a String
-
getIndex
public java.lang.Integer getIndex()
Get an index for this ConstraintOp TODO: expunge this horror. Webapp code should NOT BE IN THE OBJECTSTORE! (Only for use in webapp)- Returns:
- the index
-
getOpForIndex
public static ConstraintOp getOpForIndex(java.lang.Integer index)
Convert an index to a ConstraintOp (Only for use in webapp)- Parameters:
index
- the index- Returns:
- the ConstraintOp
-
getValues
public static java.util.List<ConstraintOp> getValues()
Get the the internal list of ConstraintOps (Only for use in webapp)- Returns:
- the List of ConstraintOps
-
negate
public ConstraintOp negate()
Get the negated op- Returns:
- the negated op
-
getConstraintOp
public static ConstraintOp getConstraintOp(java.lang.String operationCode)
Get ConstraintOp for given operation code.- Parameters:
operationCode
- operation as string- Returns:
- ConstraintOp if operation code is valid else null
-
-