The Ontology is an external entity itself. Each of its elemens is also
an ExternalEntityObject
Each ontology as a "linkedAttribute", which is the primary
attribute to represent the ontology (for example, taxID for taxonomy),
and a "descriptionAttribute", which is an attribute that
describes the external entity element
|
__init__(self,
source_database,
name,
linkedAttribute,
descriptionAttribute,
id=None,
levelAttribute=None)
"source_database" is the source database id where this
entity is described |
source code
|
|
|
|
|
|
|
|
|
_traverse_tree_for_leafs(self,
id)
Helper function to reach leafs traversing the tree |
source code
|
|
|
add_element(self,
ontologyElementID,
isA=[ ] ,
isPartOf=[ ] ,
linkedAttributeValue=None)
Adds an element to the ontology. |
source code
|
|
|
get_all_external_entity_ids(self)
Returns a list with the external entity ids of all the elements in
the ontology |
source code
|
|
|
get_all_linked_attributes(self)
Returns a list with the main attribute for all the elements in the
ontology |
source code
|
|
|
get_descendants(self,
ontologyElementID)
Gets all the descendants, using the "is_a" relation |
source code
|
|
|
get_leafs(self)
Returns a list of leafs in the ontology tree To execute this method,
is necessary to load in the ontology all the external Entity Objects |
source code
|
|
|
get_linked_attr_and_description_tuples(self)
Returns a list of tuples with the format: (linked_attr,
descriptive_attr) |
source code
|
|
|
get_parents_ids(self,
elementID)
Returns a list with the parents of the element with this
externalEntityID (using the relation is_a) |
source code
|
|
|
get_part_parents_ids(self,
elementID)
Returns a list with the parents of the element with this
externalEntityID (using the relation is_part_of) |
source code
|
|
|
|
|
has_element(self,
linkedAttributeID)
Returns a boolean indicating if an external entity with this
attribute is found in the ontology |
source code
|
|
|
|
|
print_tree(self,
outmethod=<bound method _DevNull.write of <epydoc.docintrospecter._DevNu... )
Prints recursively in stdout a tree representing the ontology, using
the external entity id. |
source code
|
|
Inherited from ExternalEntity'.ExternalEntity :
__eq__ ,
__str__ ,
add_attribute ,
get_attribute ,
get_attributes_dict ,
get_id ,
get_source_database ,
get_type ,
set_id
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__
|