datacatalog.linkedstores.association package¶
Submodules¶
datacatalog.linkedstores.association.document module¶
-
class
datacatalog.linkedstores.association.document.
Association
(*args, **kwargs)[source]¶ Bases:
attrdict.dictionary.AttrDict
-
class
datacatalog.linkedstores.association.document.
AssociationDocument
(schema=None, **kwargs)[source]¶ Bases:
datacatalog.extensible.ExtensibleAttrDict
Instantiates an Annotation Association
-
CONNECTS_FROM_MAX_LENGTH
= 1¶
-
CONNECTS_FROM_UUIDTYPES
= ('tag_annotation', 'text_annotation')¶
-
CONNECTS_TO_MAX_LENGTH
= 1¶
-
CONNECTS_TO_UUIDTYPES
= ('challenge_problem', 'experiment_design', 'experiment', 'sample', 'measurement', 'file', 'reference', 'process', 'pipeline', 'pipelinejob')¶
-
DELETE_FIELD
= '_visible'¶
-
PARAMS
= [('owner', True, 'owner', None), ('connects_to', True, 'connects_to', []), ('connects_from', True, 'connects_from', []), ('note', False, 'note', None), ('_visible', False, '_visible', True)]¶
-
-
class
datacatalog.linkedstores.association.document.
AssociationSchema
(inheritance=True, **kwargs)[source]¶ Bases:
datacatalog.linkedstores.basestore.heritableschema.HeritableDocumentSchema
Defines the Annotation Association schema
-
DELETE_FIELD
= '_visible'¶
-
datacatalog.linkedstores.association.exceptions module¶
-
exception
datacatalog.linkedstores.association.exceptions.
AssociationError
[source]¶ Bases:
datacatalog.linkedstores.basestore.exceptions.CatalogError
datacatalog.linkedstores.association.schemas module¶
-
datacatalog.linkedstores.association.schemas.
get_schemas
()[source]¶ Get JSON schemas for AssociationDocument
Returns: Object and document JSON schema that define the store Return type: JSONSchemaCollection
datacatalog.linkedstores.association.store module¶
-
class
datacatalog.linkedstores.association.store.
AssociationStore
(mongodb, config={}, session=None, **kwargs)[source]¶ Bases:
datacatalog.linkedstores.basestore.softdelete.SoftDelete
,datacatalog.linkedstores.basestore.store.LinkedStore
Manage association records
-
LINK_FIELDS
= ['connects_from', 'connects_to']¶
-
associate
(annotation_uuid, record_uuid, note='', owner=None, token=None)[source]¶ Create an association between an annotation and a metadata record
Parameters: Returns: UUID5 of the resulting association
Return type: Raises: AssociationError
– A failure prevented the association from being createdValueError
– Either the annotation or record UUID was the wrong type
-
dissociate
(annotation_uuid, record_uuid, owner=None, token=None)[source]¶ Remove an association between an annotation and a metadata record
This uses a soft-delete function, which simply toggles a visibility key
Parameters: Returns: UUID5 of the resulting association
Return type: Raises: AssociationError
– A failure prevented the association from being createdValueError
– Either the annotation or record UUID was the wrong type
-
-
class
datacatalog.linkedstores.association.store.
StoreInterface
(mongodb, config={}, session=None, **kwargs)[source]¶ Bases:
datacatalog.linkedstores.association.store.AssociationStore