Package org.intermine.pathquery
Class PathConstraintLoop
- java.lang.Object
-
- org.intermine.pathquery.PathConstraint
-
- org.intermine.pathquery.PathConstraintLoop
-
public class PathConstraintLoop extends PathConstraint
Representation of a loop constraint in the PathQuery- Author:
- Matthew Wakeling
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Set<ConstraintOp>
VALID_OPS
List of valid ops for this type of constraint-
Fields inherited from class org.intermine.pathquery.PathConstraint
op, path
-
-
Constructor Summary
Constructors Constructor Description PathConstraintLoop(java.lang.String path, ConstraintOp op, java.lang.String loopPath)
Constructs a new PathConstraintLoop from one path to another.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDescriptiveString()
Returns a descriptive string for this constraint, mainly useful for checking uniqueness.java.lang.String
getLoopPath()
Returns the path that the constraint is constraining to.java.lang.String
toString()
-
Methods inherited from class org.intermine.pathquery.PathConstraint
getExtraValue, getIds, getOp, getPath, getType, getValue, getValues
-
-
-
-
Field Detail
-
VALID_OPS
public static final java.util.Set<ConstraintOp> VALID_OPS
List of valid ops for this type of constraint
-
-
Constructor Detail
-
PathConstraintLoop
public PathConstraintLoop(java.lang.String path, ConstraintOp op, java.lang.String loopPath)
Constructs a new PathConstraintLoop from one path to another. The paths should be normal path expressions with dots separating the parts. Do not use colons to represent outer joins, and do not use square brackets to represent subclass constraints. The paths will be checked for format, but can only be verified once inside a PathQuery object by the PathQuery.verifyQuery() method. This object is used to form a loop constraint from one path to another.- Parameters:
path
- the path that the constraint is attached toop
- the type of operationloopPath
- the path that the constraint is looped onto- Throws:
java.lang.NullPointerException
- if path, op, or loopPath are nulljava.lang.IllegalArgumentException
- if the paths contain colons or square brackets, or are otherwise in a bad format, or if the op is invalid for this constraint type
-
-
Method Detail
-
getLoopPath
public java.lang.String getLoopPath()
Returns the path that the constraint is constraining to.- Returns:
- a String
-
getDescriptiveString
public java.lang.String getDescriptiveString()
Returns a descriptive string for this constraint, mainly useful for checking uniqueness.- Returns:
- a String
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-