Back to index

python-biopython  1.60
Public Member Functions | Public Attributes | Static Public Attributes
Bio.Phylo.PhyloXML.Property Class Reference
Inheritance diagram for Bio.Phylo.PhyloXML.Property:
Inheritance graph
[legend]
Collaboration diagram for Bio.Phylo.PhyloXML.Property:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __repr__

Public Attributes

 unit
 id_ref
 value
 ref
 applies_to
 datatype

Static Public Attributes

tuple re_ref = re.compile(r'[a-zA-Z0-9_]+:[a-zA-Z0-9_\.\-\s]+')
tuple ok_applies_to
tuple ok_datatype

Detailed Description

A typed and referenced property from an external resources.

Can be attached to `Phylogeny`, `Clade`, and `Annotation` objects.

:Parameters:
    value : string
        the value of the property
    ref : string
        reference to an external resource, e.g. "NOAA:depth"
    applies_to : string
        indicates the item to which a property applies to (e.g.  'node' for
        the parent node of a clade, 'parent_branch' for the parent branch of
        a clade, or just 'clade').
    datatype : string
        the type of a property; limited to xsd-datatypes
        (e.g. 'xsd:string', 'xsd:boolean', 'xsd:integer', 'xsd:decimal',
        'xsd:float', 'xsd:double', 'xsd:date', 'xsd:anyURI').
    unit : string (optional)
        the unit of the property, e.g. "METRIC:m"
    id_ref : Id (optional)
        allows to attached a property specifically to one element (on the
        xml-level)

Definition at line 873 of file PhyloXML.py.


Constructor & Destructor Documentation

def Bio.Phylo.PhyloXML.Property.__init__ (   self,
  value,
  ref,
  applies_to,
  datatype,
  unit = None,
  id_ref = None 
)

Definition at line 911 of file PhyloXML.py.

00911 
00912             unit=None, id_ref=None):
00913         _check_str(ref, self.re_ref.match)
00914         _check_str(applies_to, self.ok_applies_to.__contains__)
00915         _check_str(datatype, self.ok_datatype.__contains__)
00916         _check_str(unit, self.re_ref.match)
00917         self.unit = unit
00918         self.id_ref = id_ref
00919         self.value = value
00920         self.ref = ref
00921         self.applies_to = applies_to
00922         self.datatype = datatype
00923 

Here is the call graph for this function:


Member Function Documentation

def Bio.Phylo.BaseTree.TreeElement.__repr__ (   self) [inherited]
Show this object's constructor with its primitive arguments.

Definition at line 216 of file BaseTree.py.

00216 
00217     def __repr__(self):
00218         """Show this object's constructor with its primitive arguments."""
00219         def pair_as_kwarg_string(key, val):
00220             if isinstance(val, basestring):
00221                 return "%s='%s'" % (key, _sugar.trim_str(unicode(val)))
00222             return "%s=%s" % (key, val)
00223         return u'%s(%s)' % (self.__class__.__name__,
00224                             ', '.join(pair_as_kwarg_string(key, val)
00225                                   for key, val in self.__dict__.iteritems()
00226                                   if val is not None and
00227                                   type(val) in (str, int, float, bool, unicode)
00228                                   ))


Member Data Documentation

Definition at line 920 of file PhyloXML.py.

Definition at line 921 of file PhyloXML.py.

Definition at line 917 of file PhyloXML.py.

Initial value:
set(('phylogeny', 'clade', 'node', 'annotation',
                         'parent_branch', 'other'))

Definition at line 898 of file PhyloXML.py.

Initial value:
set(('xsd:string', 'xsd:boolean', 'xsd:decimal', 'xsd:float',
        'xsd:double', 'xsd:duration', 'xsd:dateTime', 'xsd:time', 'xsd:date',
        'xsd:gYearMonth', 'xsd:gYear', 'xsd:gMonthDay', 'xsd:gDay',
        'xsd:gMonth', 'xsd:hexBinary', 'xsd:base64Binary', 'xsd:anyURI',
        'xsd:normalizedString', 'xsd:token', 'xsd:integer',
        'xsd:nonPositiveInteger', 'xsd:negativeInteger', 'xsd:long', 'xsd:int',
        'xsd:short', 'xsd:byte', 'xsd:nonNegativeInteger', 'xsd:unsignedLong',
        'xsd:unsignedInt', 'xsd:unsignedShort', 'xsd:unsignedByte',
        'xsd:positiveInteger'))

Definition at line 900 of file PhyloXML.py.

tuple Bio.Phylo.PhyloXML.Property.re_ref = re.compile(r'[a-zA-Z0-9_]+:[a-zA-Z0-9_\.\-\s]+') [static]

Definition at line 897 of file PhyloXML.py.

Definition at line 919 of file PhyloXML.py.

Definition at line 916 of file PhyloXML.py.

Definition at line 918 of file PhyloXML.py.


The documentation for this class was generated from the following file: