provdbconnector.db_adapters.neo4j package¶
Submodules¶
provdbconnector.db_adapters.neo4j.cypher_commands module¶
provdbconnector.db_adapters.neo4j.neo4jadapter module¶
-
class
provdbconnector.db_adapters.neo4j.neo4jadapter.
Neo4jAdapter
(*args)[source]¶ Bases:
provdbconnector.db_adapters.baseadapter.BaseAdapter
This is the neo4j adapter to store prov. data in a neo4j database
-
connect
(authentication_options)[source]¶ The connect method to create a new instance of the db_driver
Parameters: authentication_options – Username, password, host and encrypted option Returns: None Return type: None Raises: InvalidOptionsException
-
save_element
(attributes, metadata)[source]¶ Saves a single record
Parameters: Returns: The id of the record
Return type:
-
save_relation
(from_node, to_node, attributes, metadata)[source]¶ Save a single relation
Parameters: Returns: Id of the relation
Return type:
-
get_records_by_filter
(attributes_dict=None, metadata_dict=None)[source]¶ Return the records by a certain filter
Parameters: Returns: list of all nodes and relations that fit the conditions
Return type: list(DbRecord and DbRelation)
-
get_records_tail
(attributes_dict=None, metadata_dict=None, depth=None)[source]¶ Return all connected nodes form the origin.
Parameters: Returns: list of all nodes and relations that fit the conditions
Return type: list(DbRecord and DbRelation)
-
get_bundle_records
(bundle_identifier)[source]¶ Return all records and relations for the bundle
Parameters: bundle_identifier – Returns:
-
get_record
(record_id)[source]¶ Try to find the record in the database
Parameters: record_id – Returns: DbRecord Return type: DbRecord
-
get_relation
(relation_id)[source]¶ Get a relation
Parameters: relation_id – Returns: The relation Return type: DbRelation
-