Package intermine :: Module constraints :: Class RangeConstraint
[hide private]
[frames] | no frames]

Class RangeConstraint

source code

              object --+                
                       |                
pathfeatures.PathFeature --+            
                           |            
                  Constraint --+        
                               |        
                  object --+   |        
                           |   |        
                   LogicNode --+        
                               |        
                 CodedConstraint --+    
                                   |    
                     MultiConstraint --+
                                       |
                                      RangeConstraint
Known Subclasses:


Constraints for testing where a value lies relative to a set of ranges
======================================================================

These constraints require that the value of the path they constrain
should lie in relationship to the set of values passed according to
the specific operator.

Valid operators:
 - OVERLAPS : The value overlaps at least one of the given ranges
 - WITHIN : The value is wholly outside the given set of ranges
 - CONTAINS : The value contains all the given ranges
 - DOES NOT CONTAIN : The value does not contain all the given ranges
 - OUTSIDE : Some part is outside the given set of ranges
 - DOES NOT OVERLAP : The value does not overlap with any of the ranges

For example:

    4 WITHIN [1..5, 20..25] => True

The format of the ranges depends on the value being constrained and what range
parsers have been configured on the target server. A common range parser for
biological mines is the one for Locations:

    Gene.chromosomeLocation OVERLAPS [2X:54321..67890, 3R:12345..456789]

Instance Methods [hide private]

Inherited from MultiConstraint: __init__, to_dict, to_string

Inherited from CodedConstraint: __str__, get_codes

Inherited from pathfeatures.PathFeature: __repr__

Inherited from LogicNode: __add__, __and__, __or__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  OPS = set(['CONTAINS', 'DOES NOT CONTAIN', 'DOES NOT OVERLAP',...

Inherited from Constraint: child_type

Properties [hide private]

Inherited from object: __class__

Class Variable Details [hide private]

OPS

Value:
set(['CONTAINS',
     'DOES NOT CONTAIN',
     'DOES NOT OVERLAP',
     'OUTSIDE',
     'OVERLAPS',
     'WITHIN'])