Package intermine :: Module model :: Class Field
[hide private]
[frames] | no frames]

Class Field

source code

object --+
         |
        Field
Known Subclasses:

A class representing columns on database tables

The base class for attributes, references and collections. All columns in DB tables are represented by fields

SYNOPSIS

>>> service = Service("http://www.flymine.org/query/service")
>>> model = service.model
>>> cd = model.get_class("Gene")
>>> print "Gene has", len(cd.fields), "fields"
>>> for field in gene_cd.fields:
...        print " - ", field
Gene has 45 fields
    -  CDSs is a group of CDS objects, which link back to this as gene
    -  GLEANRsymbol is a String
    -  UTRs is a group of UTR objects, which link back to this as gene
    -  alleles is a group of Allele objects, which link back to this as gene
    -  chromosome is a Chromosome
    -  chromosomeLocation is a Location
    -  clones is a group of CDNAClone objects, which link back to this as gene
    -  crossReferences is a group of CrossReference objects, which link back to this as subject
    -  cytoLocation is a String
    -  dataSets is a group of DataSet objects, which link back to this as bioEntities
    -  downstreamIntergenicRegion is a IntergenicRegion
    -  exons is a group of Exon objects, which link back to this as gene
    -  flankingRegions is a group of GeneFlankingRegion objects, which link back to this as gene
    -  goAnnotation is a group of GOAnnotation objects
    -  homologues is a group of Homologue objects, which link back to this as gene
    -  id is a Integer
    -  interactions is a group of Interaction objects, which link back to this as gene
    -  length is a Integer
    ...

See Also:
Attribute, Reference, Collection
Instance Methods [hide private]
 
__init__(self, name, type_name, class_origin)
THIS CLASS IS NOT MEANT TO BE INSTANTIATED DIRECTLY
source code
 
__repr__(self)
repr(x)
source code
 
__str__(self)
str(x)
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, type_name, class_origin)
(Constructor)

source code 

Constructor - DO NOT USE

THIS CLASS IS NOT MEANT TO BE INSTANTIATED DIRECTLY

you are unlikely to need to do so anyway: it is recommended you access fields through the classes generated by the model

Parameters:
  • name - The name of the reference
  • type_name - The name of the model.Class this refers to
  • class_origin - The model.Class this was declared in
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)