From cba464a80873fae15b70ea9cde60f5e1155d4db1 Mon Sep 17 00:00:00 2001 From: Katherine Baker Date: Tue, 15 Mar 2022 12:10:03 -0700 Subject: [PATCH 1/7] Schema revision v2 for BCDC project inventory --- design/schema/bcdc.puml | 319 +++++++++++++++++ design/schema/bcdc.svg | 715 +++++++++++++++++++++++++++++++++++++ design/schema/boss.svg | 530 +++++++++++++-------------- design/schema/mappings.csv | 92 +++++ 4 files changed, 1391 insertions(+), 265 deletions(-) create mode 100644 design/schema/bcdc.puml create mode 100644 design/schema/bcdc.svg create mode 100644 design/schema/mappings.csv diff --git a/design/schema/bcdc.puml b/design/schema/bcdc.puml new file mode 100644 index 0000000..5733ee2 --- /dev/null +++ b/design/schema/bcdc.puml @@ -0,0 +1,319 @@ +@startuml + +hide empty members +'hide circle + + +'Enums +enum WebResourceType { + Download + Information + Explore + View +} + +enum AccessControl { + Open + Embargoed + Controlled +} + +enum CompletionState { + Complete + InProgress +} + +enum AgentType { + Person + Organization +} + + +'Entity-like +class Agent { + * id: String! + agent_id: String! + agentType: AgentType + organization: Organization + person: Person + type: AgentType! +} + +class Modality { + * id: String! + name: String! + handle: String +} + +class SpecimenType { + * id: String! + name: String! + handle: String +} + + +class WebResource { + * id: String! + handle: String! + title: String! + shortTitle: String! + url: String! + rrid: String +} + +class Project { + * id: String! + doi: String + handle: String! + title: String! + shortTitle: String! + description: String! + bkpWebResource: WebResource! + informationWebResource: WebResource + subprogram: [Subprogram]! + technique: [Technique]! + collection: [Collection]! + specimenType: [SpecimenType]! + contact: Contact + creator: [Agent]! + fundingSource: [Award]! + contributor: [Agent] + highlightedWebResource: [WebResource] + protocol: [Protocol] + dataArchive: [Organization] + externalId: String + species: [Species]! + modality: [Modality]! + publication: [Publication] + dateModified: Date + dateCreated: Date! +} + +class Collection { + * id: String! + handle: String! + title: String! + shortTitle: String! + description: String! + doi: String + rrid: String + citation: String + externalId: String + dataArchive: Organization + bkpWebResource: [WebResource]! + dataArchive: [Organization]! + species: [Species]! + specimenCount: [SpecimenCount]! + license: License! + accessControl: AccessControl! + completionState: CompletionState! + modality: [Modality]! + technique: [Technique]! + webResource: [WebResource] + dateModified: Date + dateCreated: Date! +} + +class Subprogram { + * id: String! + doi: String + handle: String! + title: String! + shortTitle: String! + description: String! + bkpWebResource: WebResource + program: Program! + informationWebResource: WebResource +} + +class Program { + * id: String! + doi: String + handle: String! + title: String! + shortTitle: String! + description: String! + bkpWebResource: WebResource + informationWebResource: WebResource +} + +class Protocol { + * id: String! + handle: String + title: String! + shortTitle: String! + webResource: WebResource! +} + +class Person { + * id: String! + name: String! + givenName: String! + familyName: String! + handle: String + orcid: String +} + +class Organization { + * id: String + name: String! + handle: String! + ror: String + webResource: WebResource + contact: Contact +} + +class License { + * id: String! + handle: String + name: String! + title: String! + shortTitle: String! + webResource: WebResource! +} + +class Award { + * id: String + name: String! + title: String! + identifier: String! + reportSymbol: String + funder: Agent! + awardee: [Agent]! +} + +class Technique { + * id: String! + handle: String + name: String! +} + +class Species { + * id: String! + name: String! + common_name: String! + scientific_name: String + ncbi_taxonomy_id: String! + rrid: String +} + +class SpecimenCount { + * id: String! + count: Int + specimenType: SpecimenType! +} + +class Contact { + * id: String! + name: String! + email: String +} + +class Publication { + * id: String! + TBD +} + +circle webResource +webResource --> WebResource + +circle bkpWebResource +bkpWebResource --> WebResource + +circle informationWebResource +informationWebResource --> WebResource + +circle highlightedWebResource +highlightedWebResource --> WebResource + +circle contact +contact --> Contact + +circle dataArchive +dataArchive --> Organization + +circle specimenType +specimenType --> SpecimenType + +circle species +species --> Species + +circle technique +technique --> Technique + +circle modality +modality --> Modality + +'Organization --o| Contact : contact +Organization --o| contact +Organization --o| webResource + +'Relationships +Agent --o| Person : person +Agent --o| Organization : organization +Agent --|| AgentType : type + +'SpecimenCount --|| SpecimenType : specimenType +SpecimenCount --|| specimenType + +WebResource --|| WebResourceType : type + +'Technique --o{ Protocol : protocol + +Collection --|{ modality +Collection --|{ species +Collection --|{ SpecimenCount : specimenCount +Collection --|{ technique +Collection --|| AccessControl : accessControl +Collection --|| CompletionState : completionState +Collection --|| License : license +Collection --|{ bkpWebResource +'Collection --|{ Organization : dataArchive +Collection --|{ dataArchive +Collection --o{ webResource + +Award --|| Agent : funder +Award --|{ Agent : awardee + +Contact --o| Agent: agent + +Project --|{ Collection : collection +Project --|{ Award : fundingSource +'Project --o{ WebResource : highlightedWebResource +Project ---o{ highlightedWebResource +Project --|{ Agent : creator +Project --o{ Agent : contributor +'Project --o{ Contact : contact +Project --o{ contact +'Project --|{ SpecimenType : specimenType +Project --|{ specimenType +Project --|{ technique +Project --|{ Subprogram : subprogram +'Project --o| webResource +Project --|| bkpWebResource +Project --o| informationWebResource +'Project --|| webResource : bkpWebResource +'Project --|> Program +Project --o{ Protocol : protocol +Project --|{ dataArchive +Project --|{ species +Project --|{ modality +Project --o{ Publication : publication + +Program --o| informationWebResource +Program --o| bkpWebResource +'Program --o| webResource : bkpWebResource +'Program --|| webResource : informationWebResource + +Subprogram --o| informationWebResource +Subprogram --|| Program : program +Subprogram --o| bkpWebResource +'Subprogram --|> Program: program +'Subprogram --o| webResource : bkpWebResource +'Subprogram --|| webResource: informationWebResource + +Protocol --|| webResource + +License --|| webResource + +@enduml \ No newline at end of file diff --git a/design/schema/bcdc.svg b/design/schema/bcdc.svg new file mode 100644 index 0000000..c486bc1 --- /dev/null +++ b/design/schema/bcdc.svg @@ -0,0 +1,715 @@ +WebResourceTypeDownloadInformationExploreViewAccessControlOpenEmbargoedControlledCompletionStateCompleteInProgressAgentTypePersonOrganizationAgentid: String!agent_id: String!agentType: AgentTypeorganization: Organizationperson: Persontype: AgentType!Modalityid: String!name: String!handle: StringSpecimenTypeid: String!name: String!handle: StringWebResourceid: String!handle: String!title: String!shortTitle: String!url: String!rrid: StringProjectid: String!doi: Stringhandle: String!title: String!shortTitle: String!description: String!bkpWebResource: WebResource!informationWebResource: WebResourcesubprogram: [Subprogram]!technique: [Technique]!collection: [Collection]!specimenType: [SpecimenType]!contact: Contactcreator: [Agent]!fundingSource: [Award]!contributor: [Agent]highlightedWebResource: [WebResource]protocol: [Protocol]dataArchive: [Organization]externalId: Stringspecies: [Species]!modality: [Modality]!publication: [Publication]dateModified: DatedateCreated: Date!Collectionid: String!handle: String!title: String!shortTitle: String!description: String!doi: Stringrrid: Stringcitation: StringexternalId: StringdataArchive: OrganizationbkpWebResource: [WebResource]!dataArchive: [Organization]!species: [Species]!specimenCount: [SpecimenCount]!license: License!accessControl: AccessControl!completionState: CompletionState!modality: [Modality]!technique: [Technique]!webResource: [WebResource]dateModified: DatedateCreated: Date!Subprogramid: String!doi: Stringhandle: String!title: String!shortTitle: String!description: String!bkpWebResource: WebResourceprogram: Program!informationWebResource: WebResourceProgramid: String!doi: Stringhandle: String!title: String!shortTitle: String!description: String!bkpWebResource: WebResourceinformationWebResource: WebResourceProtocolid: String!handle: Stringtitle: String!shortTitle: String!webResource: WebResource!Personid: String!name: String!givenName: String!familyName: String!handle: Stringorcid: StringOrganizationid: Stringname: String!handle: String!ror: StringwebResource: WebResourcecontact: ContactLicenseid: String!handle: Stringname: String!title: String!shortTitle: String!webResource: WebResource!Awardid: Stringname: String!title: String!identifier: String!reportSymbol: Stringfunder: Agent!awardee: [Agent]!Techniqueid: String!handle: Stringname: String!Speciesid: String!name: String!common_name: String!scientific_name: Stringncbi_taxonomy_id: String!rrid: StringSpecimenCountid: String!count: IntspecimenType: SpecimenType!Contactid: String!name: String!email: StringPublicationid: String!TBDwebResourcebkpWebResourceinformationWebResourcehighlightedWebResourcecontactdataArchivespecimenTypespeciestechniquemodalitypersonorganizationtypetypespecimenCountaccessControlcompletionStatelicensefunderawardeeagentcollectionfundingSourcecreatorcontributorsubprogramprotocolpublicationprogram \ No newline at end of file diff --git a/design/schema/boss.svg b/design/schema/boss.svg index b43b89c..a89f502 100644 --- a/design/schema/boss.svg +++ b/design/schema/boss.svg @@ -58,271 +58,271 @@ reverse link Channel to DataType--> WebResource @@ -270,6 +277,7 @@ Collection --|{ bkpWebResource 'Collection --|{ Organization : dataArchive Collection --|{ dataArchive Collection --o{ webResource +Collection --|{ AccessControlCode : accessControlCode Award --|| Agent : funder Award --|{ Agent : awardee From 612dd70a96af6026b878bebd50994efffe82ce13 Mon Sep 17 00:00:00 2001 From: Prajal Bishwakarma Date: Fri, 22 Apr 2022 09:16:45 -0700 Subject: [PATCH 5/7] Change 'handle' prop to 'name' --- design/schema/bcdc.puml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/design/schema/bcdc.puml b/design/schema/bcdc.puml index 6bcc2ad..d7f422e 100644 --- a/design/schema/bcdc.puml +++ b/design/schema/bcdc.puml @@ -42,19 +42,17 @@ class Agent { class Modality { * id: String! name: String! - handle: String } class SpecimenType { * id: String! name: String! - handle: String } class WebResource { * id: String! - handle: String! + name: String! title: String! shortTitle: String! url: String! @@ -64,7 +62,7 @@ class WebResource { class Project { * id: String! doi: String - handle: String! + name: String! title: String! shortTitle: String! description: String! @@ -91,7 +89,7 @@ class Project { class Collection { * id: String! - handle: String! + name: String! title: String! shortTitle: String! description: String! @@ -118,7 +116,7 @@ class Collection { class Subprogram { * id: String! doi: String - handle: String! + name: String! title: String! shortTitle: String! description: String! @@ -130,7 +128,7 @@ class Subprogram { class Program { * id: String! doi: String - handle: String! + name: String! title: String! shortTitle: String! description: String! @@ -140,7 +138,7 @@ class Program { class Protocol { * id: String! - handle: String + name: String title: String! shortTitle: String! webResource: WebResource! @@ -151,14 +149,13 @@ class Person { name: String! givenName: String! familyName: String! - handle: String orcid: String } class Organization { * id: String name: String! - handle: String! + name: String! ror: String webResource: WebResource contact: Contact @@ -166,7 +163,7 @@ class Organization { class License { * id: String! - handle: String + name: String name: String! title: String! shortTitle: String! @@ -185,7 +182,6 @@ class Award { class Technique { * id: String! - handle: String name: String! } From 378353c633e2bd9c9a6765058ffa72d43183c140 Mon Sep 17 00:00:00 2001 From: Prajal Bishwakarma Date: Mon, 25 Apr 2022 09:16:21 -0700 Subject: [PATCH 6/7] Add ontology entry for technique, modality, and specimenType --- design/schema/bcdc.puml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/design/schema/bcdc.puml b/design/schema/bcdc.puml index d7f422e..f9dce73 100644 --- a/design/schema/bcdc.puml +++ b/design/schema/bcdc.puml @@ -42,11 +42,13 @@ class Agent { class Modality { * id: String! name: String! + ontology_id: String } class SpecimenType { * id: String! name: String! + ontology_id: String } @@ -183,6 +185,7 @@ class Award { class Technique { * id: String! name: String! + ontology_id: String } class Species { From 83b00c19d21a7ef73196936a7b8e66b8637e59ee Mon Sep 17 00:00:00 2001 From: Prajal Bishwakarma Date: Mon, 25 Apr 2022 09:23:02 -0700 Subject: [PATCH 7/7] Remove polymorphism of contact --- design/schema/bcdc.puml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/design/schema/bcdc.puml b/design/schema/bcdc.puml index f9dce73..39a827e 100644 --- a/design/schema/bcdc.puml +++ b/design/schema/bcdc.puml @@ -203,12 +203,6 @@ class SpecimenCount { specimenType: SpecimenType! } -class Contact { - * id: String! - name: String! - email: String -} - class Publication { * id: String! TBD @@ -281,7 +275,7 @@ Collection --|{ AccessControlCode : accessControlCode Award --|| Agent : funder Award --|{ Agent : awardee -Contact --o| Agent: agent +Contact --o| Person: person Project --|{ Collection : collection Project --|{ Award : fundingSource