From ed4363909ca8e5760b25d02eeb91e0c1a10563a4 Mon Sep 17 00:00:00 2001 From: learner97 Date: Fri, 18 Aug 2023 17:00:09 -0600 Subject: [PATCH] added more pages, including the provenance ones (activity, agent, association, and usage), also added the location ones that were missing cut and generic location, and tried to update sequence annotation and component definition to make it so that it only uses the correct location type but this needs more work --- .../components/Viewing/PageJSON/MasterJSON.js | 16 +- .../Viewing/PageJSON/Types/Activity.json | 137 +++++++++++ .../Viewing/PageJSON/Types/Agent.json | 23 ++ .../Viewing/PageJSON/Types/Association.json | 57 +++++ .../PageJSON/Types/ComponentDefinition.json | 91 +++++--- .../Viewing/PageJSON/Types/Cut.json | 39 ++++ .../PageJSON/Types/GenericLocation.json | 40 ++++ .../PageJSON/Types/SequenceAnnotation.json | 213 +++++++----------- .../Viewing/PageJSON/Types/Usage.json | 62 +++++ 9 files changed, 514 insertions(+), 164 deletions(-) create mode 100644 frontend/components/Viewing/PageJSON/Types/Activity.json create mode 100644 frontend/components/Viewing/PageJSON/Types/Agent.json create mode 100644 frontend/components/Viewing/PageJSON/Types/Association.json create mode 100644 frontend/components/Viewing/PageJSON/Types/Cut.json create mode 100644 frontend/components/Viewing/PageJSON/Types/GenericLocation.json create mode 100644 frontend/components/Viewing/PageJSON/Types/Usage.json diff --git a/frontend/components/Viewing/PageJSON/MasterJSON.js b/frontend/components/Viewing/PageJSON/MasterJSON.js index d37ee538..2bd2dea2 100644 --- a/frontend/components/Viewing/PageJSON/MasterJSON.js +++ b/frontend/components/Viewing/PageJSON/MasterJSON.js @@ -19,6 +19,13 @@ import SequenceConstraint from './Types/SequenceConstraint.json'; import Datasheet from './Types/Datasheet.json'; import Plan from './Types/Plan.json'; import VariableComponent from './Types/VariableComponent.json'; +import SequenceAnnotation from './Types/SequenceAnnotation.json'; +import Activity from './Types/Activity.json'; +import Usage from './Types/Usage.json'; +import Association from './Types/Association.json'; +import Agent from './Types/Agent.json'; +import GenericLocation from './Types/GenericLocation.json'; +import Cut from './Types/Cut.json'; const TypeToJson = { @@ -40,9 +47,16 @@ const TypeToJson = { 'http://sbols.org/v2#Interaction': Interaction, 'http://sbols.org/v2#Participation': Participation, 'http://sbols.org/v2#SequenceConstraint': SequenceConstraint, + 'http://sbols.org/v2#VariableComponent': VariableComponent, + 'http://sbols.org/v2#SequenceAnnotation': SequenceAnnotation, + 'http://sbols.org/v2#GenericLocation': GenericLocation, + 'http://sbols.org/v2#Cut': Cut, 'http://www.myapp.org/Datasheet': Datasheet, 'http://www.w3.org/ns/prov#Plan' : Plan, - 'http://sbols.org/v2#VariableComponent': VariableComponent + 'http://www.w3.org/ns/prov#Activity': Activity, + 'http://www.w3.org/ns/prov#Usage': Usage, + 'http://www.w3.org/ns/prov#Association': Association, + 'http://www.w3.org/ns/prov#Agent': Agent }; export default TypeToJson; diff --git a/frontend/components/Viewing/PageJSON/Types/Activity.json b/frontend/components/Viewing/PageJSON/Types/Activity.json new file mode 100644 index 00000000..5c1f9679 --- /dev/null +++ b/frontend/components/Viewing/PageJSON/Types/Activity.json @@ -0,0 +1,137 @@ +{ + "type": "http://www.w3.org/ns/prov#Activity", + "prefixes": [ + "PREFIX rdf: ", + "PREFIX dcterms: ", + "PREFIX dc: ", + "PREFIX sbh: ", + "PREFIX prov: ", + "PREFIX sbol: ", + "PREFIX xsd: ", + "PREFIX rdfs: ", + "PREFIX purl: " + ], + "metadata": [], + "tables": [ + { + "icon": "faVials", + "title": "Usages", + "rootPredicate": "prov:qualifiedUsage", + "sections": [ + { + "title": "Usage", + "infoLink": "https://www.w3.org/ns/prov#Usage", + "predicates": [ + "sbol:displayId" + ], + "stripAfter": "#", + "link": "$" + }, + { + "title": "usageLink", + "predicates": [], + "hide": true + }, + { + "title": "Entity", + "infoLink": "https://www.w3.org/ns/prov#entity", + "predicates": [ + "prov:entity" + ], + "link": "$" + }, + { + "title": "entityLink", + "predicates": [], + "hide": true + }, + { + "title": "Roles", + "infoLink": "https://www.w3.org/ns/prov#hasRole", + "predicates": [ + "prov:hadRole" + ], + "stripAfter": "#", + "link": "$" + }, + { + "title": "roleLink", + "predicates": [], + "hide": true + } + ] + }, + { + "icon": "faVials", + "title": "Associations", + "rootPredicate": "prov:qualifiedAssociation", + "sections": [ + { + "title": "Association", + "infoLink": "https://www.w3.org/ns/prov#Association", + "predicates": [ + "sbol:displayId" + ], + "stripAfter": "#", + "link": "$" + }, + { + "title": "associationLink", + "predicates": [], + "hide": true + }, + { + "title": "Agent", + "infoLink": "https://www.w3.org/ns/prov#Agent", + "predicates": [ + "prov:agent" + ], + "link": "$" + }, + { + "title": "agentLink", + "predicates": [], + "hide": true + }, + { + "title": "Plan", + "infoLink": "https://www.w3.org/ns/prov#Plan", + "predicates": [ + "prov:hadPlan" + ], + "link": "$" + }, + { + "title": "planLink", + "predicates": [], + "hide": true + }, + { + "title": "Roles", + "infoLink": "https://www.w3.org/ns/prov#hasRole", + "predicates": [ + "prov:hadRole" + ], + "link": "$", + "stripAfter": "#" + + }, + { + "title": "rolesLink", + "predicates": [ + "prov:hadRole" + ], + "hide": true + } + ] + } + ], + "pages": [ + "$TABLES[Usages]", + "$TABLES[Associations]", + "Details", + "Other Properties", + "Member of these Collections", + "Attachments" + ] +} \ No newline at end of file diff --git a/frontend/components/Viewing/PageJSON/Types/Agent.json b/frontend/components/Viewing/PageJSON/Types/Agent.json new file mode 100644 index 00000000..4412706d --- /dev/null +++ b/frontend/components/Viewing/PageJSON/Types/Agent.json @@ -0,0 +1,23 @@ +{ + "type": "http://www.w3.org/ns/prov#Agent", + "prefixes": [ + "PREFIX rdf: ", + "PREFIX dcterms: ", + "PREFIX dc: ", + "PREFIX sbh: ", + "PREFIX prov: ", + "PREFIX sbol: ", + "PREFIX xsd: ", + "PREFIX rdfs: ", + "PREFIX purl: " + ], + "metadata": [], + "tables": [ + ], + "pages": [ + "Details", + "Other Properties", + "Member of these Collections", + "Attachments" + ] + } \ No newline at end of file diff --git a/frontend/components/Viewing/PageJSON/Types/Association.json b/frontend/components/Viewing/PageJSON/Types/Association.json new file mode 100644 index 00000000..f9001dd4 --- /dev/null +++ b/frontend/components/Viewing/PageJSON/Types/Association.json @@ -0,0 +1,57 @@ +{ + "type": "http://www.w3.org/ns/prov#Association", + "prefixes": [ + "PREFIX rdf: ", + "PREFIX dcterms: ", + "PREFIX dc: ", + "PREFIX sbh: ", + "PREFIX prov: ", + "PREFIX sbol: ", + "PREFIX xsd: ", + "PREFIX rdfs: ", + "PREFIX purl: " + ], + "metadata": [ + { + "title": "Roles", + "icon": "faVials", + "infoLink": "https://sbols.org/v2#role", + "rootPredicate": "prov:hadRole", + "sections": [ + { + "title": "name", + "predicates": [ + + ], + "stripAfter":"#", + "link": "$" + }, + { + "title": "roleLink", + "predicates": [], + "hide": true + } + ] + }, + { + "title": "Agent", + "icon": "faVials", + "infoLink": "https://www.w3.org/ns/prov#agent", + "rootPredicate": "prov:agent", + "sections": [ + { + "title": "name", + "predicates": [ + ], + "link": "$" + } + ] + } + ], + "tables": [], + "pages": [ + "Details", + "Other Properties", + "Attachments" + ] +} \ No newline at end of file diff --git a/frontend/components/Viewing/PageJSON/Types/ComponentDefinition.json b/frontend/components/Viewing/PageJSON/Types/ComponentDefinition.json index 18ff6246..0abbd753 100644 --- a/frontend/components/Viewing/PageJSON/Types/ComponentDefinition.json +++ b/frontend/components/Viewing/PageJSON/Types/ComponentDefinition.json @@ -20,8 +20,7 @@ { "title": "Extra Work", "stripAfter": "#", - "predicates": [ - ], + "predicates": [], "link": "$" }, { @@ -136,8 +135,7 @@ }, { "title": "InstanceLink", - "predicates": [ - ], + "predicates": [], "hide": true } ] @@ -162,33 +160,58 @@ }, { "title": "Location", - "infoLink": "https://sbols.org/v2#Location", - "text": "$, $", - "predicates": [], - "link": "$" - }, - { - "title": "Start", "predicates": [ - "sbol:location", - "sbol:start" ], - "hide": true - }, - { - "title": "End", - "predicates": [ - "sbol:location", - "sbol:end" - ], - "hide": true - }, - { - "title": "LocationLink", - "predicates": [ - "sbol:location" - ], - "hide": true + "infoLink": "https://sbols.org/v2#Location", + "icon": "faVials", + "sections": [ + { + "title": "Cut", + "stripAfter": "#", + "predicates": [ + "sbol:at" + ], + "link": "$" + }, + { + "title": "locationCutLink", + "predicates": [], + "hide": true + }, + { + "title": "Range", + "infoLink": "https://sbols.org/v2#Location", + "text": "$, $", + "predicates": [], + "link": "$" + }, + { + "title": "Start", + "predicates": [ + "sbol:start" + ], + "hide": true + }, + { + "title": "End", + "predicates": [ + "sbol:end" + ], + "hide": true + }, + { + "title": "LocationRangeLink", + "predicates": [ + ], + "hide": true + }, + { + "title": "GenericLocation", + "stripAfter": "#", + "predicates": [], + "text": "generic" + } + ] }, { "title": "Component", @@ -239,15 +262,14 @@ { "title": "SequenceLink", "hide": true, - "predicates": [ - - ] + "predicates": [] }, { "title": "Subject", "infoLink": "https://sbols.org/v2#subject", "predicates": [ - "sbol:subject","sbol:displayId" + "sbol:subject", + "sbol:displayId" ], "link": "$" }, @@ -278,7 +300,8 @@ "title": "Object", "infoLink": "https://sbols.org/v2#object", "predicates": [ - "sbol:object","sbol:displayId" + "sbol:object", + "sbol:displayId" ], "link": "$" }, diff --git a/frontend/components/Viewing/PageJSON/Types/Cut.json b/frontend/components/Viewing/PageJSON/Types/Cut.json new file mode 100644 index 00000000..2a3cabd9 --- /dev/null +++ b/frontend/components/Viewing/PageJSON/Types/Cut.json @@ -0,0 +1,39 @@ +{ + "type": "http://sbols.org/v2#Cut", + "prefixes": [ + "PREFIX rdf: ", + "PREFIX dcterms: ", + "PREFIX dc: ", + "PREFIX sbh: ", + "PREFIX prov: ", + "PREFIX sbol: ", + "PREFIX xsd: ", + "PREFIX rdfs: ", + "PREFIX purl: " + ], + "metadata": [ + { + "title": "Location", + "rootPredicate": "sbol:at", + "infoLink": "https://sbols.org/v2#Location", + "icon": "faVials", + "sections": [ + { + "title": "Extra Work", + "stripAfter": "#", + "predicates": [ + + ], + "link": "https://sbols.org/v2#Location" + } + ] + } + ], + "tables": [ + ], + "pages": [ + "Details", + "Other Properties", + "Attachments" + ] +} \ No newline at end of file diff --git a/frontend/components/Viewing/PageJSON/Types/GenericLocation.json b/frontend/components/Viewing/PageJSON/Types/GenericLocation.json new file mode 100644 index 00000000..43bacb07 --- /dev/null +++ b/frontend/components/Viewing/PageJSON/Types/GenericLocation.json @@ -0,0 +1,40 @@ +{ + "type": "http://sbols.org/v2#GenericLocation", + "prefixes": [ + "PREFIX rdf: ", + "PREFIX dcterms: ", + "PREFIX dc: ", + "PREFIX sbh: ", + "PREFIX prov: ", + "PREFIX sbol: ", + "PREFIX xsd: ", + "PREFIX rdfs: ", + "PREFIX purl: " + ], + "metadata": [ + { + "title": "Location", + "rootPredicate": "sbol:persistentIdentity", + "infoLink": "https://sbols.org/v2#Location", + "icon": "faVials", + "sections": [ + { + "title": "Extra Work", + "stripAfter": "#", + "predicates": [ + + ], + "text": "generic", + "link": "https://sbols.org/v2#Location" + } + ] + } + ], + "tables": [ + ], + "pages": [ + "Details", + "Other Properties", + "Attachments" + ] +} \ No newline at end of file diff --git a/frontend/components/Viewing/PageJSON/Types/SequenceAnnotation.json b/frontend/components/Viewing/PageJSON/Types/SequenceAnnotation.json index 0ed7e2b2..33508908 100644 --- a/frontend/components/Viewing/PageJSON/Types/SequenceAnnotation.json +++ b/frontend/components/Viewing/PageJSON/Types/SequenceAnnotation.json @@ -1,167 +1,122 @@ { "type": "http://sbols.org/v2#SequenceAnnotation", "prefixes": [ - "PREFIX rdf: ", - "PREFIX dcterms: ", - "PREFIX dc: ", - "PREFIX sbh: ", - "PREFIX prov: ", - "PREFIX sbol: ", - "PREFIX xsd: ", - "PREFIX rdfs: ", - "PREFIX purl: " + "PREFIX rdf: ", + "PREFIX dcterms: ", + "PREFIX dc: ", + "PREFIX sbh: ", + "PREFIX prov: ", + "PREFIX sbol: ", + "PREFIX xsd: ", + "PREFIX rdfs: ", + "PREFIX purl: " ], "metadata": [ - { - "title": "Test Extra Metadata", - "icon": "faVials", - "rootPredicate": "sbol:sequenceAnnotation", - "sections": [ - { - "title": "Component", - "text": "$", - "predicates": ["dcterms:title"], - "link": "$", - "group": true - }, - { - "title": "Test 2", - "predicates": ["sbol:location", "sbol:start"], - "link": "$", - "group": true, - "hide": true - } - ] - }, - { - "title": "Test Extra Metadata 2", - "rootPredicate": "sbol:component", - "icon": "faVials", - "sections": [ - { - "title": "Test", - "predicates": ["dcterms:title"], - "group": true - } - ] - } - ], - "tables": [ { - "icon": "faDna", - "title": "Sequence Annotations", - "rootPredicate": "sbol:sequenceAnnotation", - "orderBy": "xsd:integer(?start)", - "sections": [ + "title": "Roles", + "icon": "faVials", + "infoLink": "https://sbols.org/v2#role", + "rootPredicate": "sbol:role", + "sections": [ { - "title": "Sequence Annotation Link", - "predicates": [], - "hide": true + "title": "name", + "predicates": [], + "stripAfter": "#", + "link": "$" }, { - "title": "Sequence Annotation", - "predicates": ["dcterms:title"], - "icon": "faInfoCircle", - "link": "$", - "infoLink": "http://sbols.org/v2#SequenceAnnotation", - "info": "Learn more about Sequence Annotations" - }, + "title": "roleLink", + "predicates": [], + "hide": true + } + ] + }, + { + "title": "Locations", + "rootPredicate": "sbol:location", + "infoLink": "https://sbols.org/v2#Location", + "icon": "faVials", + "sections": [ { - "title": "Location", - "text": "$, $", - "link": "$", - "infoLink": "http://sbols.org/v2#Location" + "title": "Cut", + "stripAfter": "#", + "predicates": [ + "sbol:at" + ], + "link": "$" }, { - "title": "Start", - "icon": "faInfoCircle", - "predicates": ["sbol:location", "sbol:start"], - "infoLink": "http://sbols.org/v2#Location", - "info": "Learn more about Locations", + "title": "locationCutLink", + "predicates": [], "hide": true }, { - "title": "End", - "icon": "faInfoCircle", - "predicates": ["sbol:location", "sbol:end"], - "infoLink": "http://sbols.org/v2#Location", - "info": "Learn more about Locations", - "hide": true - }, - { - "title": "AnnotationLink", - "predicates": ["sbol:location", "sbol:persistentIdentity"], - "hide": true + "title": "Range", + "infoLink": "https://sbols.org/v2#Location", + "text": "$, $", + "predicates": [], + "link": "$" }, { - "title": "ComponentLink", - "hide": true, - "predicates": ["sbol:component", "sbol:definition"] + "title": "Start", + "predicates": [ + "sbol:location", + "sbol:start" + ], + "hide": true }, { - "title": "Component", - "infoLink": "http://sbols.org/v2#component", - "link": "$", - "predicates": ["sbol:component", "sbol:definition", "dcterms:title"] + "title": "End", + "predicates": [ + "sbol:location", + "sbol:end" + ], + "hide": true }, { - "title": "Sequence Annotation", - "hide": true, - "predicates": ["sbol:component", "dcterms:title"] + "title": "LocationRangeLink", + "predicates": [ + "sbol:location" + ], + "hide": true }, { - "title": "Role(s)", - "group": true, - "predicates": ["sbol:role"], - "icon": "faInfoCircle", - "link": "search/role=<$>&", - "linkType": "search", - "infoLink": "http://sbols.org/v2#role", - "info": "Learn more about roles" - } - ] + "title": "GenericLocation", + "stripAfter": "#", + "predicates": [ + "sbol:GenericLocation" + ], + "text": "generic" + } + ] }, { - "icon": "faPuzzlePiece", - "title": "Components", + "title": "Component", "rootPredicate": "sbol:component", - "sections": [ + "infoLink": "https://sbols.org/v2#Component", + "icon": "faVials", + "sections": [ { - "title": "ComponentLink", - "hide": true, - "predicates": ["sbol:definition"] + "title": "Extra Work", + "stripAfter": "#", + "predicates": [ + "sbol:displayId" + ], + "link": "$" }, { - "title": "InstanceLink", - "hide": true, - "predicates": [] - }, - { - "title": "Access", - "text": "public", - "infoLink": "https://dissys.github.io/sbol-owl/sbol-owl.html#access" - }, - { - "title": "Instance", - "link": "$", - "infoLink": "http://sbols.org/v2#component", - "predicates": ["dcterms:title"] - }, - { - "title": "Definition", - "infoLink": "https://dissys.github.io/sbol-owl/sbol-owl.html#definition", - "link": "$", - "predicates": ["sbol:definition", "dcterms:title"] + "title": "componentLink", + "predicates": [], + "hide": true } - ] + ] } ], + "tables": [ + ], "pages": [ "Details", - "$TABLES[Components]", - "$TABLES[Sequence Annotations]", "Other Properties", - "Member of these Collections", "Attachments" ] } \ No newline at end of file diff --git a/frontend/components/Viewing/PageJSON/Types/Usage.json b/frontend/components/Viewing/PageJSON/Types/Usage.json new file mode 100644 index 00000000..0400e7ab --- /dev/null +++ b/frontend/components/Viewing/PageJSON/Types/Usage.json @@ -0,0 +1,62 @@ +{ + "type": "http://www.w3.org/ns/prov#Usage", + "prefixes": [ + "PREFIX rdf: ", + "PREFIX dcterms: ", + "PREFIX dc: ", + "PREFIX sbh: ", + "PREFIX prov: ", + "PREFIX sbol: ", + "PREFIX xsd: ", + "PREFIX rdfs: ", + "PREFIX purl: " + ], + "metadata": [ + { + "title": "Roles", + "icon": "faVials", + "infoLink": "https://sbols.org/v2#role", + "rootPredicate": "prov:hadRole", + "sections": [ + { + "title": "name", + "predicates": [ + + ], + "stripAfter":"#", + "link": "$" + }, + { + "title": "roleLink", + "predicates": [], + "hide": true + } + ] + }, + { + "title": "Entity", + "icon": "faVials", + "infoLink": "https://www.w3.org/ns/prov#entity", + "rootPredicate": "prov:entity", + "sections": [ + { + "title": "name", + "predicates": [ + ], + "link": "$" + }, + { + "title": "entityLink", + "predicates": [], + "hide": true + } + ] + } + ], + "tables": [], + "pages": [ + "Details", + "Other Properties", + "Attachments" + ] +} \ No newline at end of file