Package biana :: Package BianaObjects :: Module ExternalEntityRelation' :: Class ExternalEntityRelation
[hide private]
[frames] | no frames]

Class ExternalEntityRelation

source code


This general object represents an entry represeting a relation between external entities in an external database

An external Entity Relation is a relation of any type between two or more external entities

It can contain several attributes.

Instance Methods [hide private]
 
__init__(self, source_database, relation_type, id=None)
"source_databas_id" is the source database id where this entity is described
source code
 
add_participant(self, externalEntityID)
Adds a participant to this relation
source code
 
add_participant_attribute(self, externalEntityID, participantAttribute)
Adds an attribute to a participant in the relation
source code
 
get_participant_attribute(self, participantExternalEntityID, attribute_identifier) source code
 
get_participant_attributes(self, participantExternalEntityID)
Returns a list of [(attribute_name, fieldValues dictionary)]
source code
 
get_participant_external_entity_ids_list(self)
Returns a list with all the externalEntityIds of the participants
source code
 
get_relation_type(self)
Returns the type of this relation (interaction, reaction...)
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__

Static Methods [hide private]
 
get_valid_relation_types(biana_database)
Static method
source code
 
isValidType(type, biana_database) source code

Inherited from ExternalEntity'.ExternalEntity: get_valid_external_entity_types

Class Variables [hide private]

Inherited from ExternalEntity'.ExternalEntity: PROMISCUOUS_EXTERNAL_ENTITY_TYPES_DICT

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, source_database, relation_type, id=None)
(Constructor)

source code 

"source_databas_id" is the source database id where this entity is described

"relation_type" indicates the type of externalEntityRelation

"id" is the UNIQUE identifier in the database for this external entity

Overrides: object.__init__

add_participant(self, externalEntityID)

source code 

Adds a participant to this relation

"externalEntityID" externalEntityID corresponding to the participant

add_participant_attribute(self, externalEntityID, participantAttribute)

source code 

Adds an attribute to a participant in the relation

If the participant didn't exist previously, it gives error. It is necessary to insert previously the participant!

get_valid_relation_types(biana_database)
Static Method

source code 

Static method

Returns a list with all available relation types

isValidType(type, biana_database)
Static Method

source code 
Overrides: ExternalEntity'.ExternalEntity.isValidType