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

Class ListConstraint

source code

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

Constraints which refer to an objects membership of lists

These constraints assert a membership relationship between the object represented by the path (it must always be an object, ie. a Reference or a Class) and a List. Lists are collections of objects in the database which are stored in InterMine datawarehouses. These lists must be set up before the query is run, either manually in the webapp or by using the webservice API list upload feature.

Valid operators are:

Instance Methods [hide private]
 
__init__(self, path, op, list_name, code='A') source code
 
to_string(self)
Provide a human readable representation of the logic.
source code
 
to_dict(self)
Return a dict object which can be used to construct a DOM element with the appropriate attributes.
source code

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(['IN', 'NOT IN'])

Inherited from Constraint: child_type

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, path, op, list_name, code='A')
(Constructor)

source code 

Constructor

Parameters:
  • path - The path to constrain
  • op - The operation to apply - must be in the OPS set
Overrides: object.__init__
(inherited documentation)

to_string(self)

source code 

Provide a human readable representation of the logic. This method is called by repr.

Overrides: pathfeatures.PathFeature.to_string

to_dict(self)

source code 

Return a dict object which can be used to construct a DOM element with the appropriate attributes.

Overrides: pathfeatures.PathFeature.to_dict