Package Bio :: Package Phylo :: Module PhyloXML :: Class Property
[hide private]
[frames] | no frames]

Class Property

source code

          object --+        
                   |        
BaseTree.TreeElement --+    
                       |    
            PhyloElement --+
                           |
                          Property

A typed and referenced property from an external resources.

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

Instance Methods [hide private]
 
__init__(self, value, ref, applies_to, datatype, unit=None, id_ref=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code

Inherited from BaseTree.TreeElement: __repr__, __str__

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

Class Variables [hide private]
  re_ref = re.compile(r'[a-zA-Z0-9_]+:[a-zA-Z0-9_\.-\s]+')
  ok_applies_to = set(['annotation', 'clade', 'node', 'other', '...
  ok_datatype = set(['xsd:anyURI', 'xsd:base64Binary', 'xsd:bool...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, value, ref, applies_to, datatype, unit=None, id_ref=None)
(Constructor)

source code 
x.__init__(...) initializes x; see help(type(x)) for signature

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)
Overrides: object.__init__
(inherited documentation)

Class Variable Details [hide private]

ok_applies_to

Value:
set(['annotation',
     'clade',
     'node',
     'other',
     'parent_branch',
     'phylogeny'])

ok_datatype

Value:
set(['xsd:anyURI',
     'xsd:base64Binary',
     'xsd:boolean',
     'xsd:byte',
     'xsd:date',
     'xsd:dateTime',
     'xsd:decimal',
     'xsd:double',
...