diff --git a/src/App.js b/src/App.js index 3abe8b4..4af5cd2 100644 --- a/src/App.js +++ b/src/App.js @@ -59,7 +59,6 @@ const App = () => { tree: await splinter.getTree(), splinter: splinter }; - console.log("Graph ", _dataset.graph); dispatch(addDataset(_dataset)); dispatch(addWidget({ @@ -132,7 +131,6 @@ const App = () => { }; const splinter = new DatasetsListSplinter(undefined, file.data); let graph = await splinter.getGraph(); - console.log("Graph ", graph); let datasets = graph.nodes.filter((node) => node?.attributes?.hasDoi); const match = datasets.find( node => node.attributes?.hasDoi?.[0]?.includes(doi)); if ( match ) { diff --git a/src/components/GraphViewer/GraphViewer.js b/src/components/GraphViewer/GraphViewer.js index cc20597..372bf70 100644 --- a/src/components/GraphViewer/GraphViewer.js +++ b/src/components/GraphViewer/GraphViewer.js @@ -194,7 +194,6 @@ const GraphViewer = (props) => { } const graph = { nodes : visibleNodes, links : visibleLinks, levelsMap : levelsMap, hierarchyVariant : maxLevel * 20 }; - console.log("Graph ", graph); return graph; }; diff --git a/src/components/NodeDetailView/Details/DatasetDetails.js b/src/components/NodeDetailView/Details/DatasetDetails.js index b79afef..3ebf8fb 100644 --- a/src/components/NodeDetailView/Details/DatasetDetails.js +++ b/src/components/NodeDetailView/Details/DatasetDetails.js @@ -6,17 +6,16 @@ import { } from "@material-ui/core"; import Links from './Views/Links'; import SimpleLinkedChip from './Views/SimpleLinkedChip'; -import USER from "../../../images/user.svg"; import SimpleLabelValue from './Views/SimpleLabelValue'; import { detailsLabel } from '../../../constants'; -import { rdfTypes } from "../../../utils/graphModel"; import { isValidUrl } from './utils'; +import { useSelector } from 'react-redux' import {DatasetIcon} from "../../../images/Icons"; const DatasetDetails = (props) => { const { node } = props; - let datasetPropertiesModel = [...rdfTypes["Dataset"].properties]; + const datasetPropertiesModel = useSelector(state => state.sdsState.metadata_model.dataset); return ( diff --git a/src/components/NodeDetailView/Details/FileDetails.js b/src/components/NodeDetailView/Details/FileDetails.js index c288fdd..870c0ea 100644 --- a/src/components/NodeDetailView/Details/FileDetails.js +++ b/src/components/NodeDetailView/Details/FileDetails.js @@ -1,107 +1,53 @@ -import React from "react"; import { Box, Typography, - List, - ListItemText, Divider, } from "@material-ui/core"; import Links from './Views/Links'; import SimpleLabelValue from './Views/SimpleLabelValue'; +import SimpleLinkedChip from './Views/SimpleLinkedChip'; import { detailsLabel } from '../../../constants'; +import { useSelector } from 'react-redux' +import { isValidUrl } from './utils'; const FileDetails = (props) => { const { node } = props; - - let title = ""; - let idDetails = ""; - // both tree and graph nodes are present, extract data from both - if (node?.tree_node && node?.graph_node) { - title = node.tree_node.basename; - idDetails = node.tree_node.id + detailsLabel; - // the below is the case where we have data only from the tree/hierarchy - } else if (node.graph_node) { - idDetails = node.graph_node.id + detailsLabel; - title = node.graph_node.attributes?.label?.[0]; - // the below is the case where we have data only from the graph - } else { - title = node.tree_node.basename; - idDetails = node.tree_node.id + detailsLabel; - } - - let latestUpdate = "Not defined." - if (node?.graph_node.attributes?.updated !== undefined) { - latestUpdate = node?.attributes?.updated; - } - - const DETAILS_LIST = [ - { - title: 'Mimetype', - value: node?.graph_node?.attributes?.mimetype - }, - { - title: 'Size Bytes', - value: node?.graph_node?.attributes?.size - } - ]; + const filePropertiesModel = useSelector(state => state.sdsState.metadata_model.file); return ( - + - { node.graph_node?.attributes?.identifier - ? ( - {"File Details"} - - ) - : () - } - { node.graph_node?.attributes?.publishedURI && node.graph_node?.attributes?.publishedURI !== "" - ? ( - Published Dataset File - - ) - : <> - } - {latestUpdate ? - - : (<> ) - } - { node?.tree_node?.uri_human !== undefined - ? ( - - ) - : (<> ) - } + + + {filePropertiesModel?.map( property => { + if ( property.visible ){ + const propValue = node.graph_node.attributes[property.property]; + if ( isValidUrl(propValue) ){ + return ( + {property.label} + + ) + } - { node?.tree_node?.checksums !== undefined - ? (<> - - - ) - : (<> ) - } + else if ( typeof propValue === "object" ){ + return ( + {property.label} + + ) + } + + else if ( typeof propValue === "string" ){ + return () + } - - - { - DETAILS_LIST?.map((item, index) => ( - - {item?.title} - {item?.value} - - )) + else if ( typeof propValue === "number" ){ + return () } - - - { node?.graph_node?.attributes?.hasUriHuman !== undefined - ? ( - Links - - ) - : <> - } + return (<> ) + } + })} ); diff --git a/src/components/NodeDetailView/Details/GroupDetails.js b/src/components/NodeDetailView/Details/GroupDetails.js index 1c54bce..9a68798 100644 --- a/src/components/NodeDetailView/Details/GroupDetails.js +++ b/src/components/NodeDetailView/Details/GroupDetails.js @@ -1,35 +1,53 @@ -import React from "react"; import { Box, Divider, + Typography } from "@material-ui/core"; +import Links from './Views/Links'; +import SimpleLinkedChip from './Views/SimpleLinkedChip'; import SimpleLabelValue from './Views/SimpleLabelValue'; import { detailsLabel } from '../../../constants'; +import { useSelector } from 'react-redux' +import { isValidUrl } from './utils'; const GroupDetails = (props) => { const { node } = props; - - let title = ""; - let idDetails = ""; - // both tree and graph nodes are present, extract data from both - if (node?.tree_node && node?.graph_node) { - title = node.graph_node?.name; - idDetails = node.graph_node?.id + detailsLabel; - // the below is the case where we have data only from the tree/hierarchy - } else if (node?.tree_node) { - title = node.tree_node?.basename; - idDetails = node.tree_node?.id + detailsLabel; - // the below is the case where we have data only from the graph - } else { - title = node.graph_node?.name; - idDetails = node.graph_node?.id + detailsLabel; - } + const groupPropertiesModel = useSelector(state => state.sdsState.metadata_model.group); return ( - + - + + + {groupPropertiesModel?.map( property => { + if ( property.visible ){ + const propValue = node.graph_node[property.property]; + if ( isValidUrl(propValue) ){ + return ( + {property.label} + + ) + } + + else if ( typeof propValue === "object" ){ + return ( + {property.label} + + ) + } + + else if ( typeof propValue === "string" ){ + return () + } + + else if ( typeof propValue === "number" ){ + return () + } + + return (<> ) + } + })} ); diff --git a/src/components/NodeDetailView/Details/SampleDetails.js b/src/components/NodeDetailView/Details/SampleDetails.js index 5adb334..3ea77c9 100644 --- a/src/components/NodeDetailView/Details/SampleDetails.js +++ b/src/components/NodeDetailView/Details/SampleDetails.js @@ -1,56 +1,51 @@ -import React from "react"; import { Box, Divider, Typography, } from "@material-ui/core"; import SimpleLabelValue from './Views/SimpleLabelValue'; +import SimpleLinkedChip from './Views/SimpleLinkedChip'; import Links from './Views/Links'; -import { iterateSimpleValue } from './utils'; import { detailsLabel } from '../../../constants'; +import { isValidUrl } from './utils'; +import { useSelector } from 'react-redux' + const SampleDetails = (props) => { const { node } = props; - let title = ""; - let idDetails = ""; - // both tree and graph nodes are present, extract data from both - if (node?.tree_node && node?.graph_node) { - idDetails = node.tree_node.id + detailsLabel; - title = node.tree_node.basename; - // the below is the case where we have data only from the tree/hierarchy - } else if (node?.graph_node) { - idDetails = node.graph_node.id + detailsLabel; - title = node.graph_node.attributes?.label ? node.graph_node.attributes?.label[0] : ""; - // the below is the case where we have data only from the graph - } else { - idDetails = node.tree_node.id + detailsLabel; - title = "Undefined Sample name"; - } + const samplePropertiesModel = useSelector(state => state.sdsState.metadata_model.sample); return ( - + - { node.graph_node.attributes?.hasUriHuman && node.graph_node.attributes?.hasUriHuman[0] !== "" - ? ( - {"Sample Details"} - Label - ) - : () - } - - { node.graph_node?.attributes?.publishedURI && node.graph_node?.attributes?.publishedURI !== "" - ? ( - SPARC Portal Link - - ) - : <> - } - - { iterateSimpleValue('Assigned group', node?.graph_node?.attributes?.hasAssignedGroup) } - { iterateSimpleValue('Digital artifact', node?.graph_node?.attributes?.hasDigitalArtifactThatIsAboutIt) } - { iterateSimpleValue('Extracted from Anatomical region', node?.graph_node?.attributes?.wasExtractedFromAnatomicalRegion) } + + + {samplePropertiesModel?.map( property => { + if ( property.visible ){ + const propValue = node.graph_node.attributes[property.property]?.[0]; + if ( isValidUrl(propValue) ){ + return ( + {property.label} + + ) + } + + else if ( typeof propValue === "object" ){ + return ( + {property.label} + + ) + } + + else if ( typeof propValue === "string" ){ + return () + } + + return (<> ) + } + })} ); diff --git a/src/components/NodeDetailView/Details/SubjectDetails.js b/src/components/NodeDetailView/Details/SubjectDetails.js index 73513e6..2f30e10 100644 --- a/src/components/NodeDetailView/Details/SubjectDetails.js +++ b/src/components/NodeDetailView/Details/SubjectDetails.js @@ -1,34 +1,21 @@ -import React from "react"; import { Box, Divider, Typography, } from "@material-ui/core"; -import SimpleChip from './Views/SimpleChip'; import SimpleLinkedChip from './Views/SimpleLinkedChip'; import SimpleLabelValue from './Views/SimpleLabelValue'; import Links from './Views/Links'; import { simpleValue } from './utils'; import { detailsLabel } from '../../../constants'; +import { rdfTypes } from "../../../utils/graphModel"; +import { isValidUrl } from './utils'; +import { useSelector } from 'react-redux' const SubjectDetails = (props) => { const { node } = props; - node.graph_node.dataset_id = node.dataset_id; - let title = ""; - let idDetails = ""; - // both tree and graph nodes are present, extract data from both - if (node.tree_node && node.graph_node) { - idDetails = node?.tree_node?.id + detailsLabel; - title = node?.tree_node?.basename; - // the below is the case where we have data only from the tree/hierarchy - } else if (node?.graph_node) { - idDetails = node?.graph_node?.id + detailsLabel; - title = node.graph_node.name; - // the below is the case where we have data only from the graph - } else { - idDetails = node.tree_node.id + detailsLabel; - title = node.tree_node.basename; - } + + const subjectPropertiesModel = useSelector(state => state.sdsState.metadata_model.subject); const getGroupNode = (groupName, node)=> { let n = node.graph_node.parent; @@ -36,13 +23,11 @@ const SubjectDetails = (props) => { while ( n && !match ) { if ( n.name === groupName ) { match = true; - }else { + } else { n = n.parent; } } - n.dataset_id = node.dataset_id; - return n; } @@ -50,70 +35,39 @@ const SubjectDetails = (props) => { - + + + {subjectPropertiesModel?.map( property => { + if ( property.visible ){ + const propValue = node.graph_node.attributes[property.property]?.[0]; + if ( property.isGroup ){ + return ( + {property.label} + + ) + } - { node.graph_node?.attributes?.publishedURI && node.graph_node?.attributes?.publishedURI !== "" - ? ( - SPARC Portal Link - - ) - : <> - } + else if ( isValidUrl(propValue) ){ + return ( + {property.label} + + ) + } - { node.graph_node?.attributes?.hasAgeCategory - ? ( - Age Category - - ) - : <> - } - { (node.graph_node.attributes?.ageValue && node.graph_node.attributes?.ageUnit) - ? simpleValue('Age', node.graph_node.attributes?.ageValue + ' ' + node.graph_node.attributes?.ageUnit) - : (node.graph_node.attributes?.ageBaseUnit && node.graph_node.attributes?.ageBaseValue) - ? simpleValue('Age', node.graph_node.attributes?.ageBaseValue + ' ' + node.graph_node.attributes?.ageBaseUnit) - : <> - } + else if ( typeof propValue === "object" ){ + return ( + {property.label} + + ) + } - { (node.graph_node.attributes?.weightUnit && node.graph_node.attributes?.weightValue) - ? simpleValue('Weight', node.graph_node.attributes?.weightValue + ' ' + node.graph_node.attributes?.weightUnit) - : <> - } + else if ( typeof propValue === "string" ){ + return () + } - { node.graph_node?.attributes?.biologicalSex - ? ( - Biological Sex - - ) - : <> - } - { node.graph_node?.attributes?.specimenHasIdentifier && node.graph_node?.attributes?.specimenHasIdentifier !== "" - ? ( - Specimen identifier - - ) - : <> - } - { node.graph_node?.attributes?.subjectSpecies - ? ( - Species - - ) - : <> - } - { node.graph_node?.attributes?.subjectStrain - ? ( - Strains - - ) - : <> - } - { node.graph_node?.attributes?.hasAssignedGroup && node.graph_node?.attributes?.hasAssignedGroup.length > 0 - ? ( - Assigned Groups - - ) - : <> - } + return (<> ) + } + })} ); diff --git a/src/components/NodeDetailView/Details/Views/Breadcrumbs.js b/src/components/NodeDetailView/Details/Views/Breadcrumbs.js index f015aad..1eeea42 100644 --- a/src/components/NodeDetailView/Details/Views/Breadcrumbs.js +++ b/src/components/NodeDetailView/Details/Views/Breadcrumbs.js @@ -9,7 +9,7 @@ const HeaderBreadcrumbs = (props) => { const { links } = props; const goToLink = id => { const divElement = document.getElementById(id + detailsLabel); - divElement.scrollIntoView({ behavior: 'smooth' }); + divElement?.scrollIntoView({ behavior: 'smooth' }); } return ( diff --git a/src/config/app.json b/src/config/app.json index 4ff6e31..761251d 100644 --- a/src/config/app.json +++ b/src/config/app.json @@ -7,9 +7,9 @@ "groups" : { "order" : { - "subjectSpecies" : { "tag" : "Subject Species", "icon" : "./images/graph/species.svg"}, - "subjectStrain" : { "tag" : "Subject Strain", "icon" : "./images/graph/strains.svg"}, - "biologicalSex" : { "tag" : "Subject Sex", "icon" : "./images/graph/sex.svg"}, + "animalSubjectIsOfSpecies" : { "tag" : "Subject Species", "icon" : "./images/graph/species.svg"}, + "animalSubjectIsOfStrain" : { "tag" : "Subject Strain", "icon" : "./images/graph/strains.svg"}, + "hasBiologicalSex" : { "tag" : "Subject Sex", "icon" : "./images/graph/sex.svg"}, "hasAgeCategory" : { "tag" : "Subject Age", "icon" : "./images/graph/age.svg"} } }, diff --git a/src/redux/initialState.js b/src/redux/initialState.js index 306097b..344efc5 100644 --- a/src/redux/initialState.js +++ b/src/redux/initialState.js @@ -1,5 +1,6 @@ import * as Actions from './actions'; import * as LayoutActions from '@metacell/geppetto-meta-client/common/layout/actions'; +import { rdfTypes } from "../utils/graphModel"; export const sdsInitialState = { "sdsState": { @@ -20,7 +21,14 @@ export const sdsInitialState = { source: "" }, layout : {}, - settings_panel_visible : false + settings_panel_visible : false, + metadata_model : { + dataset : [...rdfTypes.Dataset.properties], + subject : [...rdfTypes.Subject.properties], + sample : [...rdfTypes.Sample.properties], + group : [...rdfTypes.Group.properties], + file : [...rdfTypes.File.properties] + } } }; diff --git a/src/utils/Splinter.js b/src/utils/Splinter.js index 6285ce5..417bf4d 100644 --- a/src/utils/Splinter.js +++ b/src/utils/Splinter.js @@ -211,7 +211,6 @@ class Splinter { }) } }) - console.log("Force edges ", this.forced_edges) // Assign neighbors, to highlight links this.forced_edges.forEach(link => { @@ -519,7 +518,6 @@ class Splinter { } const groupID = parent.id + "_" + target_node.attributes[key]?.[0].replace(/\s/g, ""); - if ( this.nodes.get(groupID) === undefined ) { let name = target_node.attributes[key]?.[0]; @@ -537,7 +535,8 @@ class Splinter { childLinks : [], samples : 0, subjects : 0, - publishedURI : "" + publishedURI : "", + dataset_id : this.dataset_id }; let nodeF = this.factory.createNode(groupNode); const img = new Image(); @@ -720,22 +719,22 @@ class Splinter { } if (node.type === rdfTypes.Subject.key) { - if (node.attributes?.specimenHasIdentifier !== undefined) { - let source = this.nodes.get(node.attributes.specimenHasIdentifier[0]); + if (node.attributes?.animalSubjectIsOfStrain !== undefined) { + let source = this.nodes.get(node.attributes.animalSubjectIsOfStrain[0]); if ( source !== undefined ) { - node.attributes.specimenHasIdentifier[0] = source.attributes.label[0]; + node.attributes.animalSubjectIsOfStrain[0] = source.attributes.label[0]; } } - if (node.attributes?.subjectSpecies !== undefined) { - let source = this.nodes.get(node.attributes.subjectSpecies[0]); + if (node.attributes?.animalSubjectIsOfSpecies !== undefined) { + let source = this.nodes.get(node.attributes.animalSubjectIsOfSpecies[0]); if ( source !== undefined ) { - node.attributes.subjectSpecies[0] = source.attributes.label[0]; + node.attributes.animalSubjectIsOfSpecies[0] = source.attributes.label[0]; } } - if (node.attributes?.biologicalSex !== undefined) { - let source = this.nodes.get(node.attributes.biologicalSex[0]); + if (node.attributes?.hasBiologicalSex !== undefined) { + let source = this.nodes.get(node.attributes.hasBiologicalSex[0]); if ( source !== undefined ) { - node.attributes.biologicalSex[0] = source.attributes.label[0]; + node.attributes.hasBiologicalSex[0] = source.attributes.label[0]; } } diff --git a/src/utils/graphModel.js b/src/utils/graphModel.js index e893c1e..424227b 100644 --- a/src/utils/graphModel.js +++ b/src/utils/graphModel.js @@ -51,13 +51,15 @@ export const rdfTypes = { "type": "rdfs", "key": "label", "property": "label", - "label": "To be filled" + "label": "To be filled", + "visible" : true }, { "type": "TEMP", "key": "hasUriHuman", "property": "hasUriHuman", - "label": "To be filled" + "label": "To be filled", + "visible" : true } ] }, @@ -66,10 +68,18 @@ export const rdfTypes = { "key": "Group", "properties": [ { - "type": "rdfs", - "key": "label", - "property": "label", - "label": "To be filled" + "type": "TEMP", + "key": "name", + "property": "name", + "label": "Name", + "visible" : true + }, + { + "type": "TEMP", + "key": "subjects", + "property": "subjects", + "label": "Number of Subjects", + "visible" : true } ] }, @@ -351,15 +361,38 @@ export const rdfTypes = { "properties": [ { "type": "rdfs", - "key": "label", - "property": "label", - "label": "To be filled" + "key": "identifier", + "property": "identifier", + "label": "Label", + "visible" : true }, { "type": "TEMP", - "key": "hasUriHuman", - "property": "hasUriHuman", - "label": "To be filled" + "key": "mimetype", + "property": "mimetype", + "label": "Mimetype", + "visible" : true + }, + { + "type": "TEMP", + "key": "size", + "property": "size", + "label": "Size", + "visible" : true + }, + { + "type": "TEMP", + "key": "updated", + "property": "updated", + "label": "Updated On", + "visible" : true + }, + { + "type": "TEMP", + "key": "publishedURI", + "property": "publishedURI", + "label": "Published URI", + "visible" : true } ] }, @@ -367,101 +400,128 @@ export const rdfTypes = { "image": "./images/graph/folder.svg", "key": "Subject", "properties": [ - { - "type": "sparc", - "key": "animalSubjectIsOfSpecies", - "property": "subjectSpecies", - "label": "to be filled" - }, { "type": "TEMP", - "key": "hasFolderAboutIt", - "property": "hasFolderAboutIt", - "label": "Folder that contains collection and files about the sample" - }, - { - "type": "sparc", - "key": "animalSubjectIsOfStrain", - "property": "subjectStrain", - "label": "to be filled" + "key": "localId", + "property": "localId", + "label": "Label", + "visible" : true }, { "type": "TEMP", - "key": "hasAge", - "property": "age", - "label": "to be filled" + "key": "hasUriHuman", + "property": "hasUriHuman", + "label": "URI Human", + "visible" : true }, { "type": "TEMP", "key": "hasAgeCategory", "property": "hasAgeCategory", - "label": "to be filled" + "label": "Age Category", + "visible" : true + }, + { + "type": "TEMP", + "key": "hasAge", + "property": "hasAge", + "label": "Age", + "visible" : true }, { "type": "TEMP", "key": "hasAgeMin", "property": "hasAgeMin", - "label": "to be filled" + "label": "Age Min", + "visible" : true }, { "type": "TEMP", "key": "hasAgeMax", "property": "hasAgeMax", - "label": "to be filled" + "label": "Age Max", + "visible" : true }, { - "type": "TEMP", - "key": "hasAssignedGroup", - "property": "hasAssignedGroup", - "label": "to be filled" + "type": "sparc", + "key": "hasBiologicalSex", + "property": "hasBiologicalSex", + "label": "Biological Sex", + "visible" : true, + "isGroup" : true }, { "type": "sparc", - "key": "hasBiologicalSex", - "property": "biologicalSex", - "label": "to be filled" + "key": "specimenHasIdentifier", + "property": "specimenHasIdentifier", + "label": "Specimen has Identifier", + "visible" : true, + "isGroup" : true }, { - "type": "TEMP", - "key": "localId", - "property": "identifier", - "label": "to be filled" + "type": "sparc", + "key": "animalSubjectIsOfSpecies", + "property": "animalSubjectIsOfSpecies", + "label": "Subject Species", + "visible" : true, + "isGroup" : true + }, + { + "type": "sparc", + "key": "animalSubjectIsOfStrain", + "property": "animalSubjectIsOfStrain", + "label": "Subject Strain", + "visible" : true, + "isGroup" : true }, { "type": "TEMP", - "key": "hasDerivedInformationAsParticipant", - "property": "hasDerivedInformationAsParticipant", - "label": "to be filled" + "key": "hasAssignedGroup", + "property": "hasAssignedGroup", + "label": "Assigned Group", + "visible" : true }, { - "type": "sparc", - "key": "specimenHasIdentifier", - "property": "specimenHasIdentifier", - "label": "to be filled" + "type": "TEMP", + "key": "hasGenotype", + "property": "hasGenotype", + "label": "Genotype", + "visible" : true }, { "type": "TEMP", - "key": "participantInPerformanceOf", - "property": "participantInPerformanceOf", - "label": "to be filled" + "key": "experimental_file", + "property": "experimental_file", + "label": "Experimental File", + "visible" : true }, { - "type": "rdfs", - "key": "label", - "property": "label", - "label": "To be filled" + "type": "TEMP", + "key": "reference_atlas", + "property": "reference_atlas", + "label": "Reference Atlas", + "visible" : true }, { "type": "TEMP", - "key": "hasUriHuman", - "property": "hasUriHuman", - "label": "To be filled" + "key": "hasFolderAboutIt", + "property": "hasFolderAboutIt", + "label": "Folder About It", + "visible" : true + }, + { + "type": "TEMP", + "key": "hasDerivedInformationAsParticipant", + "property": "hasDerivedInformationAsParticipant", + "label": "Derived Information as Participant", + "visible" : true }, { "type": "TEMP", - "key": "publishedURI", - "property": "publishedURI", - "label": "to be filled" + "key": "participantInPerformanceOf", + "property": "participantInPerformanceOf", + "label": "Participant In Performance Of", + "visible" : true }, ], "additional_properties": [ @@ -515,65 +575,89 @@ export const rdfTypes = { "image": "./images/graph/folder.svg", "key": "Sample", "properties": [ + { + "type": "rdfs", + "key": "label", + "property": "label", + "label": "Label", + "visible" : true + }, + { + "type": "TEMP", + "key": "hasUriHuman", + "property": "hasUriHuman", + "label": "Human URI", + "visible" : true + }, { "type": "TEMP", "key": "hasFolderAboutIt", "property": "hasFolderAboutIt", - "label": "Folder that contains collection and files about the sample" + "label": "Related Folder", + "visible" : true }, { "type": "TEMP", "key": "wasDerivedFromSubject", "property": "derivedFrom", - "label": "Derived from the subject" + "label": "Derived from Subject", + "visible" : true }, { "type": "TEMP", "key": "localId", - "property": "identifier", - "label": "Unique instance identifier" + "property": "localId", + "label": "Local ID", + "visible" : true }, { "type": "TEMP", "key": "hasAssignedGroup", "property": "hasAssignedGroup", - "label": "to be filled" + "label": "Assigned Group", + "visible" : true }, { "type": "TEMP", "key": "hasDerivedInformationAsParticipant", "property": "hasDerivedInformationAsParticipant", - "label": "to be filled" + "label": "Derived Information as Participant", + "visible" : true }, { "type": "TEMP", "key": "hasDigitalArtifactThatIsAboutIt", "property": "hasDigitalArtifactThatIsAboutIt", - "label": "Unique instance identifier" - }, - { - "type": "TEMP", - "key": "participantInPerformanceOf", - "property": "participantInPerformanceOf", - "label": "Unique instance identifier" + "label": "Digital Artifact", + "visible" : true }, { "type": "TEMPRAW", "key": "wasExtractedFromAnatomicalRegion", "property": "wasExtractedFromAnatomicalRegion", - "label": "Unique instance identifier" + "label": "Extracted From Anatomical Region", + "visible" : true }, { - "type": "rdfs", - "key": "label", - "property": "label", - "label": "To be filled" + "type": "TEMPRAW", + "key": "sample_anatomical_location", + "property": "sample_anatomical_location", + "label": "Sample Anatomical Location", + "visible" : true + }, + { + "type": "TEMPRAW", + "key": "sample_type", + "property": "sample_type", + "label": "Sample Type", + "visible" : true }, { "type": "TEMP", - "key": "hasUriHuman", - "property": "hasUriHuman", - "label": "To be filled" + "key": "participantInPerformanceOf", + "property": "participantInPerformanceOf", + "label": "Participant in Performance Of", + "visible" : true } ] }, @@ -582,29 +666,61 @@ export const rdfTypes = { "key": "Person", "properties": [ { - "type": "sparc", - "key": "firstName", - "property": "firstName", - "label": "To be filled" + "type": "rdfs", + "key": "label", + "property": "label", + "label": "Name", + "visible" : true }, { "type": "sparc", "key": "lastName", "property": "lastName", - "label": "To be filled" + "label": "Last Name", + "visible" : false + }, + { + "type": "sparc", + "key": "firstName", + "property": "firstName", + "label": "First Name", + "visible" : false }, { "type": "TEMP", "key": "middleName", "property": "middleName", - "label": "To be filled" + "label": "Middle Name", + "visible" : false + }, + { + "type": "sparc", + "key": "hasORCIDId", + "property": "hasORCIDId", + "label": "ORCID Id", + "visible" : false }, { "type": "TEMP", "key": "hasAffiliation", "property": "hasAffiliation", - "label": "To be filled" + "label": "Affiliation", + "visible" : true }, + { + "type": "TEMP", + "key": "hasDataRemoteUserId", + "property": "hasDataRemoteUserId", + "label": "Data Remote User ID", + "visible" : true + }, + { + "type": "TEMP", + "key": "contributorTo", + "property": "contributorTo", + "label": "Contributor To", + "visible" : true + } ] }, "Protocol": { @@ -615,19 +731,29 @@ export const rdfTypes = { "type": "rdfs", "key": "label", "property": "label", - "label": "To be filled" + "label": "Label", + "visible" : true + }, + { + "type": "TEMP", + "key": "protocolHasNumberOfSteps", + "property": "protocolHasNumberOfSteps", + "label": "Number of Steps", + "visible" : true }, { "type": "TEMP", "key": "hasUriHuman", "property": "hasUriHuman", - "label": "To be filled" + "label": "Human URI", + "visible" : true }, { "type": "TEMP", - "key": "protocolHasNumberOfSteps", - "property": "protocolHasNumberOfSteps", - "label": "To be filled" + "key": "hasDoi", + "property": "hasDoi", + "label": "DOI", + "visible" : true } ] },