diff --git a/package-lock.json b/package-lock.json index 4c7d4b0c0a26c5060ede383834ba79b04cedf45c..ae540f96a087b6490e66dd2e7968a248a51a2115 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3088,8 +3088,7 @@ "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true, - "optional": true + "dev": true }, "coa": { "version": "2.0.2", @@ -9660,8 +9659,7 @@ "version": "4.0.8", "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", - "dev": true, - "optional": true + "dev": true }, "rx-lite-aggregates": { "version": "4.0.8", diff --git a/src/App.vue b/src/App.vue index f9257bbb344bedd3e13e46fe2087cb777a954843..f50b6ee8a213a2b394c76d253a552210848d27cb 100644 --- a/src/App.vue +++ b/src/App.vue @@ -90,7 +90,7 @@ > <v-tab ripple>{{ $t('Submit') }}</v-tab> <v-tab ripple>{{ $t('Display') }}</v-tab> - <!-- <v-tab ripple>{{ $t('Edit') }}</v-tab> + <!-- <v-tab ripple>{{ $t('Edit') }}</v-tab> <v-tab ripple>{{ $t('Search') }}</v-tab>--> </v-tabs> @@ -99,8 +99,8 @@ <v-window v-model="window"> <v-window-item> - <ph-submit - :model="contentmodel" + <ph-submit + :model="contentmodel" :form="form" v-on:object-created="objectCreated($event)" v-on:load-form="form = $event" @@ -108,15 +108,14 @@ v-on:add-phaidrasubject-section="addPhaidrasubjectSection($event)" ></ph-submit> </v-window-item> - <v-window-item> - <v-flex> + <v-window-item> + <v-flex> <v-card> <v-toolbar flat> <v-toolbar-title>{{$t('Display')}}</v-toolbar-title> <v-divider class="mx-3" inset vertical></v-divider> <v-text-field v-model="pid" :placeholder="pid"></v-text-field> <v-spacer></v-spacer> - <v-btn raised single-line @@ -127,94 +126,52 @@ </v-toolbar> <v-card-text> <v-layout row> - - <ph-d-jsonld :form="form" :jsonld="displayjsonld" :pid="pid"></ph-d-jsonld> - + <ph-d-jsonld + :form="emptyForm" + :jsonld="displayjsonld" + :viewpharmameta="true" + :pid="pid" + ></ph-d-jsonld> + </v-layout> + <v-layout row> + <v-toolbar v-if="members.length>0" dense flat> + <v-toolbar-title class="font-weight-light">File Members</v-toolbar-title> + </v-toolbar> </v-layout> - <v-layout row> - <v-toolbar v-if="members.length>0" dense flat> - - <v-toolbar-title class="font-weight-light">File Members</v-toolbar-title> - - </v-toolbar> - </v-layout> - - <v-layout row wrap v-for="(mpid,order) in members" :key="mpid.pid"> - - <v-flex xs2 class="subheading"> - <a :href="'https://' + instance.baseurl +'/'+mpid.pid" target="_blank">{{'https://' + instance.baseurl +'/'+mpid.pid}}</a> - - - </v-flex> - - <v-flex xs2> - <p-img - - :src="'https://' + instance.baseurl + '/preview/' + mpid.pid + '///120'" - class="elevation-1" - > - <v-layout slot="placeholder" fill-height align-center justify-center ma-0> - <v-progress-circular indeterminate color="grey lighten-5"></v-progress-circular> - </v-layout> - </p-img> - </v-flex> - <v-flex xs8> <ph-d-jsonld :jsonld="displayjsonldmembers[order]"> </ph-d-jsonld></v-flex> - - </v-layout> - - - </v-card-text> - </v-card> - </v-flex> - </v-window-item> - <!-- <v-window-item> - <v-flex> - <v-card> - <v-toolbar flat> - <v-toolbar-title>{{$t('Edit')}}</v-toolbar-title> - <v-divider class="mx-3" inset vertical></v-divider> - <v-text-field v-model="pid" :placeholder="pid"></v-text-field> - <v-spacer></v-spacer> - <v-btn - raised - single-line - class="right" - color="primary lighten-2" - @click="loadEdit()" - >Load</v-btn> - </v-toolbar> - <v-card-text> - - </v-card-text> - </v-card> - </v-flex> - </v-window-item>--> - <!-- <v-window-item> - <v-flex> - <v-card> - <v-toolbar flat> - <v-toolbar-title>{{ $t('Search') }}</v-toolbar-title> - <v-divider class="mx-3" inset vertical></v-divider> - <v-text-field - :placeholder="'Collection, e.g. ' + sampleCollection" - v-model="collection" - ></v-text-field> - <v-spacer></v-spacer> - <v-btn - raised - single-line - class="right" - color="primary lighten-2" - @click="loadSearch()" - >Load Collection</v-btn> - </v-toolbar> - <v-card-text> - <p-search :collection="collection"></p-search> + <v-layout row wrap v-for="(mpid,order) in members" :key="mpid.pid"> + <v-flex xs2 class="subheading"> + <a + :href="'https://' + instance.baseurl +'/'+mpid.pid" + target="_blank" + >{{'https://' + instance.baseurl +'/'+mpid.pid}}</a> + </v-flex> + + <v-flex xs2> + <p-img + :src="'https://' + instance.baseurl + '/preview/' + mpid.pid + '///120'" + class="elevation-1" + > + <v-layout + slot="placeholder" + fill-height + align-center + justify-center + ma-0 + > + <v-progress-circular indeterminate color="grey lighten-5"></v-progress-circular> + </v-layout> + </p-img> + </v-flex> + <v-flex xs8> + <ph-d-jsonld :jsonld="displayjsonldmembers[order]"></ph-d-jsonld> + </v-flex> + </v-layout> </v-card-text> </v-card> </v-flex> - </v-window-item>--> + </v-window-item> + </v-window> </v-flex> </v-layout> @@ -298,9 +255,10 @@ export default { form: { sections: [] }, + emptyForm: {}, members: [], fullmembers: [], - pid: "o:589108", + pid: "o:589444", piddoc: {}, collection: "", sampleCollection: "", @@ -765,7 +723,7 @@ export default { this.form.sections[1].fields.push(fields.getField("file")); - //push to biassay + //push to bioassay this.form.sections[2].categories[2].fields.push( fields.getField("0-Assay-title") @@ -817,23 +775,29 @@ export default { var uniprot_assayTarget = fields.getField("1-Uniprot"); uniprot_assayTarget.label = "Assay Target Uniprot record"; - uniprot_assayTarget.type = "pharmaWien:uniprot_protein_assayTarget"; + uniprot_assayTarget.type = "pharmaWien:assayTarget_uniprot"; uniprot_assayTarget.category = ["assayTarget"]; + uniprot_assayTarget.subcategory = ["assay target protein"]; var isoform_assayTarget = fields.getField("1-Isoform"); isoform_assayTarget.label = "Assay Target Isoform"; - isoform_assayTarget.type = "pharmaWien:assayTarget_isoform_protein"; + isoform_assayTarget.type = "pharmaWien:assayTarget__proteinIsoform"; isoform_assayTarget.category = ["assayTarget"]; + isoform_assayTarget.subcategory = ["assay target protein isoform"]; var seqAlt_assayTarget = fields.getField("1-Protein-sequence-alteration"); seqAlt_assayTarget.label = "Assay Target Protein sequence alteration"; - seqAlt_assayTarget.type = "pharmaWien:assayTarget_seqAlt_protein"; + seqAlt_assayTarget.type = "pharmaWien:assayTarget_proteinSeqAlt"; seqAlt_assayTarget.category = ["assayTarget"]; + seqAlt_assayTarget.subcategory = [ + "assay target Protein sequence alteration" + ]; var protMod_assayTarget = fields.getField("1-Protein-modification"); protMod_assayTarget.label = "Assay Target Protein Modification"; - protMod_assayTarget.type = "pharmaWien:assayTarget_protMod_protein"; + protMod_assayTarget.type = "pharmaWien:assayTarget_proteinProtMod"; protMod_assayTarget.category = ["assayTarget"]; + protMod_assayTarget.subcategory = ["assay target Protein Modification"]; this.form.sections[2].categories[2].fields.push(uniprot_assayTarget); this.form.sections[2].categories[2].fields.push(isoform_assayTarget); this.form.sections[2].categories[2].fields.push(seqAlt_assayTarget); @@ -844,26 +808,30 @@ export default { gene_assayTarget.type = "pharmaWien:assayTarget_geneId"; gene_assayTarget.category = ["assayTarget"]; + gene_assayTarget.subcategory = ["assay Target gene ID"]; var geneMod_assayTarget = fields.getField("1-Gene-modification"); geneMod_assayTarget.label = "Assay Target Gene Modification"; - geneMod_assayTarget.type = "pharmaWien:assayTarget_geneMod"; geneMod_assayTarget.category = ["assayTarget"]; + geneMod_assayTarget.subcategory = ["assay target gene modification"]; this.form.sections[2].categories[2].fields.push(gene_assayTarget); this.form.sections[2].categories[2].fields.push(geneMod_assayTarget); var nacid_assayTarget = fields.getField("1-Nucleic-acid-type"); nacid_assayTarget.label = "Assay Target Nucleic Acid Type"; - nacid_assayTarget.type = "pharmaWien:assayTarget_type_nucleicAcid"; + nacid_assayTarget.type = "pharmaWien:assayTarget_nucleicAcidType"; nacid_assayTarget.category = ["assayTarget"]; nacid_assayTarget.description = "Nucleic Acid"; + nacid_assayTarget.subcategory = ["assay target Nucleic Acid Type"]; var refSeq_assayTarget = fields.getField("1-RefSeq-accession"); refSeq_assayTarget.label = "Assay Target RefSeq accession:"; - refSeq_assayTarget.type = "pharmaWien:assayTarget_refSeq_nucleicAcid"; + refSeq_assayTarget.type = + "pharmaWien:assayTarget_nucleicAcidRefSeqAccession"; refSeq_assayTarget.category = ["assayTarget"]; refSeq_assayTarget.description = "Nucleic Acid"; + refSeq_assayTarget.subcategory = ["assay target RefSeq accession"]; this.form.sections[2].categories[2].fields.push(nacid_assayTarget); this.form.sections[2].categories[2].fields.push(refSeq_assayTarget); var PFAM_assayTarget = fields.getField("1-PFAM-accession"); @@ -871,34 +839,45 @@ export default { PFAM_assayTarget.type = "pharmaWien:assayTarget_PFAM"; PFAM_assayTarget.category = ["assayTarget"]; + PFAM_assayTarget.subcategory = ["assay target PFAM"]; this.form.sections[2].categories[2].fields.push(PFAM_assayTarget); var uniprotsub_assayTarget = fields.getField("1-Uniprot"); uniprotsub_assayTarget.label = "Assay Target Protein Subunit Uniprot record"; - uniprotsub_assayTarget.type = "pharmaWien:assayTarget_uniprot_protSub"; + uniprotsub_assayTarget.type = "pharmaWien:assayTarget_protSub"; uniprotsub_assayTarget.category = ["assayTarget"]; uniprotsub_assayTarget.description = "Protein Subunit"; + uniprotsub_assayTarget.subcategory = ["assay target protein subunit"]; var isoformsub_assayTarget = fields.getField("1-Isoform"); isoformsub_assayTarget.label = "Assay Target Protein Subunit Isoform"; - isoformsub_assayTarget.type = "pharmaWien:assayTarget_isoform_protSub"; + isoformsub_assayTarget.type = "pharmaWien:assayTarget_protSubIsoform"; isoformsub_assayTarget.category = ["assayTarget"]; isoformsub_assayTarget.description = "Protein Subunit"; + isoformsub_assayTarget.subcategory = [ + "assay Target protein subunit isoform" + ]; var seqAltsub_assayTarget = fields.getField( "1-Protein-sequence-alteration" ); seqAltsub_assayTarget.label = "Assay Target Protein Subunit sequence alteration"; - seqAltsub_assayTarget.type = "pharmaWien:assayTarget_seqAlt_protSub"; + seqAltsub_assayTarget.type = "pharmaWien:assayTarget_protSubSeqAlt"; seqAltsub_assayTarget.category = ["assayTarget"]; + seqAltsub_assayTarget.subcategory = [ + "assay Target Protein Subunit sequence alteration" + ]; seqAltsub_assayTarget.description = "Protein Subunit"; var protModsub_assayTarget = fields.getField("1-Protein-modification"); protModsub_assayTarget.label = "Assay Target Protein Subunit modification"; - protModsub_assayTarget.type = "pharmaWien:assayTarget_protMod_protSub"; + protModsub_assayTarget.type = "pharmaWien:assayTarget_protSubMod"; protModsub_assayTarget.category = ["assayTarget"]; + protModsub_assayTarget.subcategory = [ + "Assay Target Protein Subunit modification" + ]; protModsub_assayTarget.description = "Protein Subunit"; this.form.sections[2].categories[2].fields.push(uniprotsub_assayTarget); this.form.sections[2].categories[2].fields.push(isoformsub_assayTarget); @@ -910,8 +889,11 @@ export default { protcomplex_assayTarget.label = "Assay Target Protein Complex-Portal Accession"; protcomplex_assayTarget.type = - "pharmaWien:assayTarget_portalAcc_protComplex"; + "pharmaWien:assayTarget_protComplexPortalAcc"; protcomplex_assayTarget.category = ["assayTarget"]; + protcomplex_assayTarget.subcategory = [ + "ssay Target Protein Complex-Portal Accession" + ]; this.form.sections[2].categories[2].fields.push(protcomplex_assayTarget); this.form.sections[2].categories[2].fields.push( fields.getField("0-carbohydrate") @@ -966,11 +948,14 @@ export default { viroids_organism_assayTarget ); var cell_line_assayTarget = fields.getField("0-cell-line"); - cell_line_assayTarget.label = "Assay Target Cell line (cellosaurus)"; + cell_line_assayTarget.label = "Assay Target Cell line"; cell_line_assayTarget.type = "pharmaWien:assayTarget_cellosaurus"; cell_line_assayTarget.visible = false; cell_line_assayTarget.category = ["assayTarget"]; + cell_line_assayTarget.subcategory = [ + "Assay Target Cell line (cellosaurus)" + ]; this.form.sections[2].categories[2].fields.push(cell_line_assayTarget); this.form.sections[2].categories[2].fields.push( @@ -1132,6 +1117,8 @@ export default { this.form.sections[2].categories[8].fields.push( fields.getField("8-Discipline") ); + this.emptyForm = JSON.parse(JSON.stringify(this.form)); + this.$store.commit("initForm", this.emptyForm); }, createContainerForm: function() { this.createSimpleForm(); diff --git a/src/components/display/pharma_display/PDEntity.vue b/src/components/display/pharma_display/PDEntity.vue index 7c75ed000bdd2e0c5cc3d08c0b38fee28057a802..de56d8149ec3ccdd76ea970988891cc08fc90594 100644 --- a/src/components/display/pharma_display/PDEntity.vue +++ b/src/components/display/pharma_display/PDEntity.vue @@ -8,15 +8,15 @@ <template class="valuefield" v-for="(gn) in entity['schema:givenName']" - >{{ gn['@value'] }}</template> + >{{ gn['@value'] +' '}}</template> <template class="valuefield" v-for="(fn) in entity['schema:familyName']" - >{{ fn['@value'] }}</template> + >{{ fn['@value']+' '}}</template> <template class="valuefield" v-for="(fn) in entity['schema:name']">{{ fn['@value'] }}</template> <template v-if="entity['schema:affiliation']" class="grey--text"> <template v-for="(af) in entity['schema:affiliation']"> - <template class="valuefield" v-for="(afn) in af">{{ afn['@value'] }}</template> + <template class="valuefield" v-for="(afn) in af">{{ afn['@value']}}</template> </template> </template> </v-flex> diff --git a/src/components/display/pharma_display/PDSkosPreflabel.vue b/src/components/display/pharma_display/PDSkosPreflabel.vue index 91a16e49833de10e6c0743cf9429b905669e000e..56397ccb4072a5ced04e1f59fadbfd95688c1d6c 100644 --- a/src/components/display/pharma_display/PDSkosPreflabel.vue +++ b/src/components/display/pharma_display/PDSkosPreflabel.vue @@ -1,6 +1,5 @@ <template> <v-flex> - <v-layout column> <v-flex> <template v-for="(l, i) in o['skos:prefLabel']"> @@ -9,9 +8,9 @@ {{ $t(o['@type']) }} <template v-if="l['@language']">({{ l['@language'] }})</template> </v-flex> - + <v-flex md4 xs12 v-else class="pdlabel primary--text" :key="'l'+i"> - {{ $t(p) }} + {{ $t(p) }} <template v-if="l['@language']">({{ l['@language'] }})</template> </v-flex> <v-flex md8 xs12 v-if="o['skos:exactMatch']" :key="'t-id'+i"> @@ -21,7 +20,7 @@ target="_blank" >{{ l['@value'] }}</a> </v-flex> - <v-flex class="valuefield" md8 xs12 v-else :key="'t'+i"> {{ l['@value'] }}</v-flex> + <v-flex class="valuefield" md8 xs12 v-else :key="'t'+i">{{ l['@value'] }}</v-flex> </v-layout> </template> </v-flex> diff --git a/src/components/display/pharma_display/PhDJsonld.vue b/src/components/display/pharma_display/PhDJsonld.vue index f496cf95783f8a374f44770d91ef2746fa83aaac..fd8c09d28f905f5bb2f0087f9dca8b9c7646abe6 100644 --- a/src/components/display/pharma_display/PhDJsonld.vue +++ b/src/components/display/pharma_display/PhDJsonld.vue @@ -1,421 +1,508 @@ <template> + <ph-d-jsonld-layout v-if="jsonld"> + <template> + <template v-for="(o, p) in jsonld"> + <template v-if="p==='dcterms:type'" slot="dcterms:type"> + <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'type'+j"></p-d-skos-preflabel> + </template> -<ph-d-jsonld-layout v-if="jsonld"> - - - <template> - - <template v-for="(o, p) in jsonld"> - - - <template v-if="p==='dcterms:type'" slot="dcterms:type"> - <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'type'+j"></p-d-skos-preflabel> - </template> - - <template v-else-if="p==='edm:hasType'" slot="edm:hasType"> - <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'objtyp'+j"></p-d-skos-preflabel> - </template> -<template v-else-if="p==='dcterms:accessRights'" slot="dcterms:accessRights"> - <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'dtar'+j" v-bind.sync="displayProperties"></p-d-skos-preflabel> + <template v-else-if="p==='edm:hasType'" slot="edm:hasType"> + <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'objtyp'+j"></p-d-skos-preflabel> + </template> + <template v-else-if="p==='dcterms:accessRights'" slot="dcterms:accessRights"> + <p-d-skos-preflabel + :p="p" + :o="item" + v-for="(item, j) in o" + :key="componentid+'dtar'+j" + v-bind.sync="displayProperties" + ></p-d-skos-preflabel> + </template> + <template v-else-if="p==='schema:genre'" slot="schema:genre"> + <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'genre'+j"></p-d-skos-preflabel> </template> - <template v-else-if="p==='schema:genre'" slot="schema:genre"> - <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'genre'+j"></p-d-skos-preflabel> - </template> - <template v-else-if="p==='rdau:P60059'" slot="rdau:P60059"> - <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'P60059'+j"></p-d-skos-preflabel> - </template> + <template v-else-if="p==='rdau:P60059'" slot="rdau:P60059"> + <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'P60059'+j"></p-d-skos-preflabel> + </template> - <template v-else-if="p==='dce:title'" slot="dce:title"> - <p-d-title :o="t" v-for="(t, j) in o" :key="componentid+'title'+j"></p-d-title> - </template> + <template v-else-if="p==='dce:title'" slot="dce:title"> + <p-d-title :o="t" v-for="(t, j) in o" :key="componentid+'title'+j"></p-d-title> + </template> - <template v-else-if="p.startsWith('role:')" slot="role"> - <p-d-entity :role="p" :entity="e" v-for="(e, j) in o" :key="componentid+'entity'+p+j"></p-d-entity> - </template> + <template v-else-if="p.startsWith('role:')" slot="role"> + <p-d-entity :role="p" :entity="e" v-for="(e, j) in o" :key="componentid+'entity'+p+j"></p-d-entity> + </template> - <template v-else-if="p==='bf:note'" slot="bf:note"> - <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'text'+j"></p-d-skos-preflabel> - </template> + <template v-else-if="p==='bf:note'" slot="bf:note"> + <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'text'+j"></p-d-skos-preflabel> + </template> - <template v-else-if="p==='bf:tableOfContents'" slot="bf:tableOfContents"> - <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'toc'+j"></p-d-skos-preflabel> - </template> + <template v-else-if="p==='bf:tableOfContents'" slot="bf:tableOfContents"> + <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'toc'+j"></p-d-skos-preflabel> + </template> - <template v-else-if="p==='dce:subject'" slot="dce:subject"> - <p-d-keyword :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'keyword'+j"></p-d-keyword> - </template> + <template v-else-if="p==='dce:subject'" slot="dce:subject"> + <p-d-keyword :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'keyword'+j"></p-d-keyword> + </template> - <template v-else-if="p==='dcterms:language'" slot="dcterms:language"> - <p-d-labeled-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'lan'+j"></p-d-labeled-value> - </template> + <template v-else-if="p==='dcterms:language'" slot="dcterms:language"> + <p-d-labeled-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'lan'+j"></p-d-labeled-value> + </template> - <template v-else-if="p==='schema:subtitleLanguage'" slot="schema:subtitleLanguage"> - <p-d-labeled-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'sublan'+j"></p-d-labeled-value> - </template> + <template v-else-if="p==='schema:subtitleLanguage'" slot="schema:subtitleLanguage"> + <p-d-labeled-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'sublan'+j"></p-d-labeled-value> + </template> - <template v-else-if="p==='dcterms:date'" slot="dcterms:date"> - <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'date'+j"></p-d-value> - </template> + <template v-else-if="p==='dcterms:date'" slot="dcterms:date"> + <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'date'+j"></p-d-value> + </template> - <template v-else-if="p==='dcterms:created'" slot="dcterms:created"> - <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'created'+j"></p-d-value> - </template> + <template v-else-if="p==='dcterms:created'" slot="dcterms:created"> + <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'created'+j"></p-d-value> + </template> - <template v-else-if="p==='dcterms:modified'" slot="dcterms:modified"> - <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'modified'+j"></p-d-value> - </template> + <template v-else-if="p==='dcterms:modified'" slot="dcterms:modified"> + <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'modified'+j"></p-d-value> + </template> - <template v-else-if="p==='dcterms:available'" slot="dcterms:available"> - <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'available'+j"></p-d-value> - </template> + <template v-else-if="p==='dcterms:available'" slot="dcterms:available"> + <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'available'+j"></p-d-value> + </template> - <template v-else-if="p==='dcterms:issued'" slot="dcterms:issued"> - <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'issued'+j"></p-d-value> - </template> + <template v-else-if="p==='dcterms:issued'" slot="dcterms:issued"> + <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'issued'+j"></p-d-value> + </template> - <template v-else-if="p==='dcterms:valid'" slot="dcterms:valid"> - <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'valid'+j"></p-d-value> - </template> + <template v-else-if="p==='dcterms:valid'" slot="dcterms:valid"> + <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'valid'+j"></p-d-value> + </template> - <template v-else-if="p==='dcterms:dateAccepted'" slot="dcterms:dateAccepted"> - <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'dateAccepted'+j"></p-d-value> - </template> + <template v-else-if="p==='dcterms:dateAccepted'" slot="dcterms:dateAccepted"> + <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'dateAccepted'+j"></p-d-value> + </template> - <template v-else-if="p==='dcterms:dateCopyrighted'" slot="dcterms:dateCopyrighted"> - <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'dateCopyrighted'+j"></p-d-value> - </template> + <template v-else-if="p==='dcterms:dateCopyrighted'" slot="dcterms:dateCopyrighted"> + <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'dateCopyrighted'+j"></p-d-value> + </template> - <template v-else-if="p==='dcterms:dateSubmitted'" slot="dcterms:dateSubmitted"> - <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'dateSubmitted'+j"></p-d-value> - </template> + <template v-else-if="p==='dcterms:dateSubmitted'" slot="dcterms:dateSubmitted"> + <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'dateSubmitted'+j"></p-d-value> + </template> - <template v-else-if="p==='rdau:P60071'" slot="rdau:P60071"> - <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'dateOfProduction'+j"></p-d-value> - </template> + <template v-else-if="p==='rdau:P60071'" slot="rdau:P60071"> + <p-d-value + :p="p" + :o="item" + v-for="(item, j) in o" + :key="componentid+'dateOfProduction'+j" + ></p-d-value> + </template> - <template v-else-if="p==='phaidra:dateAccessioned'" slot="phaidra:dateAccessioned"> - <p-d-value - :p="p" - :o="item" - v-for="(item, j) in o" - :key="componentid+'phaidra:dateAccessioned'+j" - ></p-d-value> - </template> + <template v-else-if="p==='phaidra:dateAccessioned'" slot="phaidra:dateAccessioned"> + <p-d-value + :p="p" + :o="item" + v-for="(item, j) in o" + :key="componentid+'phaidra:dateAccessioned'+j" + ></p-d-value> + </template> - <template v-else-if="p==='dcterms:temporal'" slot="dcterms:temporal"> - <p-d-lang-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'temporal'+j"></p-d-lang-value> - </template> + <template v-else-if="p==='dcterms:temporal'" slot="dcterms:temporal"> + <p-d-lang-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'temporal'+j"></p-d-lang-value> + </template> - <template v-else-if="p==='rdau:P60193'" slot="rdau:P60193"> - <p-d-series :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'series'+j"></p-d-series> - </template> + <template v-else-if="p==='rdau:P60193'" slot="rdau:P60193"> + <p-d-series :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'series'+j"></p-d-series> + </template> - <template v-else-if="p==='bf:provisionActivity'" slot="bf:provisionActivity"> - <p-d-bf-publication :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'bfpubl'+j"></p-d-bf-publication> - </template> + <template v-else-if="p==='bf:provisionActivity'" slot="bf:provisionActivity"> + <p-d-bf-publication :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'bfpubl'+j"></p-d-bf-publication> + </template> - <template v-else-if="p==='cito:cites'" slot="cito:cites"> - <p-d-citation :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'cites'+j"></p-d-citation> - </template> + <template v-else-if="p==='cito:cites'" slot="cito:cites"> + <p-d-citation :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'cites'+j"></p-d-citation> + </template> - <template v-else-if="p==='cito:isCitedBy'" slot="cito:isCitedBy"> - <p-d-citation :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'citedby'+j"></p-d-citation> - </template> + <template v-else-if="p==='cito:isCitedBy'" slot="cito:isCitedBy"> + <p-d-citation :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'citedby'+j"></p-d-citation> + </template> - <template v-else-if="p==='rdau:P60227'" slot="rdau:P60227"> - <p-d-adaptation :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'adaptation'+j"></p-d-adaptation> - </template> + <template v-else-if="p==='rdau:P60227'" slot="rdau:P60227"> + <p-d-adaptation :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'adaptation'+j"></p-d-adaptation> + </template> - <template v-else-if="p==='frapo:isOutputOf'" slot="frapo:isOutputOf"> - <template v-for="(item, j) in o"> - <template v-if="item['@type']==='aaiso:Programme'"> - <p-d-study-plan :p="p" :o="item" :key="componentid+'study-plan'+j"></p-d-study-plan> - </template> - <template v-else-if="item['@type']==='foaf:Project'"> - <p-d-project :p="p" :o="item" :key="componentid+'project'+j"></p-d-project> + <template v-else-if="p==='frapo:isOutputOf'" slot="frapo:isOutputOf"> + <template v-for="(item, j) in o"> + <template v-if="item['@type']==='aaiso:Programme'"> + <p-d-study-plan :p="p" :o="item" :key="componentid+'study-plan'+j"></p-d-study-plan> + </template> + <template v-else-if="item['@type']==='foaf:Project'"> + <p-d-project :p="p" :o="item" :key="componentid+'project'+j"></p-d-project> + </template> </template> </template> - </template> - <template v-else-if="p==='frapo:hasFundingAgency'" slot="frapo:hasFundingAgency"> - <p-d-funder :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'funder'+j"></p-d-funder> - </template> - - <template v-else-if="p==='rdax:P00009'" slot="rdax:P00009"> - <p-d-skos-preflabel - :p="p" - :o="item" - v-for="(item, j) in o" - :key="componentid+'association'+j" - ></p-d-skos-preflabel> - </template> + <template v-else-if="p==='frapo:hasFundingAgency'" slot="frapo:hasFundingAgency"> + <p-d-funder :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'funder'+j"></p-d-funder> + </template> - <template v-else-if="p==='bf:physicalLocation'" slot="bf:physicalLocation"> - <p-d-lang-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'physloc'+j"></p-d-lang-value> - </template> + <template v-else-if="p==='rdax:P00009'" slot="rdax:P00009"> + <p-d-skos-preflabel + :p="p" + :o="item" + v-for="(item, j) in o" + :key="componentid+'association'+j" + ></p-d-skos-preflabel> + </template> - <template v-else-if="p==='bf:shelfMark'" slot="bf:shelfMark"> - <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'callnr'+j"></p-d-value> - </template> + <template v-else-if="p==='bf:physicalLocation'" slot="bf:physicalLocation"> + <p-d-lang-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'physloc'+j"></p-d-lang-value> + </template> - <template v-else-if="p==='dcterms:provenance'" slot="dcterms:provenance"> - <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'prov'+j"></p-d-skos-preflabel> - </template> + <template v-else-if="p==='bf:shelfMark'" slot="bf:shelfMark"> + <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'callnr'+j"></p-d-value> + </template> - <template v-else-if="p==='dcterms:spatial'" slot="dcterms:spatial"> - <p-d-georeference :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'spatial'+j"></p-d-georeference> - </template> + <template v-else-if="p==='dcterms:provenance'" slot="dcterms:provenance"> + <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'prov'+j"></p-d-skos-preflabel> + </template> - <template v-else-if="p==='vra:placeOfCreation'" slot="vra:placeOfCreation"> - <p-d-georeference - :p="p" - :o="item" - v-for="(item, j) in o" - :key="componentid+'placeOfCreation'+j" - ></p-d-georeference> - </template> + <template v-else-if="p==='dcterms:spatial'" slot="dcterms:spatial"> + <p-d-georeference :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'spatial'+j"></p-d-georeference> + </template> - <template v-else-if="p==='vra:placeOfRepository'" slot="vra:placeOfRepository"> - <p-d-georeference :p="p" :o="item" v-for="(item, j) in o" :key="'placeOfRepository'+j"></p-d-georeference> - </template> + <template v-else-if="p==='vra:placeOfCreation'" slot="vra:placeOfCreation"> + <p-d-georeference + :p="p" + :o="item" + v-for="(item, j) in o" + :key="componentid+'placeOfCreation'+j" + ></p-d-georeference> + </template> - <template v-else-if="p==='vra:placeOfSite'" slot="vra:placeOfSite"> - <p-d-georeference - :p="p" - :o="item" - v-for="(item, j) in o" - :key="componentid+'placeOfSite'+j" - ></p-d-georeference> - </template> + <template v-else-if="p==='vra:placeOfRepository'" slot="vra:placeOfRepository"> + <p-d-georeference :p="p" :o="item" v-for="(item, j) in o" :key="'placeOfRepository'+j"></p-d-georeference> + </template> - <template v-else-if="p==='ebucore:filename'" slot="ebucore:filename"> - - <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'filename'+j"></p-d-value> - </template> + <template v-else-if="p==='vra:placeOfSite'" slot="vra:placeOfSite"> + <p-d-georeference + :p="p" + :o="item" + v-for="(item, j) in o" + :key="componentid+'placeOfSite'+j" + ></p-d-georeference> + </template> - <template v-else-if="p==='ebucore:hasMimeType'" slot="ebucore:hasMimeType"> - <p-d-labeled-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'mime'+j"></p-d-labeled-value> - </template> + <template v-else-if="p==='ebucore:filename'" slot="ebucore:filename"> + <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'filename'+j"></p-d-value> + </template> - <template v-else-if="p==='opaque:cco_accessionNumber'" slot="opaque:cco_accessionNumber"> - <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'accnr'+j"></p-d-value> - </template> + <template v-else-if="p==='ebucore:hasMimeType'" slot="ebucore:hasMimeType"> + <p-d-labeled-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'mime'+j"></p-d-labeled-value> + </template> - <template v-else-if="p==='vra:hasInscription'" slot="vra:hasInscription"> - <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'inscr'+j"></p-d-skos-preflabel> - </template> + <template v-else-if="p==='opaque:cco_accessionNumber'" slot="opaque:cco_accessionNumber"> + <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'accnr'+j"></p-d-value> + </template> - <template v-else-if="p==='vra:material'" slot="vra:material"> - <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'material'+j"></p-d-skos-preflabel> - </template> + <template v-else-if="p==='vra:hasInscription'" slot="vra:hasInscription"> + <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'inscr'+j"></p-d-skos-preflabel> + </template> - <template v-else-if="p==='vra:hasTechnique'" slot="vra:hasTechnique"> - <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'techn'+j"></p-d-skos-preflabel> - </template> + <template v-else-if="p==='vra:material'" slot="vra:material"> + <p-d-skos-preflabel + :p="p" + :o="item" + v-for="(item, j) in o" + :key="componentid+'material'+j" + ></p-d-skos-preflabel> + </template> - <template v-else-if="p==='dce:format'" slot="dce:format"> - <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'format'+j"></p-d-skos-preflabel> - </template> + <template v-else-if="p==='vra:hasTechnique'" slot="vra:hasTechnique"> + <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'techn'+j"></p-d-skos-preflabel> + </template> - <template v-else-if="p==='rdau:P60048'" slot="rdau:P60048"> - <p-d-skos-preflabel - :p="p" - :o="item" - v-for="(item, j) in o" - :key="componentid+'carriertype'+j" - ></p-d-skos-preflabel> - </template> + <template v-else-if="p==='dce:format'" slot="dce:format"> + <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'format'+j"></p-d-skos-preflabel> + </template> - <template v-else-if="p==='rdau:P60059'" slot="rdau:P60059"> - <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'regenc'+j"></p-d-skos-preflabel> - </template> + <template v-else-if="p==='rdau:P60048'" slot="rdau:P60048"> + <p-d-skos-preflabel + :p="p" + :o="item" + v-for="(item, j) in o" + :key="componentid+'carriertype'+j" + ></p-d-skos-preflabel> + </template> - <template v-else-if="p==='schema:width'" slot="schema:width"> - <p-d-dimension :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'width'+j"></p-d-dimension> - </template> + <template v-else-if="p==='rdau:P60059'" slot="rdau:P60059"> + <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'regenc'+j"></p-d-skos-preflabel> + </template> - <template v-else-if="p==='schema:height'" slot="schema:height"> - <p-d-dimension :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'height'+j"></p-d-dimension> - </template> + <template v-else-if="p==='schema:width'" slot="schema:width"> + <p-d-dimension :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'width'+j"></p-d-dimension> + </template> - <template v-else-if="p==='schema:depth'" slot="schema:depth"> - <p-d-dimension :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'depth'+j"></p-d-dimension> - </template> + <template v-else-if="p==='schema:height'" slot="schema:height"> + <p-d-dimension :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'height'+j"></p-d-dimension> + </template> - <template v-else-if="p==='schema:weight'" slot="schema:weight"> - <p-d-dimension :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'weight'+j"></p-d-dimension> - </template> + <template v-else-if="p==='schema:depth'" slot="schema:depth"> + <p-d-dimension :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'depth'+j"></p-d-dimension> + </template> - <template v-else-if="p==='schema:duration'" slot="schema:duration"> - <p-d-duration :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'duration'+j"></p-d-duration> - </template> + <template v-else-if="p==='schema:weight'" slot="schema:weight"> + <p-d-dimension :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'weight'+j"></p-d-dimension> + </template> - <template v-else-if="p==='schema:numberOfPages'" slot="schema:numberOfPages"> - <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'numberOfPages'+j"></p-d-value> - </template> + <template v-else-if="p==='schema:duration'" slot="schema:duration"> + <p-d-duration :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'duration'+j"></p-d-duration> + </template> - <template v-else-if="p==='bf:soundCharacteristic'" slot="bf:soundCharacteristic"> - <p-d-value - :p="p" - :o="item" - v-for="(item, j) in o" - :key="componentid+'soundCharacteristic'+j" - ></p-d-value> - </template> + <template v-else-if="p==='schema:numberOfPages'" slot="schema:numberOfPages"> + <p-d-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'numberOfPages'+j"></p-d-value> + </template> - <template v-else-if="p==='bf:supplementaryContent'" slot="bf:supplementaryContent"> - <p-d-skos-preflabel - :p="p" - :o="item" - v-for="(item, j) in o" - :key="componentid+'supplementaryContent'+j" - ></p-d-skos-preflabel> - </template> + <template v-else-if="p==='bf:soundCharacteristic'" slot="bf:soundCharacteristic"> + <p-d-value + :p="p" + :o="item" + v-for="(item, j) in o" + :key="componentid+'soundCharacteristic'+j" + ></p-d-value> + </template> - <template v-else-if="p==='dcterms:audience'" slot="dcterms:audience"> - <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'audience'+j"></p-d-skos-preflabel> - </template> + <template v-else-if="p==='bf:supplementaryContent'" slot="bf:supplementaryContent"> + <p-d-skos-preflabel + :p="p" + :o="item" + v-for="(item, j) in o" + :key="componentid+'supplementaryContent'+j" + ></p-d-skos-preflabel> + </template> - <template v-else-if="p==='bf:awards'" slot="bf:awards"> - <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'awards'+j"></p-d-skos-preflabel> - </template> + <template v-else-if="p==='dcterms:audience'" slot="dcterms:audience"> + <p-d-skos-preflabel + :p="p" + :o="item" + v-for="(item, j) in o" + :key="componentid+'audience'+j" + ></p-d-skos-preflabel> + </template> - <template v-else-if="p==='edm:rights'" slot="edm:rights"> - <p-d-license :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'license'+j"></p-d-license> - </template> + <template v-else-if="p==='bf:awards'" slot="bf:awards"> + <p-d-skos-preflabel :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'awards'+j"></p-d-skos-preflabel> + </template> - <template v-else-if="p==='dce:rights'" slot="dce:rights"> - <p-d-lang-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'rights'+j"></p-d-lang-value> - </template> + <template v-else-if="p==='edm:rights'" slot="edm:rights"> + <p-d-license :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'license'+j"></p-d-license> + </template> - <template v-else-if="p==='dcterms:subject'" slot="dcterms:subject"> - <template v-for="(subject, j) in o"> - <v-card - class="mt-3" - v-if="subject['@type']==='phaidra:Subject'" - :key="componentid+'psubject'+j" - > - <v-toolbar dense flat> - <v-layout> - <v-toolbar-title class="font-weight-light">Subject</v-toolbar-title> - </v-layout> - </v-toolbar> - <v-card-text class="ma-2"> - <p-d-jsonld :jsonld="subject"></p-d-jsonld> - </v-card-text> - </v-card> - - <template v-if="subject['@type']==='skos:Concept'"> - <p-d-skos-preflabel :p="p" :o="subject" :key="componentid+'subject'+j"></p-d-skos-preflabel> - </template> + <template v-else-if="p==='dce:rights'" slot="dce:rights"> + <p-d-lang-value :p="p" :o="item" v-for="(item, j) in o" :key="componentid+'rights'+j"></p-d-lang-value> </template> - <template v-for="(categ,index) in pharmaStructure"> - <v-card v-if="categ.fields.length>0" :key="index+categ.category"> - - <v-toolbar dense flat> - <v-layout> - <v-toolbar-title class="font-weight-light">{{categ.label}}</v-toolbar-title> - </v-layout> - </v-toolbar> - <template v-if="categ.fields.length>0"> - - <v-card v-for="(l,index) in categ.fields" :key="l['@type']+'field'+index"> - <v-layout v-if="l"> + <template v-else-if="p==='dcterms:subject'" slot="dcterms:subject"> + + <template v-for="(subject, j) in o"> + <v-card + class="mt-3" + v-if="subject['@type']==='phaidra:Subject'" + :key="componentid+'psubject'+j" + > + <v-toolbar dense flat> + <v-layout> + <v-toolbar-title class="font-weight-light">Subject</v-toolbar-title> + </v-layout> + </v-toolbar> + <v-card-text class="ma-2"> + <p-d-jsonld :jsonld="subject"></p-d-jsonld> + </v-card-text> + </v-card> + + <template v-if="subject['@type']==='skos:Concept'"> + <p-d-skos-preflabel :p="p" :o="subject" :key="componentid+'subject'+j"></p-d-skos-preflabel> + </template> + </template> + <template v-if="viewpharmameta"> - <!-- <v-flex xs1 class="subheading"> - <a :href="l.id" target="_blank">{{l.label}}</a> - </v-flex>--> - <v-flex xs11> - <!--<v-card v-for="(inputf,index) in l" :key="index+'subjectField'">--> - - <!-- <v-flex xs2 v-if="inputf.selection">{{getLabel(inputf.data['@type'])}}</v-flex>--> - <p-d-skos-preflabel - v-if="getSkosexactMatch(l)==undefined" + <template v-for="(categ,index) in pharmaStructure()"> + <v-card v-if="categ.fields.length>0" :key="index+categ.category"> + <v-toolbar dense flat> + <v-layout> + <v-toolbar-title class="font-weight-light">{{categ.label}}</v-toolbar-title> + </v-layout> + </v-toolbar> + + <template v-if="categ.fields.length>0"> + <v-card v-for="(l,index) in categ.fields" :key="l['@type']+'field'+index"> + <v-layout v-if="l"> + + <v-flex xs11> + <p-d-skos-preflabel + v-if="getSkosexactMatch(l)==undefined" + :o="l" + :key="l+index+'pharmafreesubject'" + ></p-d-skos-preflabel> + + <ph-d-metadata + v-if="getSkosexactMatch(l)" :o="l" - :key="l+index+'pharmafreesubject'" - ></p-d-skos-preflabel> - - <ph-d-metadata - v-if="getSkosexactMatch(l)" - :o="l" - :p="p" - :key="l+index+'pharmasubject'" - ></ph-d-metadata> - <v-divider></v-divider> - </v-flex> - - </v-layout> + :p="p" + :key="l+index+'pharmasubject'" + ></ph-d-metadata> + <v-divider></v-divider> + </v-flex> + </v-layout> + </v-card> + </template> + </v-card> + <v-card v-if="categ.subcategory" :key="index+categ.label"> + <v-toolbar dense flat> + <v-layout> + <v-toolbar-title class="font-weight-light">{{categ.label}}</v-toolbar-title> + </v-layout> + </v-toolbar> + + <template v-if="categ.subcategory.length>0"> + <v-card v-for="l in categ.subcategory" :key="l.category+'field'"> + <v-layout v-if="l"> + <v-flex xs1 class="subheading"> + <div class="text-xs-center"> + <a :href="l.id" target="_blank">{{l.category}}</a> + </div> + </v-flex> + + <v-flex xs11> + <v-card v-for="(inputf,index) in l.fields" :key="index+'subjectField'"> + + <p-d-skos-preflabel + v-if="getSkosexactMatch(inputf)==undefined" + :p="getLabel(inputf['@type'])" + :o="inputf" + :key="inputf+index+'pharmafreesubject'" + ></p-d-skos-preflabel> + + <ph-d-metadata + v-if="getSkosexactMatch(inputf)" + :o="inputf" + :p="p" + :key="index+'pharmasubject'" + ></ph-d-metadata> + <v-divider></v-divider> + </v-card> + </v-flex> + + </v-layout> + </v-card> + </template> </v-card> </template> - - </v-card> - <v-card v-if="categ.subcategory" :key="index+categ.label"> - - <v-toolbar dense flat> - <v-layout> - <v-toolbar-title class="font-weight-light">{{categ.label}}</v-toolbar-title> - </v-layout> - </v-toolbar> - - <template v-if="categ.subcategory.length>0"> - - <v-card v-for="l in categ.subcategory" :key="l.category+'field'"> - <v-layout v-if="l"> - - - <v-flex xs1 class="subheading"> - <a :href="l.id" target="_blank">{{l.category}}</a> - </v-flex> - <v-flex xs11> - <v-card v-for="(inputf,index) in l.fields" :key="index+'subjectField'"> - <!-- <v-flex xs2 v-if="inputf.selection">{{getLabel(inputf.data['@type'])}}</v-flex>--> - <p-d-skos-preflabel - v-if="getSkosexactMatch(inputf)==undefined" - :p="getLabel(inputf['@type'])" - :o="inputf" - :key="inputf+index+'pharmafreesubject'" - ></p-d-skos-preflabel> - - <ph-d-metadata - v-if="getSkosexactMatch(inputf)" - :o="inputf" - :p="p" - :key="inputf+index+'pharmasubject'" - ></ph-d-metadata> - <v-divider></v-divider> - </v-card> - - </v-flex> - - </v-layout> + </template> + <template v-if="!viewpharmameta"> + <template v-for="(subject, j) in o"> + <p-d-skos-preflabel :p="p" :o="subject" :key="componentid+'subject'+j"></p-d-skos-preflabel> + </template> + <v-btn @click="pharmaStructure()">View/reload full metadata</v-btn> + <template v-for="(categ,index) in pharma"> + <v-card v-if="categ.fields.length>0" :key="index+categ.category"> + <v-toolbar dense flat> + <v-layout> + <v-toolbar-title class="font-weight-light">{{categ.label}}</v-toolbar-title> + </v-layout> + </v-toolbar> + <template v-if="categ.fields.length>0"> + + <v-card v-for="l in categ.fields" :key="l.category+'field'"> + <v-layout v-if="l"> + + <v-flex xs11> + <v-card v-for="(inputf,index) in l.fields" :key="index+'subjectField'"> + + <p-d-skos-preflabel + v-if="getSkosexactMatch(inputf)==undefined" + :p="getLabel(inputf['@type'])" + :o="inputf" + :key="inputf+index+'pharmafreesubject'" + ></p-d-skos-preflabel> + + <ph-d-metadata + v-if="getSkosexactMatch(inputf)" + :o="inputf" + :p="p" + :key="index+'pharmasubject'" + ></ph-d-metadata> + <v-divider></v-divider> + </v-card> + </v-flex> + + </v-layout> + </v-card> + </template> + </v-card> + <v-card v-if="categ.subcategory" :key="index+categ.label"> + <v-toolbar dense flat> + <v-layout> + <v-toolbar-title class="font-weight-light">{{categ.label}}</v-toolbar-title> + </v-layout> + </v-toolbar> + + <template v-if="categ.subcategory.length>0"> + <v-card v-for="l in categ.subcategory" :key="l.category+'field'"> + <v-layout v-if="l"> + <v-flex xs1 class="subheading"> + <div class="text-xs-center"> + <a :href="l.id" target="_blank">{{l.category}}</a> + </div> + </v-flex> + + <v-flex xs11> + <v-card v-for="(inputf,index) in l.fields" :key="index+'subjectField'"> + + <p-d-skos-preflabel + v-if="getSkosexactMatch(inputf)==undefined" + :p="getLabel(inputf['@type'])" + :o="inputf" + :key="inputf+index+'pharmafreesubject'" + ></p-d-skos-preflabel> + + <ph-d-metadata + v-if="getSkosexactMatch(inputf)" + :o="inputf" + :p="p" + :key="index+'pharmasubject'" + ></ph-d-metadata> + <v-divider></v-divider> + </v-card> + </v-flex> + + </v-layout> + </v-card> + + + </template> </v-card> </template> - - </v-card> + </template> + </template> - - </template> - <template v-else-if="p==='@type'"></template> + <template v-else-if="p==='@type'"></template> - <template v-else slot="unknown-predicate"> - <v-container :key="p"> - <v-alert :type="'error'" :value="true" transition="fade-transition"> - Unknown predicate - <b>{{p}}</b> - </v-alert> - <p-i-unknown-readonly :jsonld="o" :label="p"></p-i-unknown-readonly> - </v-container> + <template v-else slot="unknown-predicate"> + <v-container :key="p"> + <v-alert :type="'error'" :value="true" transition="fade-transition"> + Unknown predicate + <b>{{p}}</b> + </v-alert> + <p-i-unknown-readonly :jsonld="o" :label="p"></p-i-unknown-readonly> + </v-container> + </template> </template> </template> - </template> - - </ph-d-jsonld-layout> - </template> <script> @@ -445,6 +532,7 @@ import { parseoutput } from "../../../mixins/parseoutput"; import { matchsubject } from "../../../mixins/matchsubject"; import fields from "../../../utils/fields"; import PImg from "../../utils/PImg"; +import arrays from "@/utils/arrays"; export default { name: "ph-d-jsonld", @@ -460,6 +548,91 @@ export default { componentid: function() { return Math.floor(Math.random() * 10000000); }, + pharmaData: function() { + var s = this.jsonldd["dcterms:subject"]; + //filter subjects for only the ones with subjects[i]["@type"]=!= "skos:Concept" + //that would be the pharma-related subjects + var subjects = s.filter(s => s["@type"] != "skos:Concept"); + + var n_subjects = []; + + // take all the jsonld["dcterms:subject"] but not the ones which have no skos:prefLabel" + for (let i = 0; i < subjects.length; i++) { + var subcat = subjects[i]["@type"]; // thuis should be unique to each entry field, comes from "subjectType" in jsonld + + var categ = this.getCategory(subcat); + + n_subjects[i] = {}; + if (categ) { + n_subjects[i].category = categ; + n_subjects[i].selection = this.getDescription(subcat); + n_subjects[i].subcategory = subcat; + } else { + n_subjects[i].category = subcat; + } + //now check for the subcategories of:Biological macromolecules and Bioassay, + + n_subjects[i].data = subjects[i]; + } + //console.log("pharmaData", n_subjects); + //console.log("pharmaSubjects", this.pharmaSubjects); + return n_subjects; + } + }, + + mounted: function() { + this.$store.dispatch("loadLanguages"); + }, + props: { + jsonld: { + type: Object, + default: null + }, + pid: String, + + form: { + type: Object, + default: null + }, + viewpharmameta: { + type: Boolean, + default: false + } + }, + components: { + PDTitle, + PDEntity, + PhDJsonldLayout, + PDSkosPreflabel, + PDKeyword, + PDLangValue, + PDLicense, + PDValue, + PDDimension, + PDDuration, + PDGeoreference, + PDLabeledValue, + PDFunder, + PDProject, + PDBfPublication, + PDStudyPlan, + PDSeries, + PDAdaptation, + PDCitation, + PIUnknownReadonly, + PhDMetadata, + PImg + }, + data() { + return { + jsonldd: this.jsonld, + pharma: [] + }; + }, + methods: { + alert: function(e) { + console.log("alert", e); + }, pharmaStructure: function() { var subjectjson = this.jsonld["dcterms:subject"]; //filter subjects for only the ones with subjects[i]["@type"]=!= "skos:Concept" @@ -483,6 +656,12 @@ export default { var formFieldsFiltered = formFields.filter( formFields => formFields.type != "skos:Concept" ); + formFieldsFiltered = formFields.filter( + formFields => formFields.value != "" + ); + formFieldsFiltered = formFields.filter( + formFields => formFields.value != null + ); for (var j = 0; j < formFieldsFiltered.length; j++) { //filter all the elem in subjects which have this type @@ -491,9 +670,6 @@ export default { }); if (jsonTypeArray.length > 0) { - //for (var k = 0; k < jsonTypeArray.length; k++) { - // console.log("jsonTypeArray", jsonTypeArray[k]); - //} //find first whether there is a subcategory if (formFieldsFiltered[j].subcategory) { //the category is formFieldsFiltered[j].category @@ -527,16 +703,76 @@ export default { } else { jsonStructured[result].subcategory = [ { - category: formFieldsFiltered[j].subcategory[0], + category: n_subcat, id: formFieldsFiltered[j].infoRef, fields: jsonTypeArray } ]; } + } else { + //a quick fix but it's not pretty!!! + //check if those are any of the bioassay categories - the way i structured this code is not adapted yet to those subfields + if ( + n_categ === "assayOrganism" || + n_categ === "assayTarget" || + n_categ === "assayDetection" + ) { + var findAssay = jsonStructured.findIndex( + obj => obj.category === "assay" + ); + if (jsonStructured[findAssay].subcategory) { + var r = jsonStructured[findAssay].subcategory.findIndex( + obj => obj.category === n_subcat + ); + + if (r >= 0) { + for (var n = 0; n < jsonTypeArray.length; n++) { + jsonStructured[findAssay].subcategory[r].fields.push( + jsonTypeArray[n] + ); + } + } else { + jsonStructured[findAssay].subcategory.push({ + category: n_subcat, + id: formFieldsFiltered[j].infoRef, + fields: jsonTypeArray + }); + } + } else { + if (n_categ === "assayOrganism") { + jsonStructured[findAssay].subcategory = [ + { + category: "Assay organism", + id: formFieldsFiltered[j].infoRef, + fields: jsonTypeArray + } + ]; + } + if (n_categ === "assayTarget") { + jsonStructured[findAssay].subcategory = [ + { + category: "Assay Target", + id: formFieldsFiltered[j].infoRef, + fields: jsonTypeArray + } + ]; + } + if (n_categ === "assayDetection") { + jsonStructured[findAssay].subcategory = [ + { + category: "Detection", + id: formFieldsFiltered[j].infoRef, + fields: jsonTypeArray + } + ]; + } + } + } } } else { //the category is formFieldsFiltered[j].category // if it exists, push to it, otherwise create it + var n_categ = formFieldsFiltered[j].category[0]; //check if it exists already @@ -545,122 +781,29 @@ export default { ); if (result >= 0) { - /* if (jsonStructured[result].subcategory) { - var r = jsonStructured[result].subcategory.findIndex( - obj => obj.category === n_subcat - ); - console.log( - "n_sub r", - r, - "formFieldsFiltered[j].infoRef", - formFieldsFiltered[j].infoRef - ); - if (r >= 0) { - jsonStructured[result].subcategory[r].fields.push( - jsonTypeArray[0] - ); - } else { - jsonStructured[result].subcategory.push({ - category: n_subcat, - id: formFieldsFiltered[j].infoRef, - fields: jsonTypeArray - }); + jsonStructured[result].fields.push({ + category: formFieldsFiltered[j].label, + id: formFieldsFiltered[j].infoRef, + fields: jsonTypeArray + }); + } else { + jsonStructured[result].fields = [ + { + category: "my cat", + id: formFieldsFiltered[j].infoRef, + fields: jsonTypeArray } - } else {*/ - jsonStructured[result].fields = jsonTypeArray; - // category: n_categ, - // id: formFieldsFiltered[j].infoRef, - // fields: jsonTypeArray - //}; + ]; } } } } } + this.pharma = jsonStructured; return jsonStructured; }, - pharmaData: function() { - var s = this.jsonld["dcterms:subject"]; - //filter subjects for only the ones with subjects[i]["@type"]=!= "skos:Concept" - //that would be the pharma-related subjects - var subjects = s.filter(s => s["@type"] != "skos:Concept"); - - var n_subjects = []; - - // take all the jsonld["dcterms:subject"] but not the ones which have no skos:prefLabel" - for (let i = 0; i < subjects.length; i++) { - console.log("subject", subjects[i]); - var subcat = subjects[i]["@type"]; // thuis should be unique to each entry field, comes from "subjectType" in jsonld - - var categ = this.getCategory(subcat); - - n_subjects[i] = {}; - if (categ) { - n_subjects[i].category = categ; - n_subjects[i].selection = this.getDescription(subcat); - n_subjects[i].subcategory = subcat; - } else { - n_subjects[i].category = subcat; - } - //now check for the subcategories of:Biological macromolecules and Bioassay, - - n_subjects[i].data = subjects[i]; - } - console.log("pharmaData", n_subjects); - console.log("pharmaSubjects", this.pharmaSubjects); - return n_subjects; - } - }, - - mounted: function() { - this.$store.dispatch("loadLanguages"); - }, - props: { - jsonld: { - type: Object, - default: null - }, - pid: String, - - form: { - type: Object, - default: null - } - }, - components: { - PDTitle, - PDEntity, - PhDJsonldLayout, - PDSkosPreflabel, - PDKeyword, - PDLangValue, - PDLicense, - PDValue, - PDDimension, - PDDuration, - PDGeoreference, - PDLabeledValue, - PDFunder, - PDProject, - PDBfPublication, - PDStudyPlan, - PDSeries, - PDAdaptation, - PDCitation, - PIUnknownReadonly, - PhDMetadata, - PImg - }, - data() { - return {}; - }, - methods: { - alert: function(e) { - console.log("alert", e); - }, - getCatElem: function(cat) { var elem = this.pharmaData.filter( pharmaData => pharmaData.category === cat diff --git a/src/components/display/pharma_display/PhDMetadata.vue b/src/components/display/pharma_display/PhDMetadata.vue index a7bac9ee6ac8196cad4e102d24178e6c595cc286..6dbc8aeccce5756a623f443685071437abf23d43 100644 --- a/src/components/display/pharma_display/PhDMetadata.vue +++ b/src/components/display/pharma_display/PhDMetadata.vue @@ -3,30 +3,30 @@ <v-layout column> <v-flex> <template v-for="(l, i) in data"> - <v-layout :key="'lay'+i"> + <v-layout :key="'layj' + i" row wrap> <v-flex - v-if="i=='skos:prefLabel'" md4 xs12 + v-if="i == 'skos:prefLabel'" class="pdlabel primary--text" - :key="'l'+i" + :key="'l' + i" >Label</v-flex> <v-flex md8 xs12 - v-if="i=='skos:prefLabel'" + v-if="i == 'skos:prefLabel'" class="valuefield" - >{{ getSkosprefLabel(data) }}</v-flex> + >{{getSkosprefLabel(data)}}</v-flex> <v-flex - v-if="i=='skos:exactMatch'" md4 xs12 + v-if="i == 'skos:exactMatch'" class="pdlabel primary--text" - :key="'l'+i" + :key="'l' + i" >Persistent identifier</v-flex> - <v-flex md8 xs12 v-if="i=='skos:exactMatch'"> + <v-flex md8 xs12 v-if="i == 'skos:exactMatch'"> <a class="valuefield" :href="getSkosexactMatch(data)" @@ -35,98 +35,98 @@ </v-flex> <!--<v-flex md8 xs12 v-if="o['skos:exactMatch']" :key="'t-id'+i"><a class="valuefield" :href="o['skos:exactMatch'][0]" target="_blank">{{ l['@value'] }}</a></v-flex>--> <v-flex - v-if="i=='cellLineName'" md4 xs12 + v-if="i == 'cellLineName'" class="pdlabel primary--text" - :key="'l'+i" + :key="'l' + i" >Cell Line Name</v-flex> - <v-flex md8 xs12 v-if="i=='cellLineName'" class="valuefield">{{ getCelllinename(data) }}</v-flex> + <v-flex md8 xs12 v-if="i == 'cellLineName'" class="valuefield">{{getCelllinename(data)}}</v-flex> <v-flex - v-if="i=='accessionNumber'" md4 xs12 + v-if="i == 'accessionNumber'" class="pdlabel primary--text" - :key="'l'+i" + :key="'l' + i" >Cellosaurus Accession Number</v-flex> <v-flex md8 xs12 - v-if="i=='accessionNumber'" + v-if="i == 'accessionNumber'" class="valuefield" - >{{ getAccessionnumber(data) }}</v-flex> + >{{getAccessionnumber(data)}}</v-flex> <v-flex - v-if="i=='uniprotName'" md4 xs12 + v-if="i == 'uniprotName'" class="pdlabel primary--text" - :key="'l'+i" + :key="'l' + i" >Uniprot Name</v-flex> - <v-flex md8 xs12 v-if="i=='uniprotName'" class="valuefield">{{ getUniprotName(data) }}</v-flex> + <v-flex md8 xs12 v-if="i == 'uniprotName'" class="valuefield">{{getUniprotName(data)}}</v-flex> <v-flex - v-if="i=='proteinRecommendedName'" md4 xs12 + v-if="i == 'proteinRecommendedName'" class="pdlabel primary--text" - :key="'l'+i" + :key="'l' + i" >Protein Recommended Name</v-flex> <v-flex md8 xs12 - v-if="i=='proteinRecommendedName'" + v-if="i == 'proteinRecommendedName'" class="valuefield" - >{{ getProteinRecommendedName(data) }}</v-flex> + >{{getProteinRecommendedName(data)}}</v-flex> <v-flex - v-if="i=='uniprotAccession'" md4 xs12 + v-if="i == 'uniprotAccession'" class="pdlabel primary--text" - :key="'l'+i" + :key="'l' + i" >Uniprot Accession Number</v-flex> <v-flex md8 xs12 - v-if="i=='uniprotAccession'" + v-if="i == 'uniprotAccession'" class="valuefield" - >{{ getUniprotAccession(data) }}</v-flex> + >{{getUniprotAccession(data)}}</v-flex> <v-flex - v-if="i=='organismName'" md4 xs12 + v-if="i == 'organismName'" class="pdlabel primary--text" - :key="'l'+i" + :key="'l' + i" >Organism name</v-flex> - <v-flex md8 xs12 v-if="i=='organismName'" class="valuefield">{{ getOrganismName(data) }}</v-flex> + <v-flex md8 xs12 v-if="i == 'organismName'" class="valuefield">{{getOrganismName(data)}}</v-flex> <v-flex - v-if="i=='proteinAlternativeName'" md4 xs12 + v-if="i == 'proteinAlternativeName'" class="pdlabel primary--text" - :key="'l'+i" + :key="'l' + i" >Organism name</v-flex> <v-flex md8 xs12 - v-if="i=='proteinAlternativeName'" + v-if="i == 'proteinAlternativeName'" class="valuefield" - >{{ getProteinAlternativeName(data) }}</v-flex> + >{{getProteinAlternativeName(data)}}</v-flex> <v-flex - v-if="i=='skos:altLabel'" md4 xs12 + v-if="i == 'skos:altLabel'" class="pdlabel primary--text" - :key="'l'+i" + :key="'l' + i" >Alternative Labels</v-flex> - <v-flex md8 xs12 v-if="i=='skos:altLabel'" class="valuefield">{{ getSynonyms(data) }}</v-flex> + <v-flex md8 xs12 v-if="i == 'skos:altLabel'" class="valuefield">{{getSynonyms(data)}}</v-flex> </v-layout> </template> </v-flex> @@ -156,11 +156,10 @@ export default { }, computed: { getIri() { + // console.log("o", this.getSkosexactMatch(this.o)); return this.getSkosexactMatch(this.o); }, - getData() { - return this.o; - }, + displaylang: function() { let lang; let somelang; @@ -179,9 +178,14 @@ export default { }; }, methods: { + alert: function(f) { + console.log("alert", f); + }, + getMetadata: function() { var self = this; var iri = this.getIri; + //var iri = self.getSkosexactMatch(this.o); //before I was getting it all in an array in the parent component @@ -196,12 +200,12 @@ export default { }; var query = qs.stringify(params); - /* console.log( - "fetch data", - self.$store.state.settings.global.suggesters.ExtServiceSuggest + - "getdata?" + - query - );*/ + //console.log( + // "fetch data", + // self.$store.state.settings.global.suggesters.ExtServiceSuggest + + // "getdata?" + + // query + //); fetch( self.$store.state.settings.global.suggesters.ExtServiceSuggest + @@ -220,11 +224,13 @@ export default { //if body is empty, then just use whatever was there already in the data getData if (body.result == "empty") { - self.data = self.getData; + self.data = self.o; } }) .catch(function(error) { + self.data = self.o; + console.error(error); }); } diff --git a/src/components/input/PhSubmit.vue b/src/components/input/PhSubmit.vue index ca3a8406fb4607ee18739eb7500280c1d82c99b7..8cfce64843eb0c90fa135a7447771795c18bba31 100644 --- a/src/components/input/PhSubmit.vue +++ b/src/components/input/PhSubmit.vue @@ -2,22 +2,22 @@ <!--<v-container grid-list-lg fluid class="pa-0 ma-0" v-if="form && form.sections">--> <v-container> <v-tabs v-model="activetab"> - <v-tab ripple> + <v-tab ripple grow> Metadata editor <template v-if="targetpid"> - <span class="text-lowercase">{{ targetpid }}</span> </template> </v-tab> - <!-- <v-tab ripple @click="updatePrettyPrint()">Metadata preview</v-tab> - <v-tab v-if="templating" ripple @click="loadTemplates()">Templates</v-tab>--> + <v-tab ripple @click="updatePrettyPrint()">Metadata preview</v-tab> + <!-- <v-tab v-if="templating" ripple @click="loadTemplates()">Templates</v-tab>--> </v-tabs> <v-tabs-items v-model="activetab"> <v-tab-item v-if="form"> <ph-input-form - :model="model" + :model="model" :form="form" :loading="loading" :templating="templating" @@ -25,6 +25,9 @@ :targetpid="targetpid" v-on:submit="checkWarnings()" ></ph-input-form> + <v-footer> + Fields indicated with (*) are required field for submission. + </v-footer> </v-tab-item> <!--second tab--> <v-tab-item class="ma-4"> diff --git a/src/components/input/pharma-input-fields/PISelect.vue b/src/components/input/pharma-input-fields/PISelect.vue index 728dd6b19c368c74a1fa7c56dab88464a7b3fc81..ec23a86d66902c895df2ad2336a04b05f64cb174 100644 --- a/src/components/input/pharma-input-fields/PISelect.vue +++ b/src/components/input/pharma-input-fields/PISelect.vue @@ -95,11 +95,9 @@ export default { if (this.$refs.form.validate()) { this.validationWarning = false; } else { - console.log("here"); this.validationWarning = true; } } else { - console.log("here 2", this.formValidation); this.validationWarning = false; } /*console.log( diff --git a/src/components/input/pharma-input-fields/PhEntity.vue b/src/components/input/pharma-input-fields/PhEntity.vue index 1801ad406c80eb51da88279d5a76205315a033e4..de50dbec93977a6e1e2fd9570425a8026c2804e2 100644 --- a/src/components/input/pharma-input-fields/PhEntity.vue +++ b/src/components/input/pharma-input-fields/PhEntity.vue @@ -89,7 +89,7 @@ <v-text-field outline :value="orcid" - label="ORCID" + label="ORCID (format xxxx-xxxx-xxxx-xxxx)." :rules="[validationrules.orcid]" v-on:input="$emit('input-orcid', $event);validate();$emit('entity-validation', validationWarning)" background-color="blue-grey lighten-5"> diff --git a/src/components/input/pharma-input-fields/PhInputForm.vue b/src/components/input/pharma-input-fields/PhInputForm.vue index c69f3d3fbe47854c59adba2c5b7439bb0808cd08..33477fcec067c71405b39e99911d35c3e8c7584a 100644 --- a/src/components/input/pharma-input-fields/PhInputForm.vue +++ b/src/components/input/pharma-input-fields/PhInputForm.vue @@ -27,10 +27,9 @@ </div> </v-flex> </v-layout> - + <v-flex v-if="n== 'general'"> <v-layout v-for="(f) in s[index].fields" :key="f.id" row wrap fill-height> - <v-flex xs12 v-if="f.component === 'text-field'"> <v-card-title v-if="f.header !== ''" class="title grey lighten-2 white--text"> <span>{{f.header}}</span> @@ -72,7 +71,7 @@ v-on:input-role="f.role=$event" v-on:input-orcid="f.orcid=$event" v-on:input-email="f.email=$event" - v-on:add="addField(s[index].fields, f);alert(f)" + v-on:add="addField(s[index].fields, f);" v-on:remove="removeField(s[index].fields, f)" v-on:up="sortFieldUp(s[index].fields, f)" v-on:down="sortFieldDown(s[index].fields, f)" @@ -108,9 +107,7 @@ <v-flex v-else-if="n== 'file'"> <v-card-text> <v-layout v-for="(f) in s[index].fields" :key="f.id" row wrap> - <v-flex v-if="f.component == 'files'"> - <ph-files v-bind.sync="f" v-on:input-numberFiles="f.nfile=$event;filesNber=f.nfile" @@ -123,7 +120,6 @@ v-on:input-warning="f.licenseWarning=$event" v-on:validation="f.warning=$event" ></ph-files> - </v-flex> </v-layout> </v-card-text> @@ -133,10 +129,9 @@ <v-layout align-center justify-center fill-height> <v-flex> <v-toolbar dense flat color="white"> - <v-toolbar-title class="title"> - Fill-in the metadata for the research collection: {{$store.state.metadataInputs.containerTitle}} - - </v-toolbar-title> + <v-toolbar-title + class="title" + >Fill-in the metadata for the research collection: {{$store.state.metadataInputs.containerTitle}}</v-toolbar-title> <v-spacer></v-spacer> </v-toolbar> </v-flex> @@ -164,7 +159,6 @@ <v-card-title class="title">{{c.description}}</v-card-title> <v-layout v-for="(f,index) in c.fields" :key="index"> - <v-flex v-if="f.component=='ext-service'&&f.visible==true"> <ph-ext-service v-bind.sync="f" @@ -184,7 +178,6 @@ </v-flex> <v-flex v-if=" f.component == 'selection'&&f.visible==true"> - <ph-selection v-bind.sync="f" :required="false" @@ -197,7 +190,7 @@ :freeText="{'@type': [f.type],'skos:prefLabel': [{'@value':''}]}" ></ph-selection> </v-flex> - + <v-layout row wrap @@ -247,75 +240,38 @@ </v-layout> </v-flex> <v-flex v-else-if="n== 'submit'"> - <v-layout align-center justify-center fill-height> + <v-layout align-center justify-center fill-height> <v-flex> <v-toolbar dense flat color="white"> - <v-toolbar-title class="title"> - Submit the following metadata: - - </v-toolbar-title> + <v-toolbar-title class="title">Submit the following metadata:</v-toolbar-title> <v-spacer></v-spacer> </v-toolbar> </v-flex> </v-layout> - <ph-d-jsonld :form="form" :jsonld="jsonDisplay"></ph-d-jsonld> - <v-layout align-center justify-center fill-height> + <ph-d-jsonld :form="initialForm" :viewpharmameta="false" :jsonld="jsonDisplay"></ph-d-jsonld> + <v-layout align-center justify-center fill-height> <v-flex> <v-toolbar dense flat color="white"> - <v-toolbar-title class="title"> - With the following files: - - </v-toolbar-title> + <v-toolbar-title class="title">With the following files:</v-toolbar-title> <v-spacer></v-spacer> </v-toolbar> </v-flex> </v-layout> - <v-layout row wrap v-for="(mjson,index) in jsonDisplayMembers" :key="index+'files'"> - - <v-flex xs12> - - - <v-icon>attachment</v-icon> - File {{index+1}} - </v-flex> - <v-flex xs12> <v-card> - <ph-d-jsonld :form="form" :jsonld="mjson"></ph-d-jsonld><v-spacer></v-spacer></v-card></v-flex></v-layout> - <v-layout align-center justify-end row class="ma-3"> - <!--<v-dialog v-if="templating" v-model="templatedialog" width="500"> - <v-btn - class="mr-3" - slot="activator" - dark - raised - :loading="loading" - :disabled="loading" - color="grey" - >Save as template</v-btn> + <v-layout row wrap v-for="(mjson,index) in jsonDisplayMembers" :key="index+'files'"> + <v-flex xs12> + <v-icon>attachment</v-icon> + File {{index+1}} + </v-flex> + <v-flex xs12> <v-card> - <v-card-title class="headline grey lighten-2" primary-title> - <span v-t="'Save as template'"></span> - </v-card-title> - <v-card-text> - <v-text-field v-model="templatename" :label="$t('Template name')"></v-text-field> - </v-card-text> - <v-card-actions> - <v-spacer></v-spacer> - <v-btn - :loading="loading" - :disabled="loading" - color="grey" - dark - @click="templatedialog= false" - > - <span v-t="'Cancel'"></span> - </v-btn> - <v-btn :loading="loading" :disabled="loading" color="primary"> - <span v-t="'Save'"></span> - </v-btn> - </v-card-actions> + + <ph-d-jsonld :form="initialForm" :jsonld="mjson"></ph-d-jsonld> + <v-spacer></v-spacer> </v-card> - </v-dialog>--> + </v-flex> + </v-layout> + <v-layout align-center justify-end row class="ma-3"> <v-btn v-if="targetpid" raised @@ -490,6 +446,9 @@ export default { return jsonmembersarray; } } + }, + initialForm: function() { + return this.$store.state.initialForm.initialForm; } }, data() { @@ -636,6 +595,10 @@ export default { var sub = []; if (el.subcategory) { + for (var catt in arr) { + if (arr[catt].category[0] === el.subcategory[0]) { + } + } sub = arr.filter(function(a) { if (a.category) { return a.category[0] === el.subcategory[0]; @@ -676,6 +639,7 @@ export default { } } } else { + //WHAT"S UP HERE??? } } // } else { @@ -707,7 +671,7 @@ export default { this.$emit("form-input-" + f.component, f); }, warning: function(section) { - console.log("in warning", section); + //console.log("in warning", section); if (typeof section === "undefined") { //console.log("undefined"); } else { @@ -731,7 +695,7 @@ export default { for (var f in fields) { if (fields[f].warning === true) { w = true; - console.log("field", fields[f].label, "is missing"); + //console.log("field", fields[f].label, "is missing"); } } } diff --git a/src/store/index.js b/src/store/index.js index bc03796114ebd1440ac5ddbb3e13523198254982..ce99f7b355e523ec56f90df66b86b4be899d302d 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -2,6 +2,7 @@ import Vue from "vue"; import Vuex from "vuex"; import vocabulary from "./modules/vocabulary"; import metadataInputs from "./modules/metadataInputs"; +import initialForm from "./modules/initialForm"; Vue.use(Vuex); @@ -83,10 +84,10 @@ export default new Vuex.Store({ "Basic " + btoa(credentials.username + ":" + credentials.password) } }) - .then(function(response) { + .then(function (response) { return response.json(); }) - .then(function(json) { + .then(function (json) { if (json.alerts && json.alerts.length > 0) { commit("setAlerts", json.alerts); } @@ -97,9 +98,9 @@ export default new Vuex.Store({ // if sign in was successful, get user's data (name, email, etc) fetch( rootState.settings.instance.api + - "/directory/user/" + - state.user.username + - "/data", + "/directory/user/" + + state.user.username + + "/data", { method: "GET", mode: "cors", @@ -108,10 +109,10 @@ export default new Vuex.Store({ } } ) - .then(function(response) { + .then(function (response) { return response.json(); }) - .then(function(json) { + .then(function (json) { if (json.alerts && json.alerts.length > 0) { commit("setAlerts", json.alerts); } @@ -124,14 +125,14 @@ export default new Vuex.Store({ resolve(); } }) - .catch(function(error) { + .catch(function (error) { console.log(error); reject(); }); } }) - .catch(function(error) { + .catch(function (error) { console.log(error); // eslint-disable-line no-console reject(); }); @@ -146,17 +147,17 @@ export default new Vuex.Store({ "X-XSRF-TOKEN": state.token } }) - .then(function(response) { + .then(function (response) { return response.json(); }) - .then(function(json) { + .then(function (json) { commit("initStore"); if (json.alerts && json.alerts.length > 0) { commit("setAlerts", json.alerts); } resolve(); }) - .catch(function(error) { + .catch(function (error) { console.log(error); // eslint-disable-line no-console commit("initStore"); resolve(); @@ -166,7 +167,8 @@ export default new Vuex.Store({ }, modules: { vocabulary, - metadataInputs + metadataInputs, + initialForm }, strict: debug }); diff --git a/src/store/modules/initialForm.js b/src/store/modules/initialForm.js new file mode 100644 index 0000000000000000000000000000000000000000..894166f1bd0c7789538421f42905cba960a82a11 --- /dev/null +++ b/src/store/modules/initialForm.js @@ -0,0 +1,15 @@ +const state = { + initialForm: [], +}; + +const mutations = { + initForm(state, initialForm) { + state.initialForm = initialForm; + }, + +}; + +export default { + state, + mutations +}; diff --git a/src/store/modules/vocabulary.js b/src/store/modules/vocabulary.js index 34a6246505a9f771baf04d539b8c4edda5e6a2e0..1bfa3652a560c8385818a5892c515120387fdc40 100644 --- a/src/store/modules/vocabulary.js +++ b/src/store/modules/vocabulary.js @@ -770,2018 +770,222 @@ const state = { rolepredicate: { terms: [ { - "@id": "role:abr", - "skos:prefLabel": { - eng: "Abridger", - deu: "Abridger", - ita: "Abridger" - } - }, - { - "@id": "role:act", - "skos:prefLabel": { - eng: "Actor", - deu: "SchauspielerIn", - ita: "Attore" - } - }, - { - "@id": "role:adp", - "skos:prefLabel": { - eng: "Adapter", - deu: "BearbeiterIn", - ita: "Adattatore" - } - }, - { - "@id": "role:rcp", - "skos:prefLabel": { - eng: "Addressee", - deu: "AdressatIn", - ita: "Destinatario" - } - }, - { - "@id": "role:advisor", - "skos:prefLabel": { - eng: "Adviser", - deu: "BetreuerIn", - ita: "Consigliere" - } - }, - { - "@id": "role:anl", - "skos:prefLabel": { - eng: "Analyst", - deu: "DateninterpretIn", - ita: "Analista" - } - }, - { - "@id": "role:anm", - "skos:prefLabel": { - eng: "Animator", - deu: "AnimatorIn", - ita: "Animator" - } - }, - { - "@id": "role:ann", - "skos:prefLabel": { - eng: "Annotator", - deu: "AutorIn von Anmerkungen", - ita: "Annotatore" - } - }, - { - "@id": "role:apl", - "skos:prefLabel": { - eng: "Appelant", - deu: "KlägerIn", - ita: "Appelant" - } - }, - { - "@id": "role:ape", - "skos:prefLabel": { - eng: "Appellee", - deu: "Beklagte", - ita: "Appellee" - } - }, - { - "@id": "role:app", - "skos:prefLabel": { - eng: "Applicant", - deu: "AntragstellerIn", - ita: "Applicant" - } - }, - { - "@id": "role:arc", - "skos:prefLabel": { - eng: "Architect", - deu: "ArchitektIn", - ita: "Architetto" - } - }, - { - "@id": "role:arr", - "skos:prefLabel": { - eng: "Arranger", - deu: "ArrangeurIn", - ita: "Arrangiatore" - } - }, - { - "@id": "role:acp", - "skos:prefLabel": { - eng: "Art copyist", - deu: "KunstkopistIn", - ita: "Art copyist" - } - }, - { - "@id": "role:adi", - "skos:prefLabel": { - eng: "Art director", - deu: "SzenenbildnerIn", - ita: "Art director" - } - }, - { - "@id": "role:art", - "skos:prefLabel": { eng: "Artist", deu: "KünstlerIn", ita: "Artista" } - }, - { - "@id": "role:ard", - "skos:prefLabel": { - eng: "Artistic director", - deu: "künstlerische/r LeiterIn", - ita: "Direttore artistico" - } - }, - { - "@id": "role:assessor", - "skos:prefLabel": { - eng: "Assessor", - deu: "BeurteilerIn", - ita: "Assessor" - } - }, - { - "@id": "role:asg", - "skos:prefLabel": { - eng: "Assignee", - deu: "RechtsnachfolgerIn", - ita: "Assignee" - } - }, - { - "@id": "role:asn", - "skos:prefLabel": { - eng: "Associated name", - deu: "Assoziierter Name", - ita: "Associated name" - } - }, - { - "@id": "role:att", - "skos:prefLabel": { - eng: "Attributed name", - deu: "zugeschriebene/r AutorIn", - ita: "Nome attribuito" - } - }, - { - "@id": "role:auc", - "skos:prefLabel": { - eng: "Auctioneer", - deu: "AuktionatorIn", - ita: "Auctioneer" - } - }, - { - "@id": "role:aut", - "skos:prefLabel": { eng: "Author", deu: "Autor", ita: "Author" } - }, - { - "@id": "role:aqt", - "skos:prefLabel": { - eng: "Author in quotations or text abstracts", - deu: "AutorIn in Zitaten oder Zusammenfassungen", - ita: "Author in quotations or text abstracts" - } - }, - { - "@id": "role:aft", - "skos:prefLabel": { - eng: "Author of afterword, colophon, etc.", - deu: "AutorIn des Nachworts, Kolophon…", - ita: "Author of afterword, colophon, etc." - } - }, - { - "@id": "role:aud", - "skos:prefLabel": { - eng: "Author of dialog", - deu: "KommentatorIn", - ita: "Autore del dialogo" - } - }, - { - "@id": "role:aui", - "skos:prefLabel": { - eng: "Author of introduction", - deu: "AutorIn der Einleitung", - ita: "Autore dell'introduzione" - } - }, - { - "@id": "role:authorofsubtitles", - "skos:prefLabel": { - eng: "Author of subtitles", - deu: "AutorIn der Untertitel", - ita: "Autore dei sottotitoli" - } - }, - { - "@id": "role:ato", - "skos:prefLabel": { - eng: "Autographer", - deu: "Unterzeichnende/r", - ita: "Autographer" - } - }, - { - "@id": "role:ant", - "skos:prefLabel": { - eng: "Bibliographic antecedent", - deu: "ForscherIn", - ita: "Antecedente bibliografico" - } - }, - { - "@id": "role:bnd", - "skos:prefLabel": { - eng: "Binder", - deu: "BuchbinderIn", - ita: "Legatore" - } - }, - { - "@id": "role:bdd", - "skos:prefLabel": { - eng: "Binding designer", - deu: "Binde-DesignerIn", - ita: "Binding designer" - } - }, - { - "@id": "role:blw", - "skos:prefLabel": { - eng: "Blurb writer (missing space)", - deu: "AutorIn des Klappentextes", - ita: "Blurbwriter" - } - }, - { - "@id": "role:bkd", - "skos:prefLabel": { - eng: "Book designer", - deu: "DesignerIn des analogen Buches", - ita: "Designer del libro" - } - }, - { - "@id": "role:bkp", - "skos:prefLabel": { - eng: "Book producer", - deu: "BuchproduzentIn", - ita: "Book producer" - } - }, - { - "@id": "role:bjd", - "skos:prefLabel": { - eng: "Bookjacket designer", - deu: "DesignerIn des Buchumschlages / Schutzumschlages", - ita: "Bookjacket designer" - } - }, - { - "@id": "role:bpd", - "skos:prefLabel": { - eng: "Bookplate designer", - deu: "DesignerIn des Exlibris", - ita: "Creatore dell'ex-libris" - } - }, - { - "@id": "role:bsl", - "skos:prefLabel": { - eng: "Bookseller", - deu: "BuchhändlerIn", - ita: "Bookseller" - } - }, - { - "@id": "role:brl", - "skos:prefLabel": { - eng: "Braille embosser", - deu: "BrailledruckerIn", - ita: "Braille embosser" - } - }, - { - "@id": "role:brd", - "skos:prefLabel": { - eng: "Broadcaster", - deu: "RundfunksprecherIn", - ita: "Broadcaster" - } - }, - { - "@id": "role:cll", - "skos:prefLabel": { - eng: "Calligrapher", - deu: "KalligraphIn", - ita: "Calligrapher" - } - }, - { - "@id": "role:ctg", - "skos:prefLabel": { - eng: "Cartographer", - deu: "KartografIn", - ita: "Cartografo" - } - }, - { - "@id": "role:cas", - "skos:prefLabel": { eng: "Caster", deu: "GießerIn", ita: "Caster" } - }, - { - "@id": "role:cns", - "skos:prefLabel": { eng: "Censor", deu: "ZensorIn", ita: "Censor" } - }, - { - "@id": "role:chr", - "skos:prefLabel": { - eng: "Choreographer", - deu: "ChoreographIn", - ita: "Coreografo" - } - }, - { - "@id": "role:cng", - "skos:prefLabel": { - eng: "Cinematographer", - deu: "Kameramann/frau", - ita: "Direttore della fotografia" - } - }, - { - "@id": "role:cli", - "skos:prefLabel": { eng: "Client", deu: "Client", ita: "Client" } - }, - { - "@id": "role:coadvisor", - "skos:prefLabel": { - eng: "Co-Advisor", - deu: "MitbetreuerIn", - ita: "Co-Advisor" - } - }, - { - "@id": "role:cor", - "skos:prefLabel": { - eng: "Collection registrar", - deu: "RegistratorIn", - ita: "Collection registrar" - } - }, - { - "@id": "role:col", - "skos:prefLabel": { - eng: "Collector", - deu: "SammlerIn", - ita: "Collezionista" - } - }, - { - "@id": "role:clt", - "skos:prefLabel": { - eng: "Collotyper", - deu: "LichtdruckerIn", - ita: "Collotyper" - } - }, - { - "@id": "role:clr", - "skos:prefLabel": { - eng: "Colorist", - deu: "KoloristIn", - ita: "Colorist" - } - }, - { - "@id": "role:cmm", - "skos:prefLabel": { - eng: "Commentator", - deu: "KommentatorIn / BerichterstatterIn", - ita: "Commentator" - } - }, - { - "@id": "role:cwt", - "skos:prefLabel": { - eng: "Commentator for written text", - deu: "Autorin des Kommentars", - ita: "Commentator for written text" - } - }, - { - "@id": "role:com", - "skos:prefLabel": { - eng: "Compiler", - deu: "HerausgeberIn einer Sammlung", - ita: "Compilatore" - } - }, - { - "@id": "role:cpl", - "skos:prefLabel": { - eng: "Complainant", - deu: "Complainant", - ita: "Complainant" - } - }, - { - "@id": "role:cpt", - "skos:prefLabel": { - eng: "Complainant-appellant", - deu: "Complainant-appellant", - ita: "Complainant-appellant" - } - }, - { - "@id": "role:cpe", - "skos:prefLabel": { - eng: "Complainant-appellee", - deu: "Complainant-appellee", - ita: "Complainant-appellee" - } - }, - { - "@id": "role:cmp", - "skos:prefLabel": { - eng: "Composer", - deu: "KomponistIn", - ita: "Compositore" - } - }, - { - "@id": "role:cmt", - "skos:prefLabel": { - eng: "Compositor", - deu: "SchriftsetzerIn", - ita: "Compositor" - } - }, - { - "@id": "role:ccp", - "skos:prefLabel": { - eng: "Conceptor", - deu: "KonzepterIn / KonzeptionstexterIn", - ita: "Conceptor" - } - }, - { - "@id": "role:cnd", - "skos:prefLabel": { - eng: "Conductor", - deu: "KapellmeisterIn", - ita: "Direttore d’orchestra" - } - }, - { - "@id": "role:con", - "skos:prefLabel": { - eng: "Conservator", - deu: "KonservatorIn", - ita: "Conservator" - } - }, - { - "@id": "role:csl", - "skos:prefLabel": { - eng: "Consultant", - deu: "Fachliche Beratung / FachberaterIn", - ita: "Consultant" - } - }, - { - "@id": "role:csp", - "skos:prefLabel": { - eng: "Consultant to a project", - deu: "ProjektberaterIn", - ita: "Consultant to a project" - } - }, - { - "@id": "role:cos", - "skos:prefLabel": { - eng: "Contestant", - deu: "Contestant", - ita: "Contestant" - } - }, - { - "@id": "role:cot", - "skos:prefLabel": { - eng: "Contestant-appellant", - deu: "Contestant-appellant", - ita: "Contestant-appellant" - } - }, - { - "@id": "role:coe", - "skos:prefLabel": { - eng: "Contestant-appellee", - deu: "Contestant-appellee", - ita: "Contestant-appellee" - } - }, - { - "@id": "role:cts", - "skos:prefLabel": { - eng: "Contestee", - deu: "Contestee", - ita: "Contestee" - } - }, - { - "@id": "role:ctt", - "skos:prefLabel": { - eng: "Contestee-appellant", - deu: "Contestee-appellant", - ita: "Contestee-appellant" - } - }, - { - "@id": "role:cte", - "skos:prefLabel": { - eng: "Contestee-appellee", - deu: "Contestee-appellee", - ita: "Contestee-appellee" - } - }, - { - "@id": "role:ctr", - "skos:prefLabel": { - eng: "Contractor", - deu: "AuftragnehmerIn", - ita: "Contractor" - } - }, - { - "@id": "role:ctb", - "skos:prefLabel": { - eng: "Contributor", - deu: "Beitragende/r", - ita: "Contributor" - } - }, - { - "@id": "role:copista", - "skos:prefLabel": { eng: "Copista", deu: "Copista", ita: "Copista" } - }, - { - "@id": "role:cpc", - "skos:prefLabel": { - eng: "Copyright claimant", - deu: "AntragestellerIn auf Copyright", - ita: "Copyright claimant" - } - }, - { - "@id": "role:cph", - "skos:prefLabel": { - eng: "Copyright holder", - deu: "InhaberIn des Copyright", - ita: "Copyright holder" - } - }, - { - "@id": "role:crr", - "skos:prefLabel": { - eng: "Corrector", - deu: "KorrektorIn", - ita: "Corrector" - } - }, - { - "@id": "role:crp", - "skos:prefLabel": { - eng: "Correspondent", - deu: "KorrespondentIn", - ita: "Correspondent" - } - }, - { - "@id": "role:cst", - "skos:prefLabel": { - eng: "Costume designer", - deu: "KostümbildnerIn", - ita: "Costume designer" - } - }, - { - "@id": "role:cou", - "skos:prefLabel": { - eng: "Court governed", - deu: "Court governed", - ita: "Court governed" - } - }, - { - "@id": "role:crt", - "skos:prefLabel": { - eng: "Court reporter", - deu: "GerichtsberichterstatterIn", - ita: "Court reporter" - } - }, - { - "@id": "role:cov", - "skos:prefLabel": { - eng: "Cover designer", - deu: "DesignerIn der Hüller / Verpackung", - ita: "Cover designer" - } - }, - { - "@id": "role:cur", - "skos:prefLabel": { eng: "Curator", deu: "KuratorIn", ita: "Curator" } - }, - { - "@id": "role:dnc", - "skos:prefLabel": { eng: "Dancer", deu: "TänzerIn", ita: "Dancer" } - }, - { - "@id": "role:dtc", - "skos:prefLabel": { - eng: "Data contributor", - deu: "DatenlieferantIn", - ita: "Data contributor" - } - }, - { - "@id": "role:dtm", - "skos:prefLabel": { - eng: "Data manager", - deu: "DatenmanagerIn", - ita: "Gestore di dati" - } - }, - { - "@id": "role:datasupplier", - "skos:prefLabel": { - eng: "Data Supplier", - deu: "DatenlieferantIn", - ita: "Fornitore dei dati" - } - }, - { - "@id": "role:dte", - "skos:prefLabel": { - eng: "Dedicatee", - deu: "WidmungsträgerIn", - ita: "Dedicatario" - } - }, - { - "@id": "role:dto", - "skos:prefLabel": { - eng: "Dedicator", - deu: "Widmende/r", - ita: "Dedicante" - } - }, - { - "@id": "role:dfd", - "skos:prefLabel": { - eng: "Defendant", - deu: "Defendant", - ita: "Defendant" - } - }, - { - "@id": "role:dft", - "skos:prefLabel": { - eng: "Defendant-appellant", - deu: "Defendant-appellant", - ita: "Defendant-appellant" - } - }, - { - "@id": "role:dfe", - "skos:prefLabel": { - eng: "Defendant-appellee", - deu: "Defendant-appellee", - ita: "Defendant-appellee" - } - }, - { - "@id": "role:dgg", - "skos:prefLabel": { - eng: "Degree granting institution", - deu: "Verleihende Institution", - ita: "Istituzione che rilascia il titolo accademico" - } - }, - { - "@id": "role:dgs", - "skos:prefLabel": { - eng: "Degree supervisor", - deu: "Doktorvater / BetreuerIn einer Akademischen Abschlußarbeit", - ita: "Degree supervisor" - } - }, - { - "@id": "role:dln", - "skos:prefLabel": { - eng: "Delineator", - deu: "ZeichnerIn", - ita: "Delineator" - } - }, - { - "@id": "role:dpc", - "skos:prefLabel": { - eng: "Depicted", - deu: "abgebildet / Beschrieben", - ita: "Depicted" - } - }, - { - "@id": "role:dpt", - "skos:prefLabel": { - eng: "Depositor", - deu: "Depositor", - ita: "Depositor" - } - }, - { - "@id": "role:dsr", - "skos:prefLabel": { - eng: "Designer", - deu: "DesignerIn", - ita: "Designer" - } - }, - { - "@id": "role:digitiser", - "skos:prefLabel": { - eng: "Digitiser", - deu: "DigitalisiererIn", - ita: "Autore della digitalizzazione" - } - }, - { - "@id": "role:drt", - "skos:prefLabel": { - eng: "Director", - deu: "RegisseurIn", - ita: "Director" - } - }, - { - "@id": "role:dis", - "skos:prefLabel": { - eng: "Dissertant", - deu: "DissertantIn", - ita: "Tesista" - } - }, - { - "@id": "role:dbp", - "skos:prefLabel": { - eng: "Distribution place", - deu: "Vertriebsort", - ita: "Distribution place" - } - }, - { - "@id": "role:dst", - "skos:prefLabel": { - eng: "Distributor", - deu: "RechteinhaberIn", - ita: "Distributore" - } - }, - { - "@id": "role:domainexpert", - "skos:prefLabel": { - eng: "Domain Expert", - deu: "FachexpertIn", - ita: "Esperto del settore" - } - }, - { - "@id": "role:dnr", - "skos:prefLabel": { eng: "Donor", deu: "StifterIn", ita: "Donatore" } - }, - { - "@id": "role:drm", - "skos:prefLabel": { - eng: "Draftsman", - deu: - "BauzeichnerIn / KonstruktionszeichnerIn / technische/r ZeichnerIn", - ita: "Draftsman" - } - }, - { - "@id": "role:dub", - "skos:prefLabel": { - eng: "Dubious author", - deu: "zweifelhafte AutorIn", - ita: "Autore incerto" - } - }, - { - "@id": "role:edt", - "skos:prefLabel": { eng: "Editor", deu: "EditorIn", ita: "Curatore" } - }, - { - "@id": "role:edc", - "skos:prefLabel": { - eng: "Editor of compilation", - deu: "EditorIn der Zusammenstellung / des Sammelwerks", - ita: "Editor of compilation" - } - }, - { - "@id": "role:edm", - "skos:prefLabel": { - eng: "Editor of moving image work", - deu: "Film-EditorIn", - ita: "Editor of moving image work" - } - }, - { - "@id": "role:elg", - "skos:prefLabel": { - eng: "Electrician", - deu: "ElektrikerIn", - ita: "Electrician" - } - }, - { - "@id": "role:elt", - "skos:prefLabel": { - eng: "Electrotyper", - deu: "Electrotyper", - ita: "Electrotyper" - } - }, - { - "@id": "role:enj", - "skos:prefLabel": { - eng: "Enacting jurisdiction", - deu: "Verfügende / verordnende Jurisdiktion", - ita: "Enacting jurisdiction" - } - }, - { - "@id": "role:eng", - "skos:prefLabel": { - eng: "Engineer", - deu: "IngenieurIn", - ita: "Ingegnere" - } - }, - { - "@id": "role:egr", - "skos:prefLabel": { - eng: "Engraver", - deu: "GraveurIn", - ita: "Incisore" - } - }, - { - "@id": "role:etr", - "skos:prefLabel": { - eng: "Etcher", - deu: "RadiererIn", - ita: "Acquafortista" - } - }, - { - "@id": "role:evaluator", - "skos:prefLabel": { - eng: "Evaluator", - deu: "EvaluatorIn", - ita: "Valutatore" - } - }, - { - "@id": "role:exp", - "skos:prefLabel": { - eng: "Expert", - deu: "ExpertIn / Sachverständige/r", - ita: "Expert" - } - }, - { - "@id": "role:fac", - "skos:prefLabel": { - eng: "Facsimilist", - deu: "BearbeiterIn des Faksimile", - ita: "Responsabile del facsimile" - } - }, - { - "@id": "role:fld", - "skos:prefLabel": { - eng: "Field director", - deu: "LeiterIn von Feldforschung", - ita: "Field director" - } - }, - { - "@id": "role:fmd", - "skos:prefLabel": { - eng: "Film director", - deu: "FilmregisseurIn", - ita: "Film director" - } - }, - { - "@id": "role:fds", - "skos:prefLabel": { - eng: "Film distributor", - deu: "Filmverleih", - ita: "Film distributor" - } - }, - { - "@id": "role:flm", - "skos:prefLabel": { - eng: "Film editor", - deu: "Film-EditorIn", - ita: "Responsabile del montaggio" - } - }, - { - "@id": "role:fmp", - "skos:prefLabel": { - eng: "Film producer", - deu: "FilmproduzentIn", - ita: "Film producer" - } - }, - { - "@id": "role:fmk", - "skos:prefLabel": { - eng: "Filmmaker", - deu: "FilmemacherIn", - ita: "Filmmaker" - } - }, - { - "@id": "role:fpy", - "skos:prefLabel": { - eng: "First party", - deu: "erste Vertragspartei", - ita: "First party" - } - }, - { - "@id": "role:frg", - "skos:prefLabel": { - eng: "Forger", - deu: "KopistIn / FälscherIn", - ita: "Forger" - } - }, - { - "@id": "role:fmo", - "skos:prefLabel": { - eng: "Former owner", - deu: "VorbesitzerIn", - ita: "Precedente proprietario" - } - }, - { - "@id": "role:founder", - "skos:prefLabel": { eng: "Founder", deu: "GründerIn", ita: "Founder" } - }, - { - "@id": "role:fnd", - "skos:prefLabel": { eng: "Funder", deu: "Funder", ita: "Funder" } - }, - { - "@id": "role:gis", - "skos:prefLabel": { - eng: "Geographic information specialist", - deu: "Geographic information specialist", - ita: "Field director" - } - }, - { - "@id": "role:graphicdesigner", - "skos:prefLabel": { - eng: "Graphic Designer", - deu: "GrafikdesignerIn", - ita: "Grafico" - } - }, - { - "@id": "role:hnr", - "skos:prefLabel": { eng: "Honoree", deu: "Geehrte/r", ita: "Onorato" } - }, - { - "@id": "role:hst", - "skos:prefLabel": { eng: "Host", deu: "GastgeberIn", ita: "Host" } - }, - { - "@id": "role:his", - "skos:prefLabel": { - eng: "Host institution", - deu: "Gastgebende Institution", - ita: "Host institution" - } - }, - { - "@id": "role:ilu", - "skos:prefLabel": { - eng: "Illuminator", - deu: "IlluminatorIn", - ita: "Miniatore" - } - }, - { - "@id": "role:ill", - "skos:prefLabel": { - eng: "Illustrator", - deu: "IllustratorIn", - ita: "Illustratore" - } - }, - { - "@id": "role:initiator", - "skos:prefLabel": { - eng: "Initiator", - deu: "InitiatorIn", - ita: "Iniziatore" - } - }, - { - "@id": "role:ins", - "skos:prefLabel": { - eng: "Inscriber", - deu: "Widmende/r", - ita: "Inscriber" - } - }, - { - "@id": "role:itr", - "skos:prefLabel": { - eng: "Instrumentalist", - deu: "InstrumentalistIn", - ita: "Instrumentalist" - } - }, - { - "@id": "role:interpreter", - "skos:prefLabel": { - eng: "Interpreter", - deu: "InterpretIn", - ita: "Interprete" - } - }, - { - "@id": "role:ive", - "skos:prefLabel": { - eng: "Interviewee", - deu: "InterviewpartnerIn", - ita: "Intervistato" - } - }, - { - "@id": "role:ivr", - "skos:prefLabel": { - eng: "Interviewer", - deu: "InterviewerIn", - ita: "Intervistatore" - } - }, - { - "@id": "role:inv", - "skos:prefLabel": { - eng: "Inventor", - deu: "ErfinderIn", - ita: "Inventor" - } - }, - { - "@id": "role:isb", - "skos:prefLabel": { - eng: "Issuing body", - deu: "Issuing body", - ita: "Issuing body" - } - }, - { - "@id": "role:jud", - "skos:prefLabel": { eng: "Judge", deu: "Judge", ita: "Judge" } - }, - { - "@id": "role:jug", - "skos:prefLabel": { - eng: "Jurisdiction governed", - deu: "Jurisdiction governed", - ita: "Jurisdiction governed" - } - }, - { - "@id": "role:keeperoftheoriginal", - "skos:prefLabel": { - eng: "Keeper of the original", - deu: "AufbewahrerIn des Originals", - ita: "Affidatario dell'originale" - } - }, - { - "@id": "role:lbr", - "skos:prefLabel": { - eng: "Laboratory", - deu: "Labor", - ita: "Laboratory" - } - }, - { - "@id": "role:ldr", - "skos:prefLabel": { - eng: "Laboratory director", - deu: "LaborleiterIn", - ita: "Laboratory director" - } - }, - { - "@id": "role:lsa", - "skos:prefLabel": { - eng: "Landscape architect", - deu: "LandschaftsarchitektIn", - ita: "Landscape architect" - } - }, - { - "@id": "role:led", - "skos:prefLabel": { - eng: "Lead", - deu: "Leit- / LeiterIn-", - ita: "Lead" - } - }, - { - "@id": "role:len", - "skos:prefLabel": { eng: "Lender", deu: "Leihgeber", ita: "Lender" } - }, - { - "@id": "role:lil", - "skos:prefLabel": { - eng: "Libelant", - deu: "Libelant", - ita: "Libelant" - } - }, - { - "@id": "role:lit", - "skos:prefLabel": { - eng: "Libelant-appellant", - deu: "Libelant-appellant", - ita: "Libelant-appellant" - } - }, - { - "@id": "role:lie", - "skos:prefLabel": { - eng: "Libelant-appellee", - deu: "Libelant-appellee", - ita: "Libelant-appellee" - } - }, - { - "@id": "role:lel", - "skos:prefLabel": { eng: "Libelee", deu: "Libelee", ita: "Libelee" } - }, - { - "@id": "role:let", - "skos:prefLabel": { - eng: "Libelee-appellant", - deu: "Libelee-appellant", - ita: "Libelee-appellant" - } - }, - { - "@id": "role:lee", - "skos:prefLabel": { - eng: "Libelee-appellee", - deu: "Libelee-appellee", - ita: "Libelee-appellee" - } - }, - { - "@id": "role:lbt", - "skos:prefLabel": { - eng: "Librettist", - deu: "LibrettistIn", - ita: "Librettista" - } - }, - { - "@id": "role:lse", - "skos:prefLabel": { - eng: "Licensee", - deu: "LizenznehmerIn / LizenzinhaberIn", - ita: "Licensee" - } - }, - { - "@id": "role:lso", - "skos:prefLabel": { - eng: "Licensor", - deu: "LizenzgeberIn", - ita: "Licensor" - } - }, - { - "@id": "role:lgd", - "skos:prefLabel": { - eng: "Lighting designer", - deu: "LichtgestalterIn", - ita: "Lighting designer" - } - }, - { - "@id": "role:ltg", - "skos:prefLabel": { - eng: "Lithographer", - deu: "LithographIn", - ita: "Litografo" - } - }, - { - "@id": "role:lyr", - "skos:prefLabel": { - eng: "Lyricist", - deu: "SongwriterIn", - ita: "Paroliere" - } - }, - { - "@id": "role:mfp", - "skos:prefLabel": { - eng: "Manufacture place", - deu: "Herstellungsort", - ita: "Manufacture place" - } - }, - { - "@id": "role:mfr", - "skos:prefLabel": { - eng: "Manufacturer", - deu: "HerstellerIn", - ita: "Manufacturer" - } - }, - { - "@id": "role:mrb", - "skos:prefLabel": { - eng: "Marbler", - deu: "MarmorierIn", - ita: "Marbler" - } - }, - { - "@id": "role:mrk", - "skos:prefLabel": { - eng: "Markup editor", - deu: "Markup editor", - ita: "Markup editor" - } - }, - { - "@id": "role:med", - "skos:prefLabel": { eng: "Medium", deu: "Medium", ita: "Medium" } - }, - { - "@id": "role:mdc", - "skos:prefLabel": { - eng: "Metadata contact", - deu: "Metadata contact", - ita: "Metadata contact" - } - }, - { - "@id": "role:emt", - "skos:prefLabel": { - eng: "Metal-engraver", - deu: "MetallstecherIn", - ita: "Calcografo" - } - }, - { - "@id": "role:mtk", - "skos:prefLabel": { - eng: "Minute taker", - deu: "ProtokollführerIn", - ita: "Minute taker" - } - }, - { - "@id": "role:mod", - "skos:prefLabel": { - eng: "Moderator", - deu: "ModeratorIn / DiskussionsleiterIn", - ita: "Moderator" - } - }, - { - "@id": "role:mon", - "skos:prefLabel": { eng: "Monitor", deu: "Monitor", ita: "Monitor" } - }, - { - "@id": "role:mcp", - "skos:prefLabel": { - eng: "Music copyist", - deu: "MusikkopistIn / KopistIn", - ita: "Music copyist" - } - }, - { - "@id": "role:msd", - "skos:prefLabel": { - eng: "Musical director", - deu: "musikalische/r LeiterIn", - ita: "Direttore musicale" - } - }, - { - "@id": "role:mus", - "skos:prefLabel": { - eng: "Musician", - deu: "MusikerIn", - ita: "Musicista" - } - }, - { - "@id": "role:nrt", - "skos:prefLabel": { - eng: "Narrator", - deu: "ErzählerIn", - ita: "Narrator" - } - }, - { - "@id": "role:osp", - "skos:prefLabel": { - eng: "Onscreen presenter", - deu: "Fernseh- / TV-ModeratorIn", - ita: "Onscreen presenter" - } - }, - { - "@id": "role:opn", - "skos:prefLabel": { - eng: "Opponent", - deu: "WidersacherIn", - ita: "Controrelatore" - } - }, - { - "@id": "role:orm", - "skos:prefLabel": { - eng: "Organizer", - deu: "VeranstalterIn", - ita: "Organizer" - } - }, - { - "@id": "role:org", - "skos:prefLabel": { - eng: "Originator", - deu: "ErzeugerIn", - ita: "Originator" - } - }, - { - "@id": "role:oth", - "skos:prefLabel": { eng: "Other", deu: "Andere", ita: "Altro" } - }, - { - "@id": "role:own", - "skos:prefLabel": { - eng: "Owner", - deu: "EigentümerIn", - ita: "Proprietario" - } - }, - { - "@id": "role:pan", - "skos:prefLabel": { - eng: "Panelist", - deu: "DiskussionsteilnehmerIn", - ita: "Panelist" - } - }, - { - "@id": "role:ppm", - "skos:prefLabel": { - eng: "Papermaker", - deu: "PapiermacherIn / PapierherstellerIn", - ita: "Papermaker" - } - }, - { - "@id": "role:pta", - "skos:prefLabel": { - eng: "Patent applicant", - deu: "PatentanmelderIn", - ita: "Patent applicant" - } - }, - { - "@id": "role:pth", - "skos:prefLabel": { - eng: "Patent holder", - deu: "PatentinhaberIn", - ita: "Patent holder" - } - }, - { - "@id": "role:pat", - "skos:prefLabel": { - eng: "Patron", - deu: "SchirmherrIn / FördererIn", - ita: "Patron" - } - }, - { - "@id": "role:pedagogicexpert", - "skos:prefLabel": { - eng: "Pedagogic Expert", - deu: "Pädagogische/r ExpertIn", - ita: "Esperto pedagogico" - } - }, - { - "@id": "role:prf", - "skos:prefLabel": { - eng: "Performer", - deu: "Performer", - ita: "Performer" - } - }, - { - "@id": "role:pma", - "skos:prefLabel": { - eng: "Permitting agency", - deu: "Genehmigungsbehörde", - ita: "Permitting agency" - } - }, - { - "@id": "role:pht", - "skos:prefLabel": { - eng: "Photographer", - deu: "FotografIn", - ita: "Fotografo" - } - }, - { - "@id": "role:ptf", - "skos:prefLabel": { - eng: "Plaintiff", - deu: "KlägerIn", - ita: "Plaintiff" - } - }, - { - "@id": "role:ptt", - "skos:prefLabel": { - eng: "Plaintiff-appellant", - deu: "Plaintiff-appellant", - ita: "Plaintiff-appellant" - } - }, - { - "@id": "role:pte", - "skos:prefLabel": { - eng: "Plaintiff-appellee", - deu: "Plaintiff-appellee", - ita: "Plaintiff-appellee" - } - }, - { - "@id": "role:plt", - "skos:prefLabel": { - eng: "Platemaker", - deu: "Platemaker", - ita: "Platemaker" - } - }, - { - "@id": "role:pra", - "skos:prefLabel": { eng: "Praeses", deu: "Präses", ita: "Praeses" } - }, - { - "@id": "role:pre", - "skos:prefLabel": { - eng: "Presenter", - deu: "Presenter", - ita: "Presenter" - } - }, - { - "@id": "role:prt", - "skos:prefLabel": { - eng: "Printer", - deu: "DruckerIn", - ita: "Stampatore" - } - }, - { - "@id": "role:pop", - "skos:prefLabel": { - eng: "Printer of plates", - deu: "PlattendruckerIn", - ita: "Printer of plates" - } - }, - { - "@id": "role:prm", - "skos:prefLabel": { - eng: "Printmaker", - deu: "DruckerIn / GrafikkünstlerIn", - ita: "Printmaker" - } - }, - { - "@id": "role:prc", - "skos:prefLabel": { - eng: "Process contact", - deu: "AnsprechpartnerIn", - ita: "Process contact" - } - }, - { - "@id": "role:pro", - "skos:prefLabel": { - eng: "Producer", - deu: "ProduzentIn", - ita: "Produttore" - } - }, - { - "@id": "role:prn", - "skos:prefLabel": { - eng: "Production company", - deu: "Produktionsfirma", - ita: "Production company" - } - }, - { - "@id": "role:prp", - "skos:prefLabel": { - eng: "Production place", - deu: "Produktionsort", - ita: "Production place" - } - }, - { - "@id": "role:prs", - "skos:prefLabel": { - eng: "Production designer", - deu: "AusstatterIn", - ita: "Production designer" - } - }, - { - "@id": "role:pmn", - "skos:prefLabel": { - eng: "Production manager", - deu: "ProduktionsmanagerIn", - ita: "Production manager" - } - }, - { - "@id": "role:prd", - "skos:prefLabel": { - eng: "Production personnel", - deu: "Produktionspersonal", - ita: "Production personnel" - } - }, - { - "@id": "role:prg", - "skos:prefLabel": { - eng: "Programmer", - deu: "ProgrammiererIn", - ita: "Programmer" - } - }, - { - "@id": "role:pdr", - "skos:prefLabel": { - eng: "Project director", - deu: "PrjektleiterIn", - ita: "Project director" - } - }, - { - "@id": "role:pfr", - "skos:prefLabel": { - eng: "Proofreader", - deu: "LektorIn", - ita: "Correttore" - } - }, - { - "@id": "role:prv", - "skos:prefLabel": { - eng: "Provider", - deu: "AnbieterIn / LieferantIn", - ita: "Provider" - } - }, - { - "@id": "role:pbl", - "skos:prefLabel": { - eng: "Publisher", - deu: "HerausgeberIn", - ita: "Editore" - } - }, - { - "@id": "role:pbd", - "skos:prefLabel": { - eng: "Publishing director", - deu: "VerlagsleiterIn", - ita: "Publishing director" - } - }, - { - "@id": "role:ppt", - "skos:prefLabel": { - eng: "Puppeteer", - deu: "PuppenspielerIn", - ita: "Puppeteer" - } - }, - { - "@id": "role:rdd", - "skos:prefLabel": { - eng: "Radio director", - deu: "Rund/Hörfunkdirektorin / RundfunkintendantIn", - ita: "Radio director" - } - }, - { - "@id": "role:rpc", - "skos:prefLabel": { - eng: "Radio producer", - deu: "RadioproduzentIn", - ita: "Radio producer" - } - }, - { - "@id": "role:rce", - "skos:prefLabel": { - eng: "Recording engineer", - deu: "TonmeisterIn", - ita: "Tecnico della registrazione" - } - }, - { - "@id": "role:rcd", - "skos:prefLabel": { - eng: "Recordist", - deu: "TontechnikerIn", - ita: "Recordist" - } - }, - { - "@id": "role:red", - "skos:prefLabel": { - eng: "Redaktor", - deu: "RedakteurIn", - ita: "Redaktor" - } - }, - { - "@id": "role:ren", - "skos:prefLabel": { - eng: "Renderer", - deu: "ReinzeichnerIn", - ita: "Renderer" - } - }, - { - "@id": "role:rpt", - "skos:prefLabel": { - eng: "Reporter", - deu: "ReporterIn / BerichterstatterIn", - ita: "Reporter" - } - }, - { - "@id": "role:rth", - "skos:prefLabel": { - eng: "Research team head", - deu: "Projektverantwortliche/r", - ita: "Direttore della ricerca" - } - }, - { - "@id": "role:rtm", - "skos:prefLabel": { - eng: "Research team member", - deu: "ProjektmitarbeiterIn", - ita: "Membro di un gruppo di ricerca" - } - }, - { - "@id": "role:res", - "skos:prefLabel": { - eng: "Researcher", - deu: "ForscherIn", - ita: "Ricercatore" - } - }, - { - "@id": "role:rsp", - "skos:prefLabel": { - eng: "Respondent", - deu: "Respondent", - ita: "Respondent" - } - }, - { - "@id": "role:rst", - "skos:prefLabel": { - eng: "Respondent-appellant", - deu: "Respondent-appellant", - ita: "Respondent-appellant" - } - }, - { - "@id": "role:rse", - "skos:prefLabel": { - eng: "Respondent-appellee", - deu: "Respondent-appellee", - ita: "Respondent-appellee" - } - }, - { - "@id": "role:rpy", - "skos:prefLabel": { - eng: "Responsible party", - deu: "Responsible party", - ita: "Responsible party" - } - }, - { - "@id": "role:rsg", - "skos:prefLabel": { - eng: "Restager", - deu: "WiederaufführunerIn", - ita: "Restager" - } - }, - { - "@id": "role:rsr", - "skos:prefLabel": { - eng: "Restorationist", - deu: "RestauratorIn", - ita: "Restorationist" - } - }, - { - "@id": "role:rev", - "skos:prefLabel": { - eng: "Reviewer", - deu: "KritikerIn", - ita: "Recensore" - } - }, - { - "@id": "role:rbr", + "@id": "role:asn", "skos:prefLabel": { - eng: "Rubricator", - deu: "Rubricator", - ita: "Rubricator" + eng: "Associated name", + deu: "Assoziierter Name", + ita: "Associated name" } }, { - "@id": "role:sce", + "@id": "role:att", "skos:prefLabel": { - eng: "Scenarist", - deu: "SzenentexterIn", - ita: "Scenografo" + eng: "Attributed name", + deu: "zugeschriebene/r AutorIn", + ita: "Nome attribuito" } }, { - "@id": "role:sad", - "skos:prefLabel": { - eng: "Scientific advisor", - deu: "wissenschaftliche BeraterIn", - ita: "Consulente scientifico" - } + "@id": "role:aut", + "skos:prefLabel": { eng: "Author", deu: "Autor*in", ita: "Author" } }, + { - "@id": "role:aus", + "@id": "role:com", "skos:prefLabel": { - eng: "Screenwriter", - deu: "DrehbuchautorIn", - ita: "Sceneggiatore" + eng: "Compiler", + deu: "HerausgeberIn einer Sammlung", + ita: "Compilatore" } }, + { - "@id": "role:scr", - "skos:prefLabel": { eng: "Scribe", deu: "SchreiberIn", ita: "Scribe" } - }, - { - "@id": "role:scl", + "@id": "role:csl", "skos:prefLabel": { - eng: "Sculptor", - deu: "BildhauerIn", - ita: "Scultore" + eng: "Consultant", + deu: "Fachliche Beratung / FachberaterIn", + ita: "Consultant" } }, { - "@id": "role:spy", + "@id": "role:csp", "skos:prefLabel": { - eng: "Second party", - deu: "Second party", - ita: "Second party" + eng: "Consultant to a project", + deu: "ProjektberaterIn", + ita: "Consultant to a project" } }, + { - "@id": "role:sec", + "@id": "role:ctb", "skos:prefLabel": { - eng: "Secretary", - deu: "SekretärIn", - ita: "Secretary" + eng: "Contributor", + deu: "Beitragende/r", + ita: "Contributor" } }, + { - "@id": "role:sll", - "skos:prefLabel": { eng: "Seller", deu: "VerkäuferIn", ita: "Seller" } - }, - { - "@id": "role:std", + "@id": "role:cph", "skos:prefLabel": { - eng: "Set designer", - deu: "AusstatterIn", - ita: "Set designer" + eng: "Copyright holder", + deu: "InhaberIn des Copyright", + ita: "Copyright holder" } }, + { - "@id": "role:stg", + "@id": "role:dtc", "skos:prefLabel": { - eng: "Setting", - deu: "Schauplatz", - ita: "Setting" + eng: "Data contributor", + deu: "DatenlieferantIn", + ita: "Data contributor" } }, { - "@id": "role:sgn", + "@id": "role:dtm", "skos:prefLabel": { - eng: "Signer", - deu: "UnterzeichnerIn", - ita: "Signer" + eng: "Data manager", + deu: "DatenmanagerIn", + ita: "Gestore di dati" } }, { - "@id": "role:sng", - "skos:prefLabel": { eng: "Singer", deu: "SängerIn", ita: "Cantante" } - }, - { - "@id": "role:sds", + "@id": "role:datasupplier", "skos:prefLabel": { - eng: "Sound designer", - deu: "SounddesignerIn", - ita: "Progettista del suono" + eng: "Data Supplier", + deu: "DatenlieferantIn", + ita: "Fornitore dei dati" } }, + { - "@id": "role:spk", + "@id": "role:dgs", "skos:prefLabel": { - eng: "Speaker", - deu: "SprecherIn", - ita: "Speaker" + eng: "Degree supervisor", + deu: "Doktorvater / BetreuerIn einer Akademischen Abschlußarbeit", + ita: "Degree supervisor" } }, + { - "@id": "role:spn", + "@id": "role:dpt", "skos:prefLabel": { - eng: "Sponsor", - deu: "FördererIn", - ita: "Sponsor" + eng: "Depositor", + deu: "Depositor", + ita: "Depositor" } }, + { - "@id": "role:sgd", + "@id": "role:dis", "skos:prefLabel": { - eng: "Stage director", - deu: "(Theater)RegisseurIn", - ita: "Stage director" + eng: "Dissertant", + deu: "DissertantIn", + ita: "Tesista" } }, + { - "@id": "role:stm", - "skos:prefLabel": { - eng: "Stage manager", - deu: "InspizientIn / BühnenmeisterIn", - ita: "Stage manager" - } + "@id": "role:edt", + "skos:prefLabel": { eng: "Editor", deu: "EditorIn", ita: "Curatore" } }, + { - "@id": "role:stn", + "@id": "role:fld", "skos:prefLabel": { - eng: "Standards body", - deu: "Normkomitee", - ita: "Standards body" + eng: "Field director", + deu: "LeiterIn von Feldforschung", + ita: "Field director" } }, + { - "@id": "role:str", + "@id": "role:ldr", "skos:prefLabel": { - eng: "Stereotyper", - deu: "Stereotyper", - ita: "Stereotyper" + eng: "Laboratory director", + deu: "LaborleiterIn", + ita: "Laboratory director" } }, + { - "@id": "role:stl", + "@id": "role:mdc", "skos:prefLabel": { - eng: "Storyteller", - deu: "ErzählerIn", - ita: "Storyteller" + eng: "Metadata contact", + deu: "Metadata contact", + ita: "Metadata contact" } }, + { - "@id": "role:sht", + "@id": "role:pta", "skos:prefLabel": { - eng: "Supporting host", - deu: "UnterstützerIn", - ita: "Supporting host" + eng: "Patent applicant", + deu: "PatentanmelderIn", + ita: "Patent applicant" } }, { - "@id": "role:srv", + "@id": "role:pth", "skos:prefLabel": { - eng: "Surveyor", - deu: "VermesserIn", - ita: "Surveyor" + eng: "Patent holder", + deu: "PatentinhaberIn", + ita: "Patent holder" } }, + { - "@id": "role:tch", - "skos:prefLabel": { eng: "Teacher", deu: "LehrerIn", ita: "Teacher" } - }, - { - "@id": "role:tcd", + "@id": "role:prg", "skos:prefLabel": { - eng: "Technical director", - deu: "Technische/r DirektorIn", - ita: "Technical director" + eng: "Programmer", + deu: "ProgrammiererIn", + ita: "Programmer" } }, { - "@id": "role:technicalinspector", + "@id": "role:pdr", "skos:prefLabel": { - eng: "Technical Inspector", - deu: "Technische/r PrüferIn", - ita: "Ispettore tecnico" + eng: "Project director", + deu: "PrjektleiterIn", + ita: "Project director" } }, + { - "@id": "role:technicaltranslator", + "@id": "role:rth", "skos:prefLabel": { - eng: "Technical Translator", - deu: "Technische/r UmsetzerIn", - ita: "Traduttore Tecnico" + eng: "Research team head", + deu: "Projektverantwortliche/r", + ita: "Direttore della ricerca" } }, { - "@id": "role:tld", + "@id": "role:rtm", "skos:prefLabel": { - eng: "Television director", - deu: "FernsehintendantIn", - ita: "Television director" + eng: "Research team member", + deu: "ProjektmitarbeiterIn", + ita: "Membro di un gruppo di ricerca" } }, { - "@id": "role:tlp", + "@id": "role:res", "skos:prefLabel": { - eng: "Television producer", - deu: "FernsehproduzentIn", - ita: "Television producer" + eng: "Researcher", + deu: "ForscherIn", + ita: "Ricercatore" } }, + { - "@id": "role:textprocessor", + "@id": "role:sad", "skos:prefLabel": { - eng: "Text Processor", - deu: "TextbearbeiterIn", - ita: "Estensore del testo" + eng: "Scientific advisor", + deu: "wissenschaftliche BeraterIn", + ita: "Consulente scientifico" } }, + { "@id": "role:ths", "skos:prefLabel": { @@ -2790,38 +994,7 @@ const state = { ita: "Relatore" } }, - { - "@id": "role:trc", - "skos:prefLabel": { - eng: "Transcriber", - deu: "Transcriber", - ita: "Transcriber" - } - }, - { - "@id": "role:trl", - "skos:prefLabel": { - eng: "Translator", - deu: "ÜbersetzerIn", - ita: "Traduttore" - } - }, - { - "@id": "role:tyd", - "skos:prefLabel": { - eng: "Type designer", - deu: "SchriftdesignerIn / SchriftentwerferIn", - ita: "Type designer" - } - }, - { - "@id": "role:tyg", - "skos:prefLabel": { - eng: "Typographer", - deu: "TypographIn", - ita: "Tipografo" - } - }, + { "@id": "role:uploader", "skos:prefLabel": { @@ -2829,98 +1002,6 @@ const state = { deu: "Uploader", ita: "Uploader" } - }, - { - "@id": "role:vdg", - "skos:prefLabel": { - eng: "Videographer", - deu: "VideoanbieterIn", - ita: "Videografo" - } - }, - { - "@id": "role:vac", - "skos:prefLabel": { - eng: "Voice actor", - deu: "SynchronsprecherIn", - ita: "Voice actor" - } - }, - { - "@id": "role:wit", - "skos:prefLabel": { eng: "Witness", deu: "ZeugIn", ita: "Witness" } - }, - { - "@id": "role:wde", - "skos:prefLabel": { - eng: "Wood-engraver", - deu: "HolzstecherIn", - ita: "Xilografo" - } - }, - { - "@id": "role:wdc", - "skos:prefLabel": { - eng: "Woodcutter", - deu: "HolzschneiderIn", - ita: "Woodcutter" - } - }, - { - "@id": "role:wam", - "skos:prefLabel": { - eng: "Writer of accompanying material", - deu: "AutorIn von Begleitmaterial", - ita: "Autore del materiale allegato" - } - }, - { - "@id": "role:wac", - "skos:prefLabel": { - eng: "Writer of added commentary", - deu: "Writer of added commentary", - ita: "Writer of added commentary" - } - }, - { - "@id": "role:wal", - "skos:prefLabel": { - eng: "Writer of added lyrics", - deu: "Writer of added lyrics", - ita: "Writer of added lyrics" - } - }, - { - "@id": "role:wat", - "skos:prefLabel": { - eng: "Writer of added text", - deu: "Writer of added text", - ita: "Writer of added text" - } - }, - { - "@id": "role:win", - "skos:prefLabel": { - eng: "Writer of introduction", - deu: "Writer of introduction", - ita: "Writer of introduction" - } - }, - { - "@id": "role:wpr", - "skos:prefLabel": { - eng: "Writer of preface", - deu: "Writer of preface", - ita: "Writer of preface" - } - }, - { - "@id": "role:wst", - "skos:prefLabel": { - eng: "Writer of supplementary textual content", - deu: "Writer of supplementary textual content", - ita: "Writer of supplementary textual content" - } } ], loaded: true @@ -2967,27 +1048,39 @@ const state = { }, { "@id": "http://creativecommons.org/licenses/by-nc/4.0/", - "skos:prefLabel": { eng: "CC BY-NC 4.0 International (Attribution-NonCommercial)" }, + "skos:prefLabel": { + eng: "CC BY-NC 4.0 International (Attribution-NonCommercial)" + }, img: "cc-by-nc.png" }, { "@id": "http://creativecommons.org/licenses/by-nc-nd/4.0/", - "skos:prefLabel": { eng: "CC BY-NC-ND 4.0 International (Attribution-NonCommercial-NoDerivatives)" }, + "skos:prefLabel": { + eng: + "CC BY-NC-ND 4.0 International (Attribution-NonCommercial-NoDerivatives)" + }, img: "cc-by-nc-nd.png" }, { "@id": "http://creativecommons.org/licenses/by-nc-sa/4.0/", - "skos:prefLabel": { eng: "CC BY-NC-SA 4.0 International (Attribution-NonCommercial-ShareAlike)" }, + "skos:prefLabel": { + eng: + "CC BY-NC-SA 4.0 International (Attribution-NonCommercial-ShareAlike)" + }, img: "cc-by-nc-sa.png" }, { "@id": "http://creativecommons.org/licenses/by-nd/4.0/", - "skos:prefLabel": { eng: "CC BY-ND 4.0 International (Attribution-NoDerivatives)" }, + "skos:prefLabel": { + eng: "CC BY-ND 4.0 International (Attribution-NoDerivatives)" + }, img: "cc-by-nd.png" }, { "@id": "http://creativecommons.org/licenses/by-sa/4.0/", - "skos:prefLabel": { eng: "CC BY-SA 4.0 International (Attribution-ShareAlike)" }, + "skos:prefLabel": { + eng: "CC BY-SA 4.0 International (Attribution-ShareAlike)" + }, img: "cc-by-sa.png" } ], diff --git a/src/utils/arrays.js b/src/utils/arrays.js index 55761bae3d7e2f6455dacddff8e3643908fddd35..23cef211b988997581bdadafed491257e3db3718 100644 --- a/src/utils/arrays.js +++ b/src/utils/arrays.js @@ -1,5 +1,5 @@ export default { - arrayMove (arr, oldIndex, newIndex) { + arrayMove(arr, oldIndex, newIndex) { if (newIndex >= arr.length) { var k = newIndex - arr.length + 1 while (k--) { @@ -9,23 +9,23 @@ export default { arr.splice(newIndex, 0, arr.splice(oldIndex, 1)[0]) return arr // for testing, arr was modified inplace }, - duplicate (arr, e) { + duplicate(arr, e) { var i = arr.indexOf(e) var e2 = JSON.parse(JSON.stringify(e)) arr.splice(i + 1, 0, e2) return e2 }, - remove (arr, e) { + remove(arr, e) { var i = arr.indexOf(e) arr.splice(i, 1) }, - moveUp (arr, e) { + moveUp(arr, e) { var i = arr.indexOf(e) if (i - 1 >= 0) { this.arrayMove(arr, i, i - 1) } }, - moveDown (arr, e) { + moveDown(arr, e) { var i = arr.indexOf(e) if (i + 1 <= arr.length) { this.arrayMove(arr, i, i + 1) diff --git a/src/utils/fields.js b/src/utils/fields.js index 45a8f352fe20821fca6dc2b954763c47adf75201..001f2996e8266bad6b574cb19c069a948738b4d2 100644 --- a/src/utils/fields.js +++ b/src/utils/fields.js @@ -13,7 +13,7 @@ const fields = [ formValidation: true, required: true, info: "Title of your research collection", - warning: true + warning: true, }, { id: "date", @@ -29,7 +29,7 @@ const fields = [ formValidation: true, warning: false, definition: - "A point or period of time associated with an event in the lifecycle of the resource." + "A point or period of time associated with an event in the lifecycle of the resource.", }, { id: "abstract", @@ -46,7 +46,7 @@ const fields = [ language: "eng", required: true, formValidation: true, - warning: true + warning: true, }, { id: "contributors", @@ -67,7 +67,7 @@ const fields = [ ordergroup: "entity", formValidation: true, info: "contributors to the project", - warning: true + warning: true, }, { id: "projects", @@ -80,18 +80,18 @@ const fields = [ "skos:prefLabel": [ { "@value": "", - "@language": "en" - } + "@language": "en", + }, ], "rdfs:comment": [ { "@value": "", - "@language": "eng" - } + "@language": "eng", + }, ], "foaf:homepage": [""], - "skos:notation": [""] - } + "skos:notation": [""], + }, ], agency: [ { @@ -99,11 +99,11 @@ const fields = [ "skos:prefLabel": [ { "@value": "", - "@language": "eng" - } + "@language": "eng", + }, ], - "skos:exactMatch": [""] - } + "skos:exactMatch": [""], + }, ], component: "project", type: "foaf:Project", @@ -113,7 +113,7 @@ const fields = [ ordergroup: "project", formValidation: false, warning: false, - info: "Put some info here" + info: "Put some info here", }, /* { id: "file", @@ -135,7 +135,7 @@ const fields = [ warning: false, "skos:prefLabel": [], definition: - "The value will indicate the copyright, usage and access rights that apply to this digital representation." + "The value will indicate the copyright, usage and access rights that apply to this digital representation.", }, { id: "file", @@ -150,7 +150,7 @@ const fields = [ fileLicense: "", licenseWarning: true, formValidation: true, - warning: true + warning: true, }, { @@ -164,14 +164,14 @@ const fields = [ value: "", language: "", definition: - "Information about rights held in and over the resource. Typically, rights information includes a statement about various property rights associated with the resource, including intellectual property rights." + "Information about rights held in and over the resource. Typically, rights information includes a statement about various property rights associated with the resource, including intellectual property rights.", }, { id: "resource-type", fieldname: "Resource type", predicate: "dcterms:type", warning: false, - value: "" + value: "", }, { id: "1-Biological-macromolecule", @@ -190,7 +190,7 @@ const fields = [ visible: true, category: ["biologicalMacromolecule"], vocabulary: "biological_macromolecule", - info: "" + info: "", }, { id: "1-Uniprot", @@ -214,7 +214,7 @@ const fields = [ description: "Protein", infoRef: "http://purl.obolibrary.org/obo/", info: - "UniProt ID EDAM>data:3021 Accession number of a UniProt (protein sequence) database entry" + "UniProt ID EDAM>data:3021 Accession number of a UniProt (protein sequence) database entry", }, { id: "1-Isoform", @@ -233,7 +233,7 @@ const fields = [ description: "Protein", info: "A quality of a protein that harbors a variation from the native protein (called canonical form), which could arise due to alternative promoter usage, alternative splicing, alternative translation initiation and ribosomal frameshifting.", - infoRef: "http://www.bioassayontology.org/bao#BAO_0002646" + infoRef: "http://www.bioassayontology.org/bao#BAO_0002646", }, { id: "1-Protein-sequence-alteration", @@ -252,7 +252,7 @@ const fields = [ description: "Protein", info: "Any subcellular or molecular event, process, or condition that produces a divergence from the usual wild-type condition in the primary sequence of a peptide or protein molecule. (NCI) [ NCI ]", - infoRef: "http://purl.obolibrary.org/obo/NCIT:C21070" + infoRef: "http://purl.obolibrary.org/obo/NCIT:C21070", }, { id: "1-Protein-modification", @@ -271,7 +271,7 @@ const fields = [ description: "Protein", info: "Covalent modification of, or a change resulting in an alteration of the measured molecular mass of, a peptide or protein amino acid residue. [ PubMed:18688235 ]", - infoRef: "http://purl.obolibrary.org/obo/MOD:00000" + infoRef: "http://purl.obolibrary.org/obo/MOD:00000", }, { id: "1-Entrez-gene-ID", @@ -290,7 +290,7 @@ const fields = [ description: "Gene", info: "EntrezGene_ID NCIT:C49379 Indicates the accession number for a Gene within the Entrez Gene database. [ NCI ]", - infoRef: "http://purl.obolibrary.org/obo/NCIT:C49379" + infoRef: "http://purl.obolibrary.org/obo/NCIT:C49379", }, { id: "1-Gene-modification", @@ -309,7 +309,7 @@ const fields = [ description: "Gene", info: "Gene modification NCIT:C126104 Any gene manipulation method used to generate a product with an altered sequence, structure, or conformation. [ NCI ]", - infoRef: "http://purl.obolibrary.org/obo/NCIT:C126104" + infoRef: "http://purl.obolibrary.org/obo/NCIT:C126104", }, { id: "1-Nucleic-acid-type", @@ -332,7 +332,7 @@ const fields = [ subcategory: ["polynucleotide"], description: "polynucleotide", info: "CHEBI:15986", - infoRef: "http://purl.obolibrary.org/obo/CHEBI:15986" + infoRef: "http://purl.obolibrary.org/obo/CHEBI:15986", }, { id: "1-RefSeq-accession", @@ -351,7 +351,7 @@ const fields = [ description: "Polynucleotide", info: "RefSeq accession EDAM > data:1098 Accession number of a RefSeq database entry. Synonyms: RefSeq ID", - infoRef: "" + infoRef: "", }, { id: "1-PFAM-accession", @@ -370,7 +370,7 @@ const fields = [ description: "Protein Family", info: "PFAM accession number EDAM > data:1138 Accession number of a Pfam entry.", - infoRef: "" + infoRef: "", }, { id: "1-Uniprot-protein-subunit", @@ -391,7 +391,7 @@ const fields = [ subcategory: ["Protein Subunit"], description: "Protein Subunit", info: - "UniProt ID EDAM>data:3021 Accession number of a UniProt (protein sequence) database entry" + "UniProt ID EDAM>data:3021 Accession number of a UniProt (protein sequence) database entry", }, { id: "1-Isoform-protein-subunit", @@ -411,7 +411,7 @@ const fields = [ description: "Protein Subunit", info: "A quality of a protein that harbors a variation from the native protein (called canonical form), which could arise due to alternative promoter usage, alternative splicing, alternative translation initiation and ribosomal frameshifting.", - infoRef: "" + infoRef: "", }, { id: "1-Protein-sequence-alteration-protein-subunit", @@ -431,7 +431,7 @@ const fields = [ description: "Protein Subunit", info: "Any subcellular or molecular event, process, or condition that produces a divergence from the usual wild-type condition in the primary sequence of a peptide or protein molecule. (NCI) [ NCI ]", - infoRef: "NCIT:C21070" + infoRef: "NCIT:C21070", }, { id: "1-Protein-modification-protein-subunit", @@ -451,7 +451,7 @@ const fields = [ description: "Protein Subunit", info: "Covalent modification of, or a change resulting in an alteration of the measured molecular mass of, a peptide or protein amino acid residue. [ PubMed:18688235 ]", - infoRef: "MOD:00000" + infoRef: "MOD:00000", }, { id: "1-Complex-portal-accession", @@ -470,7 +470,7 @@ const fields = [ description: "Protein Complex", info: "A persistent (stable) and unique identifier of the manually curated EMBL-EBI Complex-Portal (Complex Portal", - infoRef: "" + infoRef: "", }, { id: "1-Polysaccharide", @@ -492,7 +492,7 @@ const fields = [ category: ["biologicalMacromolecule"], subcategory: ["Polysaccharide"], description: "Polysaccharide", - info: "" + info: "", }, { id: "1-Lipid", @@ -513,7 +513,7 @@ const fields = [ category: ["biologicalMacromolecule"], subcategory: ["Lipid"], description: "Lipid", - info: "" + info: "", }, { id: "2-Life", @@ -530,10 +530,9 @@ const fields = [ multiplicable: false, visible: true, category: ["life"], - vocabulary: "life", info: - "Life NCIT:C142142 Thee biochemical phenomenon that distinguishes organisms from inorganic matter. It is characterized by growth, metabolism, and reproduction. [ NCI ]" + "Life NCIT:C142142 Thee biochemical phenomenon that distinguishes organisms from inorganic matter. It is characterized by growth, metabolism, and reproduction. [ NCI ]", }, { @@ -559,7 +558,7 @@ const fields = [ //baseurl: "http://purl.obolibrary.org/obo/" description: "Living Organisms", infoRef: "http://purl.obolibrary.org/obo/NCBITaxon_1", - info: "NCBITaxon_1" + info: "NCBITaxon_1", }, { id: "2-Viruses", @@ -584,7 +583,7 @@ const fields = [ //baseurl: "http://purl.obolibrary.org/obo/" description: "Living Organisms", infoRef: "http://purl.obolibrary.org/obo/NCBITaxon_10239", - info: "NCBITaxon_10239" + info: "NCBITaxon_10239", }, { id: "2-Viroids", @@ -609,7 +608,7 @@ const fields = [ //baseurl: "http://purl.obolibrary.org/obo/" description: "Living Organisms", infoRef: "http://purl.obolibrary.org/obo/NCBITaxon_12884", - info: "NCBITaxon_10239" + info: "NCBITaxon_10239", }, { id: "2-cellular-organisms", @@ -634,7 +633,7 @@ const fields = [ //baseurl: "http://purl.obolibrary.org/obo/" description: "Living Organisms", infoRef: "http://purl.obolibrary.org/obo/NCBITaxon_131567", - info: "NCBITaxon_131567" + info: "NCBITaxon_131567", }, { id: "2-otherSequences", @@ -659,7 +658,7 @@ const fields = [ //baseurl: "http://purl.obolibrary.org/obo/" description: "Living Organisms", infoRef: "http://purl.obolibrary.org/obo/NCBITaxon_28384", - info: "NCBITaxon_28384" + info: "NCBITaxon_28384", }, { id: "2-unclassifiedSequences", @@ -684,7 +683,7 @@ const fields = [ //baseurl: "http://purl.obolibrary.org/obo/" description: "Living Organisms", infoRef: "http://purl.obolibrary.org/obo/NCBITaxon_12908", - info: "NCBITaxon_12908" + info: "NCBITaxon_12908", }, { id: "2-cellosaurus", @@ -701,7 +700,7 @@ const fields = [ ontology: "cellosaurus", ontClass: "", category: ["life"], - description: "Cellosaurus cell-line" + description: "Cellosaurus cell-line", }, { id: "2-cultured-cell", @@ -721,7 +720,7 @@ const fields = [ category: ["life"], description: "Cellosaurus cell-line", infoRef: "", - info: "CL_0000010" + info: "CL_0000010", }, { id: "3-Disease", @@ -746,22 +745,22 @@ const fields = [ description: "disease or disorder ", info: "disease or disorder MONDO:0000001 A disease is a disposition to undergo pathological processes that exists in an organism because of one or more disorders in that organism. [ OGMS:0000031 ]", - infoRef: "MONDO:0000001" + infoRef: "MONDO:0000001", }, { id: "4-Anatomical-category", predicate: "dcterms:subject", - type: "skos:Concept", + type: "pharmaWien:anatomicalCat", //subjectType: "Anatomical Category:", label: "Anatomical Category:", value: "", component: "selection", - commit: true, visible: true, + category: ["anatomicalCategory"], vocabulary: "anatomical_category", stateVoc: "anatomical_category", - info: "OMIT:0001001" + info: "OMIT:0001001", }, { @@ -787,7 +786,7 @@ const fields = [ description: "Anatomical entity, cross species", infoRef: "http://purl.bioontology.org/ontology/", info: - "anatomical entity UBERON:0001062 Biological entity that is either an individual member of a biological species or constitutes the structural organization of an individual member of a biological species. [ FMA:62955 http://orcid.org/0000-0001-9114-8737 ]" + "anatomical entity UBERON:0001062 Biological entity that is either an individual member of a biological species or constitutes the structural organization of an individual member of a biological species. [ FMA:62955 http://orcid.org/0000-0001-9114-8737 ]", }, { id: "4-Plant-anatomical-entity", @@ -812,7 +811,7 @@ const fields = [ description: "Plant anatomical entity", infoRef: "http://purl.bioontology.org/ontology/", info: - "plant anatomical entity PO:0025131 An anatomical entity that is or was part of a plant. [ CARO:0000000 POC:curators ]" + "plant anatomical entity PO:0025131 An anatomical entity that is or was part of a plant. [ CARO:0000000 POC:curators ]", }, { id: "4-Fungal-structure", @@ -837,7 +836,7 @@ const fields = [ description: "Anatomical entity, fungi", info: "The parts of fungi.", - infoRef: "http://purl.bioontology.org/ontology/MESH/D056229" + infoRef: "http://purl.bioontology.org/ontology/MESH/D056229", }, { id: "4-Bacterial-structures", @@ -861,7 +860,7 @@ const fields = [ subcategory: ["Bacterial structures"], description: "Anatomical entity, bacteria", info: "The parts of bacteria.", - infoRef: "http://purl.bioontology.org/ontology/MESH/D056226" + infoRef: "http://purl.bioontology.org/ontology/MESH/D056226", }, { id: "4-Viral-structures", @@ -885,7 +884,7 @@ const fields = [ subcategory: ["Viral structures"], description: "Viral structures", info: "The parts of bacteria.", - infoRef: "" + infoRef: "", }, { id: "5-Molecular-function", @@ -909,7 +908,7 @@ const fields = [ description: "GO Molecular Function:", infoRef: "http://purl.obolibrary.org/obo/GO_0003674", info: - "A molecular process that can be carried out by the action of a single macromolecular machine, usually via direct physical interactions with other molecular entities. Function in this sense denotes an action, or activity, that a gene product (or a complex) performs. These actions are described from two distinct but related perspectives: (1) biochemical activity, and (2) role as a component in a larger system/process." + "A molecular process that can be carried out by the action of a single macromolecular machine, usually via direct physical interactions with other molecular entities. Function in this sense denotes an action, or activity, that a gene product (or a complex) performs. These actions are described from two distinct but related perspectives: (1) biochemical activity, and (2) role as a component in a larger system/process.", }, { id: "5-Biological-process", @@ -933,7 +932,7 @@ const fields = [ freefield: true, infoRef: "http://purl.obolibrary.org/obo/GO_0003674", info: - "A biological process represents a specific objective that the organism is genetically programmed to achieve. Biological processes are often described by their outcome or ending state, e.g., the biological process of cell division results in the creation of two daughter cells (a divided cell) from a single parent cell. A biological process is accomplished by a particular set of molecular functions carried out by specific gene products (or macromolecular complexes), often in a highly regulated manner and in a particular temporal sequence." + "A biological process represents a specific objective that the organism is genetically programmed to achieve. Biological processes are often described by their outcome or ending state, e.g., the biological process of cell division results in the creation of two daughter cells (a divided cell) from a single parent cell. A biological process is accomplished by a particular set of molecular functions carried out by specific gene products (or macromolecular complexes), often in a highly regulated manner and in a particular temporal sequence.", }, { id: "5-Cellular-component", @@ -957,7 +956,7 @@ const fields = [ description: "GO Cellular Component:", infoRef: "http://purl.obolibrary.org/obo/GO_0005575", info: - "A location, relative to cellular compartments and structures, occupied by a macromolecular machine when it carries out a molecular function. There are two ways in which the gene ontology describes locations of gene products: (1) relative to cellular structures (e.g., cytoplasmic side of plasma membrane) or compartments (e.g., mitochondrion), and (2) the stable macromolecular complexes of which they are parts (e.g., the ribosome). [ Sao Paulo MCA-MR Syndrome (ilx_0637672)" + "A location, relative to cellular compartments and structures, occupied by a macromolecular machine when it carries out a molecular function. There are two ways in which the gene ontology describes locations of gene products: (1) relative to cellular structures (e.g., cytoplasmic side of plasma membrane) or compartments (e.g., mitochondrion), and (2) the stable macromolecular complexes of which they are parts (e.g., the ribosome). [ Sao Paulo MCA-MR Syndrome (ilx_0637672)", }, { id: "6-Chemical-entities", @@ -980,7 +979,7 @@ const fields = [ subcategory: ["Chemical Entities"], info: "A chemical entity is a physical entity of interest in chemistry including molecular entities, parts thereof, and chemical substances. ", - description: "Chemical entity" + description: "Chemical entity", }, /* { id: "6-Atom", @@ -1042,7 +1041,7 @@ const fields = [ freefield: true, category: ["chebi"], subcategory: ["Role"], - description: "Role" + description: "Role", }, { id: "6-Subatomic-particle", @@ -1064,7 +1063,7 @@ const fields = [ freefield: true, infoRef: "http://purl.obolibrary.org/obo/CHEBI_36342", info: "A particle smaller than an atom.", - description: "subatomic particle" + description: "subatomic particle", }, { id: "7-Technique", @@ -1085,7 +1084,7 @@ const fields = [ freefield: true, infoRef: "http://www.ontobee.org/ontology/NCIT?iri=http://purl.obolibrary.org/obo/NCIT_C20368", - info: "Technique used in the laboratory for scientific research. " + info: "Technique used in the laboratory for scientific research. ", }, { id: "8-Discipline", @@ -1105,7 +1104,7 @@ const fields = [ category: ["discipline"], description: "Occupation or Discipline:", infoRef: "http://purl.obolibrary.org/obo/NCIT_C19160", - info: "Info here " + info: "Info here ", }, { @@ -1122,7 +1121,7 @@ const fields = [ info: "The endpoint is a quantitive or qualitative interpretable standardized representation of a perturbation (a change from a defined reference state of a closed model system) that is measured by the bioassay. An endpoint consists of a series of data points, one for each perturbing agent (screened entity) tested the assay.", infoRef: "http://www.bioassayontology.org/bao#BAO_0000179", - description: "Assay result:" + description: "Assay result:", }, { @@ -1134,6 +1133,7 @@ const fields = [ required: false, removable: false, category: ["assay"], + label: "Assay title:", value: "", component: "text-field", @@ -1141,7 +1141,7 @@ const fields = [ info: "The name of a bioassay which is associated with each assay ID (AID). It contains information about the target tested, the stage of the assay (primary or confirmatory), the assay format (biochemical or cell based), etc.", infoRef: - "https://www.ebi.ac.uk/ols/ontologies/bao/terms?iri=http%3A%2F%2Fwww.bioassayontology.org%2Fbao%23BAO_0000521" + "https://www.ebi.ac.uk/ols/ontologies/bao/terms?iri=http%3A%2F%2Fwww.bioassayontology.org%2Fbao%23BAO_0000521", }, { id: "0-Assay-protocol", @@ -1156,10 +1156,11 @@ const fields = [ component: "text-field", multiline: true, category: ["assay"], + info: "This includes the methodology used to perform a particular bioassay and is found on the PubChem website associated with each assay ID (AID). It includes the assay components and the order in which they were added, the incubation times, detection method and the kit used, etc.", infoRef: "http://www.bioassayontology.org/bao#BAO_0000523", - description: "Assay target abstract:" + description: "Assay target abstract:", }, { id: "0-Bioassay-type", @@ -1174,11 +1175,12 @@ const fields = [ commit: true, visible: true, category: ["assay"], + subcategory: ["Assay type"], vocabulary: "bioassay_type", stateVoc: "bioassay_type", info: "", description: "Bioassay type:", - infoRef: "" + infoRef: "", }, { id: "0-Bioassay-category", @@ -1194,11 +1196,12 @@ const fields = [ ontology: "bao", ontClass: "BAO_0000015", category: ["assay"], + subcategory: ["Bioassay category:"], topId: "BAO_0000015", description: "Bioassay category:", info: "General assay types like enzyme assay and their subtypes like kinase activity assay", - infoRef: "http://www.bioassayontology.org/bao#BAO_0000015" + infoRef: "http://www.bioassayontology.org/bao#BAO_0000015", }, { id: "0-Assay-format", @@ -1216,9 +1219,10 @@ const fields = [ topId: "BAO_0000019", description: "Assay format:", category: ["assay"], + subcategory: ["Bioassay format:"], info: "Assay format is a conceptualization of assays based on the biological and / or chemical features of the experimental system. For example assay formats include biochemical assays - referring to assays with purified protein, cell-based - referring to assays in whole cells, or organism-based - referring to assays performed in an organism.", - infoRef: "http://www.bioassayontology.org/bao#BAO_0000019" + infoRef: "http://www.bioassayontology.org/bao#BAO_0000019", }, { id: "0-Assay-design-method", @@ -1237,9 +1241,11 @@ const fields = [ //category: ["assay"], topId: "BAO_0002202", description: "Assay design method:", + category: ["assay"], + subcategory: ["Bioassay design method:"], info: "The assay design method describes how a biological or physical process screened / investigated in the model system is translated into a detectable signal. This relates to the technology / technologies used to make the assay system work, i.e. enable that the screened process can be detected. It typically involves some manipulation of the (biological) model system to detect the process of interest.", - infoRef: "http://www.bioassayontology.org/bao#BAO_0002202" + infoRef: "http://www.bioassayontology.org/bao#BAO_0002202", }, { @@ -1254,6 +1260,7 @@ const fields = [ freefield: true, component: "ext-service", category: ["assay"], + subcategory: ["Computational method:"], ontology: "bao", //baseurl: "http://www.bioassayontology.org/bao#", ontClass: "BAO_0002094", @@ -1261,7 +1268,7 @@ const fields = [ description: "Computational method", info: "Method based on the application of information technology to chemistry and biology.", - infoRef: "http://www.bioassayontology.org/bao#BAO_0002094" + infoRef: "http://www.bioassayontology.org/bao#BAO_0002094", }, { id: "0-Assay-screening-campaign-stage", @@ -1278,16 +1285,17 @@ const fields = [ ontClass: "BAO_0000029", topId: "BAO_0000029", category: ["assay"], + subcategory: ["Assay screening campaign stage:"], // baseurl: "http://www.bioassayontology.org/bao#", description: "Assay screening campaign stage:", info: "The assay stage describes the purpose of the assay in an assay campaign. Assay stage also relates to the order of assays in a screening campaign. For example the primary assay, which is performed first, identifies hits. The primary hits are then confirmed in a confirmatory assay. Subsequent secondary assays are run to eliminate compounds that are not of interest or to confirm hits using an alternate design / technology, or to further characterize compounds. Whether an assay is run in single concentration or concentration response is defined in the class 'assay measurement throughput quality'. For example primary assays are typically run in single concentration with single measurements. However, the NCGC runs qHTS primary assays as concentration-response assays.", - infoRef: "http://www.bioassayontology.org/bao#BAO_0000029" + infoRef: "http://www.bioassayontology.org/bao#BAO_0000029", }, { id: "0-Organism", predicate: "dcterms:subject", - type: "pharmaWien:assayOrg", + type: "pharmaWien:assayOrganism", //subjectType: "AssayOrganism:", label: "Bioassay organism", //description: "selection", @@ -1298,41 +1306,19 @@ const fields = [ visible: true, vocabulary: "assay_organism", stateVoc: "assay_organism", - category: ["assay"], + category: ["assayOrganism"], subcategory: ["assayOrganism"], multiplicable: true, info: "The organism related to the target / meta-target of the bioassay. It includes both bacterium and eukaryote.", infoRef: "http://www.bioassayontology.org/bao#BAO:0000551", - description: "Bioassay organism:" - }, - { - id: "0-Organism-assayTarget", - predicate: "dcterms:subject", - type: "pharmaWien:assayTarget_organism", - //subjectType: "AssayOrganism:", - label: "Assay Target Organism", - description: "Bioassay Target organism", - value: "", - component: "selection", - freefield: false, - commit: true, - visible: false, - vocabulary: "assayTarget_organism", - stateVoc: "organism_assay_target", - category: ["assayTarget"], - subcategory: ["organismAssayTarget"], - multiplicable: true, - info: - "The organism related to the target / meta-target of the bioassay. It includes both bacterium and eukaryote.", - infoRef: "BAO:0000551" + description: "selection", }, { id: "0-Cellular-organism", predicate: "dcterms:subject", - type: "pharmaWien:assayOrganism_CellularOrganism", - //subjectType: "AssayCellularOrganism", - label: "Cellular organism", + type: "pharmaWien:assayOrgCellular", + label: "Bioassay Cellular organism", value: "", required: false, visible: false, @@ -1341,17 +1327,16 @@ const fields = [ ontClass: "NCBITaxon_131567", topId: "NCBITaxon_131567", component: "ext-service", - category: ["assay"], - subcategory: ["assayOrganism"], - description: "Bioassay organism:", - info: "" + category: ["assayOrganism"], + subcategory: ["Cellular organism"], + description: "Cellular organism", + info: "", }, { id: "0-Viruses", predicate: "dcterms:subject", - type: "pharmaWien:assayOrganism_Viruses", - //subjectType: "AssayViruses", - label: "Viruses", + type: "pharmaWien:assayOrgViruses", + label: "Bioassay Viruses", value: "", required: false, visible: false, @@ -1360,17 +1345,16 @@ const fields = [ ontClass: "NCBITaxon_10239", topId: "NCBITaxon_10239", component: "ext-service", - category: ["assay"], - subcategory: ["assayOrganism"], + category: ["assayOrganism"], + subcategory: ["Viruses"], description: "Viruses", - info: "" + info: "", }, { id: "0-Viroids", predicate: "dcterms:subject", - type: "pharmaWien:assayOrganism_Viroids", - //subjectType: "AssayViroids", - label: "Viroids", + type: "pharmaWien:assayOrgViroids", + label: "Bioassay Viroids", value: "", freefield: true, required: false, @@ -1379,11 +1363,35 @@ const fields = [ ontClass: "NCBITaxon_12884", topId: "NCBITaxon_12884", component: "ext-service", - category: ["assay"], - subcategory: ["assayOrganism"], + category: ["assayOrganism"], + subcategory: ["Viroids"], description: "Viroids", - info: "" + infoRef: "NCBITaxon_12884", + info: "", + }, + { + id: "0-Organism-assayTarget", + predicate: "dcterms:subject", + type: "pharmaWien:assayTargetOrganism", + //subjectType: "AssayOrganism:", + label: "Assay Target Organism", + description: "Bioassay Target organism", + value: "", + component: "selection", + freefield: false, + commit: true, + visible: false, + vocabulary: "assayTarget_organism", + stateVoc: "organism_assay_target", + category: ["assayTarget"], + subcategory: ["organismAssayTarget"], + multiplicable: true, + info: + "The organism related to the target / meta-target of the bioassay. It includes both bacterium and eukaryote.", + infoRef: "BAO:0000551", }, + + { id: "0-cell-line", predicate: "dcterms:subject", @@ -1397,10 +1405,12 @@ const fields = [ ontology: "cellosaurus", ontClass: "", treeview: false, + category: ["assay"], + subcategory: ["Cultured Cell"], description: "Cultured Cell (cellosaurus)", info: "A cell in vitro that is or has been maintained or propagated as part of a cell culture. [ ReO:mhb ]", - infoRef: "http://purl.obolibrary.org/obo/CL_0000010" + infoRef: "http://purl.obolibrary.org/obo/CL_0000010", }, { id: "0-Assay-target", @@ -1417,8 +1427,9 @@ const fields = [ visible: true, vocabulary: "assay_target", category: ["assayTarget"], + subcategory: ["assayTarget"], stateVoc: "assay_target", - info: "" + info: "", //baseurl: "http://www.bioassayontology.org/bao#", //description: "Assay target:" }, @@ -1438,8 +1449,9 @@ const fields = [ freetext: true, component: "ext-service", category: ["assayTarget"], + subcategory: ["Assay target Small Molecule"], description: "Small Molecule", - info: "NCIT:C48809" + info: "NCIT:C48809", }, { id: "0-cellular-anatomical-entity", @@ -1455,11 +1467,12 @@ const fields = [ topId: "GO_0110165", component: "ext-service", category: ["assayTarget"], + subcategory: ["Assay target cellular anatomical entity"], freefield: true, multiple: true, description: "Cellular anatomical entity", info: "", - infoRef: "http://purl.obolibrary.org/obo/GO_0110165" + infoRef: "http://purl.obolibrary.org/obo/GO_0110165", }, { id: "0-tissue", @@ -1477,10 +1490,11 @@ const fields = [ topId: "NCIT_C12801", component: "ext-service", category: ["assayTarget"], + subcategory: ["assay target Tissue"], description: "Tissue", info: "An anatomical structure consisting of similarly specialized cells and intercellular matrix, aggregated according to genetically determined spatial relationships, performing a specific function. [ NCI ]", - infoRef: "NCIT:C12801" + infoRef: "NCIT:C12801", }, { id: "0-carbohydrate", @@ -1498,38 +1512,39 @@ const fields = [ topId: "CHEBI_16646", component: "ext-service", category: ["assayTarget"], + subcategory: ["Assay Target Carbohydrate"], description: "Carbohydrate", info: "An anatomical structure consisting of similarly specialized cells and intercellular matrix, aggregated according to genetically determined spatial relationships, performing a specific function. [ NCI ]", - infoRef: "NCIT:C12801" + infoRef: "NCIT:C12801", }, { id: "0-detection", predicate: "dcterms:subject", - type: "pharmaWien:assay_detection", + type: "pharmaWien:assayDetection", //subjectType: "assay_detection", label: "Detection method:", description: "selection", value: "", required: false, visible: true, - freefield: false, commit: true, visible: true, vocabulary: "assay_detection", stateVoc: "assay_detection", category: ["assayDetection"], + subcategory: ["Detection"], multiplicable: true, component: "selection", info: "The physical method (technology) used to measure / readout the effect caused by a perturbagen in the assay environment.", - infoRef: "" + infoRef: "", }, { id: "0-detection_method", predicate: "dcterms:subject", - type: "pharmaWien:assay_physicalDetectionMethod", + type: "pharmaWien:assayPhysicalDetectionMethod", //subjectType: "physical_detection_method", label: "Physical detection method:", value: "", @@ -1542,9 +1557,10 @@ const fields = [ topId: "BAO_0000035", component: "ext-service", category: ["assayDetection"], + subcategory: ["Detection Method"], description: "Physical detection method", info: "", - infoRef: "http://www.bioassayontology.org/bao#BAO_0000035" + infoRef: "http://www.bioassayontology.org/bao#BAO_0000035", }, { id: "0-detection_instrument", @@ -1562,10 +1578,11 @@ const fields = [ topId: "BAO_0000697", component: "ext-service", category: ["assayDetection"], + subcategory: ["Detection Instrument"], description: "Detection instrument", info: "", - infoRef: "http://www.bioassayontology.org/bao#BAO_0000697" - } + infoRef: "http://www.bioassayontology.org/bao#BAO_0000697", + }, ]; const predicateOrder = [ @@ -1637,16 +1654,16 @@ const predicateOrder = [ "frapo:hasFundingAgency", "frapo:isOutputOf", "rdax:P00009", - "citation" + "citation", ]; export default { - getFields: function() { + getFields: function () { return fields; }, - getEditableFields: function() { - var editable = fields.filter(item => !item.readonly); + getEditableFields: function () { + var editable = fields.filter((item) => !item.readonly); // hack: some bug in vuetify autocomplete can't handle the value property var newarr = []; for (var i = 0; i < editable.length; i++) { @@ -1656,7 +1673,7 @@ export default { } return newarr; }, - getField: function(id, ordergroup) { + getField: function (id, ordergroup) { for (var i = 0; i < fields.length; i++) { if (fields[i]["id"] === id) { var field = JSON.parse(JSON.stringify(fields[i])); @@ -1666,7 +1683,7 @@ export default { } } }, - getFieldbySubject: function(subject) { + getFieldbySubject: function (subject) { for (var i = 0; i < fields.length; i++) { if (fields[i]["type"] === subject) { var field = JSON.parse(JSON.stringify(fields[i])); @@ -1675,7 +1692,7 @@ export default { } } }, - getFieldsLabelsbyCateg: function(categ) { + getFieldsLabelsbyCateg: function (categ) { var ar = []; for (var i = 0; i < fields.length; i++) { @@ -1683,14 +1700,14 @@ export default { if (fields[i]["category"][0] === categ) { ar.push({ label: fields[i].description, - id: fields[i].infoRef + id: fields[i].infoRef, }); } } } return ar; }, - getPredicateOrder: function() { + getPredicateOrder: function () { return predicateOrder; - } + }, }; diff --git a/src/utils/json-ld.js b/src/utils/json-ld.js index 1eb19dc18f83341d67729fff8b8d60c5b3b39495..3920b0e14f661adb431e61fc52aca6670bac02c8 100644 --- a/src/utils/json-ld.js +++ b/src/utils/json-ld.js @@ -1,7 +1,7 @@ import fields from "./fields"; export default { - json2components: function (jsonld, options) { + json2components: function(jsonld, options) { var components = []; // all dce:subjects in the same language are handled by 1 component @@ -47,7 +47,7 @@ export default { components.push(f); break; - // dcterms:type + // dcterms:type case "dcterms:type": //take this off ISA /* f = fields.getField("resource-type"); @@ -58,7 +58,7 @@ export default { components.push({}); break; - // edm:hasType + // edm:hasType case "edm:hasType": f = fields.getField("object-type"); for (let em of value[i]["skos:exactMatch"]) { @@ -67,7 +67,7 @@ export default { components.push(f); break; - // schema:genre + // schema:genre case "schema:genre": f = fields.getField("genre"); for (let em of value[i]["skos:exactMatch"]) { @@ -76,7 +76,7 @@ export default { components.push(f); break; - // oaire:version + // oaire:version case "oaire:version": f = fields.getField("version-type"); for (let em of value[i]["skos:exactMatch"]) { @@ -85,7 +85,7 @@ export default { components.push(f); break; - // dcterms:accessRights + // dcterms:accessRights case "dcterms:accessRights": f = fields.getField("access-right"); for (let em of value[i]["skos:exactMatch"]) { @@ -94,7 +94,7 @@ export default { components.push(f); break; - // dce:title + // dce:title case "dce:title": if ( value[i]["@type"] === "bf:Title" || @@ -106,9 +106,9 @@ export default { if (value[i]["bf:mainTitle"]) { for (j = 0; j < value[i]["bf:mainTitle"].length; j++) { f.title = value[i]["bf:mainTitle"][j]["@value"]; - f.language = value[i]["bf:mainTitle"][j]["@language"] ? - value[i]["bf:mainTitle"][j]["@language"] : - "eng"; + f.language = value[i]["bf:mainTitle"][j]["@language"] + ? value[i]["bf:mainTitle"][j]["@language"] + : "eng"; } } if (value[i]["bf:subtitle"]) { @@ -120,7 +120,7 @@ export default { } break; - // bf:note + // bf:note case "bf:note": switch (value[i]["@type"]) { case "bf:Note": @@ -145,26 +145,26 @@ export default { for (let prefLabel of value[i]["skos:prefLabel"]) { f.value = prefLabel["@value"]; - f.language = prefLabel["@language"] ? - prefLabel["@language"] : - ""; + f.language = prefLabel["@language"] + ? prefLabel["@language"] + : ""; } components.push(f); break; - // bf:tableOfContents + // bf:tableOfContents case "bf:tableOfContents": f = fields.getField("table-of-contents"); for (let prefLabel of value[i]["skos:prefLabel"]) { f.value = prefLabel["@value"]; - f.language = prefLabel["@language"] ? - prefLabel["@language"] : - ""; + f.language = prefLabel["@language"] + ? prefLabel["@language"] + : ""; } components.push(f); break; - // dcterms:language + // dcterms:language case "dcterms:language": f = fields.getField("language"); for (j = 0; j < value[i].length; j++) { @@ -173,7 +173,7 @@ export default { components.push(f); break; - // schema:subtitleLanguage + // schema:subtitleLanguage case "schema:subtitleLanguage": f = fields.getField("subtitle-language"); for (j = 0; j < value[i].length; j++) { @@ -182,15 +182,14 @@ export default { components.push(f); break; - // dce:subject + // dce:subject case "dce:subject": // noop - we handled this already break; - // dcterms:subject + // dcterms:subject case "dcterms:subject": if (value[i]["@type"] === "skos:Concept") { - //ISA THAT THIS OFF FOR NOW /* f = fields.getField("vocab-ext-readonly"); f["skos:exactMatch"] = value[i]["skos:exactMatch"]; @@ -215,7 +214,6 @@ export default { } else if (value[i]["@type"] === "phaidra:Subject") { // ignore, handled elsewhere } else { - } break; @@ -307,7 +305,7 @@ export default { let entity = { id: "contained-in-role-" + roleidx, role: key, - ordergroup: "contained-in-role" + ordergroup: "contained-in-role", }; if (role["schema:name"]) { for (let name of role["schema:name"]) { @@ -386,17 +384,17 @@ export default { components.push(f); break; - // dcterms:temporal + // dcterms:temporal case "dcterms:temporal": f = fields.getField("temporal-coverage"); f.value = value[i]["@value"]; - f.language = value[i]["@language"] ? - value[i]["@language"] : - "eng"; + f.language = value[i]["@language"] + ? value[i]["@language"] + : "eng"; components.push(f); break; - // spatial + // spatial case "dcterms:spatial": case "vra:placeOfCreation": case "vra:placeOfRepository": @@ -410,9 +408,9 @@ export default { f.type = key; for (j = 0; j < value[i]["skos:prefLabel"].length; j++) { f.value = value[i]["skos:prefLabel"][j]["@value"]; - f.language = value[i]["skos:prefLabel"][j]["@language"] ? - value[i]["skos:prefLabel"][j]["@language"] : - "eng"; + f.language = value[i]["skos:prefLabel"][j]["@language"] + ? value[i]["skos:prefLabel"][j]["@language"] + : "eng"; } components.push(f); } else { @@ -442,7 +440,7 @@ export default { } break; - // dce:format + // dce:format case "dce:format": f = fields.getField("dce-format-vocab"); for (let em of value[i]["skos:exactMatch"]) { @@ -451,7 +449,7 @@ export default { components.push(f); break; - // rdau:P60048 + // rdau:P60048 case "rdau:P60048": f = fields.getField("carrier-type"); for (let em of value[i]["skos:exactMatch"]) { @@ -460,7 +458,7 @@ export default { components.push(f); break; - // edm:rights + // edm:rights case "edm:rights": f = fields.getField("license"); f.vocabulary = "alllicenses"; @@ -468,17 +466,17 @@ export default { components.push(f); break; - // dce:rights + // dce:rights case "dce:rights": f = fields.getField("rights"); f.value = value[i]["@value"]; - f.language = value[i]["@language"] ? - value[i]["@language"] : - "eng"; + f.language = value[i]["@language"] + ? value[i]["@language"] + : "eng"; components.push(f); break; - // bf:provisionActivity + // bf:provisionActivity case "bf:provisionActivity": f = fields.getField("bf-publication"); if (value[i]["bf:agent"]) { @@ -526,16 +524,16 @@ export default { components.push(f); break; - // citation + // citation case "cito:cites": case "cito:isCitedBy": f = fields.getField("citation"); f.type = key; for (let prefLabel of value[i]["skos:prefLabel"]) { f.citation = prefLabel["@value"]; - f.citationLanguage = prefLabel["@language"] ? - prefLabel["@language"] : - ""; + f.citationLanguage = prefLabel["@language"] + ? prefLabel["@language"] + : ""; } for (let em of value[i]["skos:exactMatch"]) { f.identifier = em; @@ -543,7 +541,7 @@ export default { components.push(f); break; - // rdau:P60227 + // rdau:P60227 case "rdau:P60227": f = fields.getField("movieadaptation"); if (value[i]["dce:title"]) { @@ -595,7 +593,7 @@ export default { components.push(f); break; - // frapo:hasFundingAgency + // frapo:hasFundingAgency case "frapo:hasFundingAgency": if (value[i]["@type"] === "frapo:FundingAgency") { //ISA take here off @@ -618,7 +616,7 @@ export default { } break; - // frapo:isOutputOf + // frapo:isOutputOf case "frapo:isOutputOf": if (value[i]["@type"] === "foaf:Project") { //ISA take here off @@ -677,10 +675,10 @@ export default { for (j = 0; j < value[i]["skos:prefLabel"].length; j++) { f.name = value[i]["skos:prefLabel"][j]["@value"]; f.nameLanguage = value[i]["skos:prefLabel"][j][ - "@language" - ] ? - value[i]["skos:prefLabel"][j]["@language"] : - "eng"; + "@language" + ] + ? value[i]["skos:prefLabel"][j]["@language"] + : "eng"; } } if (value[i]["skos:notation"]) { @@ -693,7 +691,7 @@ export default { } break; - // rdax:P00009 + // rdax:P00009 case "rdax:P00009": f = fields.getField("association"); for (let em of value[i]["skos:exactMatch"]) { @@ -702,21 +700,21 @@ export default { components.push(f); break; - // dcterms:provenance + // dcterms:provenance case "dcterms:provenance": if (value[i]["@type"] === "dcterms:ProvenanceStatement") { f = fields.getField("provenance"); for (j = 0; j < value[i]["skos:prefLabel"].length; j++) { f.value = value[i]["skos:prefLabel"][j]["@value"]; - f.language = value[i]["skos:prefLabel"][j]["@language"] ? - value[i]["skos:prefLabel"][j]["@language"] : - "eng"; + f.language = value[i]["skos:prefLabel"][j]["@language"] + ? value[i]["skos:prefLabel"][j]["@language"] + : "eng"; } components.push(f); } break; - // schema:numberOfPages + // schema:numberOfPages case "schema:numberOfPages": f = fields.getField("number-of-pages"); f.label = key; @@ -724,7 +722,7 @@ export default { components.push(f); break; - // bf:soundCharacteristic + // bf:soundCharacteristic case "bf:soundCharacteristic": f = fields.getField("sound-characteristic"); f.label = key; @@ -732,31 +730,31 @@ export default { components.push(f); break; - // bf:supplementaryContent + // bf:supplementaryContent case "bf:supplementaryContent": f = fields.getField("supplementary-content"); for (j = 0; j < value[i]["skos:prefLabel"].length; j++) { f.value = value[i]["skos:prefLabel"][j]["@value"]; - f.language = value[i]["skos:prefLabel"][j]["@language"] ? - value[i]["skos:prefLabel"][j]["@language"] : - "eng"; + f.language = value[i]["skos:prefLabel"][j]["@language"] + ? value[i]["skos:prefLabel"][j]["@language"] + : "eng"; } components.push(f); break; - // bf:awards + // bf:awards case "bf:awards": f = fields.getField("award"); for (j = 0; j < value[i]["skos:prefLabel"].length; j++) { f.value = value[i]["skos:prefLabel"][j]["@value"]; - f.language = value[i]["skos:prefLabel"][j]["@language"] ? - value[i]["skos:prefLabel"][j]["@language"] : - "eng"; + f.language = value[i]["skos:prefLabel"][j]["@language"] + ? value[i]["skos:prefLabel"][j]["@language"] + : "eng"; } components.push(f); break; - // rdau:P60059 + // rdau:P60059 case "rdau:P60059": f = fields.getField("regional-encoding"); for (let em of value[i]["skos:exactMatch"]) { @@ -765,7 +763,7 @@ export default { components.push(f); break; - // ebucore:filename + // ebucore:filename case "ebucore:filename": f = fields.getField("filename"); f.predicate = key; @@ -774,7 +772,7 @@ export default { components.push(f); break; - // ebucore:hasMimeType + // ebucore:hasMimeType case "ebucore:hasMimeType": f = fields.getField("mime-type"); for (j = 0; j < value[i].length; j++) { @@ -783,7 +781,7 @@ export default { components.push(f); break; - // opaque:cco_accessionNumber + // opaque:cco_accessionNumber case "opaque:cco_accessionNumber": f = fields.getField("accession-number"); for (j = 0; j < value[i].length; j++) { @@ -792,7 +790,7 @@ export default { components.push(f); break; - // bf:shelfMark + // bf:shelfMark case "bf:shelfMark": f = fields.getField("shelf-mark"); for (j = 0; j < value[i].length; j++) { @@ -801,41 +799,41 @@ export default { components.push(f); break; - // bf:physicalLocation + // bf:physicalLocation case "bf:physicalLocation": f = fields.getField("physical-location"); f.value = value[i]["@value"]; - f.language = value[i]["@language"] ? - value[i]["@language"] : - "eng"; + f.language = value[i]["@language"] + ? value[i]["@language"] + : "eng"; components.push(f); break; - // rdau:P60550 + // rdau:P60550 case "rdau:P60550": f = fields.getField("extent"); f.value = value[i]["@value"]; - f.language = value[i]["@language"] ? - value[i]["@language"] : - "eng"; + f.language = value[i]["@language"] + ? value[i]["@language"] + : "eng"; components.push(f); break; - // vra:hasInscription + // vra:hasInscription case "vra:hasInscription": if (value[i]["@type"] === "vra:Inscription") { f = fields.getField("inscription"); for (j = 0; j < value[i]["skos:prefLabel"].length; j++) { f.value = value[i]["skos:prefLabel"][j]["@value"]; - f.language = value[i]["skos:prefLabel"][j]["@language"] ? - value[i]["skos:prefLabel"][j]["@language"] : - "eng"; + f.language = value[i]["skos:prefLabel"][j]["@language"] + ? value[i]["skos:prefLabel"][j]["@language"] + : "eng"; } components.push(f); } break; - // bf:scale + // bf:scale case "bf:scale": if (value[i]["@type"] === "bf:Scale") { f = fields.getField("scale"); @@ -846,15 +844,15 @@ export default { } break; - // vra:material + // vra:material case "vra:material": if (value[i]["@type"] === "vra:Material") { f = fields.getField("material-text"); for (j = 0; j < value[i]["skos:prefLabel"].length; j++) { f.value = value[i]["skos:prefLabel"][j]["@value"]; - f.language = value[i]["skos:prefLabel"][j]["@language"] ? - value[i]["skos:prefLabel"][j]["@language"] : - "eng"; + f.language = value[i]["skos:prefLabel"][j]["@language"] + ? value[i]["skos:prefLabel"][j]["@language"] + : "eng"; } components.push(f); } else { @@ -872,7 +870,7 @@ export default { } break; - // vra:hasTechnique + // vra:hasTechnique case "vra:hasTechnique": if ( value[i]["@type"] === "vra:Technique" && @@ -881,9 +879,9 @@ export default { f = fields.getField("technique-text"); for (j = 0; j < value[i]["skos:prefLabel"].length; j++) { f.value = value[i]["skos:prefLabel"][j]["@value"]; - f.language = value[i]["skos:prefLabel"][j]["@language"] ? - value[i]["skos:prefLabel"][j]["@language"] : - "eng"; + f.language = value[i]["skos:prefLabel"][j]["@language"] + ? value[i]["skos:prefLabel"][j]["@language"] + : "eng"; } components.push(f); } else { @@ -901,7 +899,7 @@ export default { } break; - // dcterms:audience + // dcterms:audience case "dcterms:audience": if ( value[i]["@type"] === "dcterms:audience" && @@ -910,9 +908,9 @@ export default { f = fields.getField("audience"); for (j = 0; j < value[i]["skos:prefLabel"].length; j++) { f.value = value[i]["skos:prefLabel"][j]["@value"]; - f.language = value[i]["skos:prefLabel"][j]["@language"] ? - value[i]["skos:prefLabel"][j]["@language"] : - "eng"; + f.language = value[i]["skos:prefLabel"][j]["@language"] + ? value[i]["skos:prefLabel"][j]["@language"] + : "eng"; } components.push(f); } else { @@ -930,7 +928,7 @@ export default { } break; - // schema:width + // schema:width case "schema:width": if (value[i]["@type"] === "schema:QuantitativeValue") { f = fields.getField("width"); @@ -944,7 +942,7 @@ export default { } break; - // schema:height + // schema:height case "schema:height": if (value[i]["@type"] === "schema:QuantitativeValue") { f = fields.getField("height"); @@ -958,7 +956,7 @@ export default { } break; - // schema:depth + // schema:depth case "schema:depth": if (value[i]["@type"] === "schema:QuantitativeValue") { f = fields.getField("depth"); @@ -972,7 +970,7 @@ export default { } break; - // dates + // dates case "dcterms:date": case "dcterms:created": case "dcterms:modified": @@ -995,7 +993,7 @@ export default { components.push({}); break; - // schema:duration + // schema:duration case "schema:duration": f = fields.getField("duration"); for (j = 0; j < value[i].length; j++) { @@ -1004,7 +1002,7 @@ export default { components.push(f); break; - // phaidra:systemTag + // phaidra:systemTag case "phaidra:systemTag": f = fields.getField("system-tag"); for (j = 0; j < value[i].length; j++) { @@ -1013,14 +1011,13 @@ export default { components.push(f); break; - // pages, handled insisde rdau:P60193 or rdau:P60101 + // pages, handled insisde rdau:P60193 or rdau:P60101 case "schema:pageStart": case "schema:pageEnd": // noop break; default: - // role //ISA off /*if (key.startsWith("role")) { @@ -1129,7 +1126,7 @@ export default { return components; }, - getOrderedComponents: function (components) { + getOrderedComponents: function(components) { var predicateOrder = fields.getPredicateOrder(); var ordered = []; var i; @@ -1148,11 +1145,11 @@ export default { } return ordered; }, - json2form: function (jsonld, options) { + json2form: function(jsonld, options) { var levels = { digital: { - components: [] - } + components: [], + }, }; levels.digital.components = this.json2components(jsonld, options); @@ -1167,7 +1164,7 @@ export default { var subcomp = this.json2components(value[i], options); if (subcomp.length > 0) { levels.subject.push({ - components: subcomp + components: subcomp, }); } } @@ -1176,7 +1173,7 @@ export default { }); var form = { - sections: [] + sections: [], }; console.log( "this.getOrderedComponents(levels.digital.components)", @@ -1187,7 +1184,7 @@ export default { form.sections.push({ title: "General metadata", id: 1, - fields: digitalFields + fields: digitalFields, }); if (levels["subject"]) { @@ -1199,7 +1196,7 @@ export default { title: "Subject", type: "phaidra:Subject", id: "subject-" + i, - fields: subjectFields + fields: subjectFields, }); } } @@ -1210,17 +1207,21 @@ export default { get_json_dce_title(type, title, subtitle, language) { var h = { "@type": type, - "bf:mainTitle": [{ - "@value": title - }] + "bf:mainTitle": [ + { + "@value": title, + }, + ], }; if (language) { h["bf:mainTitle"][0]["@language"] = language; } if (subtitle) { - h["bf:subtitle"] = [{ - "@value": subtitle - }]; + h["bf:subtitle"] = [ + { + "@value": subtitle, + }, + ]; if (language) { h["bf:subtitle"][0]["@language"] = language; } @@ -1272,7 +1273,7 @@ export default { h["skos:prefLabel"] = []; for (var j = 0; j < preflabels.length; j++) { h["skos:prefLabel"].push({ - "@value": preflabels[j] + "@value": preflabels[j], }); } } @@ -1341,7 +1342,7 @@ export default { }, get_json_valueobject(value, language) { var h = { - "@value": value + "@value": value, }; if (language) { @@ -1354,24 +1355,28 @@ export default { var h = { "@type": "schema:QuantitativeValue", "schema:unitCode": [unitCode], - "schema:value": [value] + "schema:value": [value], }; return h; }, get_json_role(type, firstname, lastname, institution, email, orcid) { var h = { - "@type": type + "@type": type, }; if (firstname) { - h["schema:givenName"] = [{ - "@value": firstname - }]; + h["schema:givenName"] = [ + { + "@value": firstname, + }, + ]; } if (lastname) { - h["schema:familyName"] = [{ - "@value": lastname - }]; + h["schema:familyName"] = [ + { + "@value": lastname, + }, + ]; } if (institution) { h["schema:affiliation"] = []; @@ -1380,9 +1385,11 @@ export default { } } if (email) { - h["schema:email"] = [{ - "@value": email - }]; + h["schema:email"] = [ + { + "@value": email, + }, + ]; } if (orcid) { h["skos:exactMatch"] = orcid; @@ -1392,13 +1399,15 @@ export default { }, get_json_general_description(description, descriptionLanguage) { var h = { - "@type": "bf:Note" + "@type": "bf:Note", }; if (description) { - h["skos:prefLabel"] = [{ - "@value": description - }]; + h["skos:prefLabel"] = [ + { + "@value": description, + }, + ]; if (descriptionLanguage) { h["skos:prefLabel"][0]["@language"] = descriptionLanguage; } @@ -1407,13 +1416,15 @@ export default { }, get_json_abstract(description, descriptionLanguage) { var h = { - "@type": "bf:Summary" + "@type": "bf:Summary", }; if (description) { - h["skos:prefLabel"] = [{ - "@value": description - }]; + h["skos:prefLabel"] = [ + { + "@value": description, + }, + ]; if (descriptionLanguage) { h["skos:prefLabel"][0]["@language"] = descriptionLanguage; } @@ -1429,21 +1440,25 @@ export default { homepage ) { var h = { - "@type": "foaf:Project" + "@type": "foaf:Project", }; if (name) { - h["skos:prefLabel"] = [{ - "@value": name - }]; + h["skos:prefLabel"] = [ + { + "@value": name, + }, + ]; if (nameLanguage) { h["skos:prefLabel"][0]["@language"] = nameLanguage; } } if (description) { - h["rdfs:comment"] = [{ - "@value": description - }]; + h["rdfs:comment"] = [ + { + "@value": description, + }, + ]; if (descriptionLanguage) { h["rdfs:comment"][0]["@language"] = descriptionLanguage; } @@ -1469,14 +1484,16 @@ export default { identifiers ) { var h = { - "@type": type + "@type": type, }; if (title) { let tit = { "@type": "bf:Title", - "bf:mainTitle": [{ - "@value": title - }] + "bf:mainTitle": [ + { + "@value": title, + }, + ], }; if (titleLanguage) { tit["bf:mainTitle"][0]["@language"] = titleLanguage; @@ -1513,22 +1530,26 @@ export default { lastname ) { var h = { - "@type": type + "@type": type, }; if (title) { let tit = { "@type": "bf:Title", - "bf:mainTitle": [{ - "@value": title - }] + "bf:mainTitle": [ + { + "@value": title, + }, + ], }; if (titleLanguage) { tit["bf:mainTitle"][0]["@language"] = titleLanguage; } if (subtitle) { - tit["bf:subtitle"] = [{ - "@value": subtitle - }]; + tit["bf:subtitle"] = [ + { + "@value": subtitle, + }, + ]; if (titleLanguage) { tit["bf:subtitle"][0]["@language"] = titleLanguage; } @@ -1537,22 +1558,28 @@ export default { } if (firstname || lastname || name) { let r = { - "@type": "schema:Person" + "@type": "schema:Person", }; if (firstname) { - r["schema:givenName"] = [{ - "@value": firstname - }]; + r["schema:givenName"] = [ + { + "@value": firstname, + }, + ]; } if (lastname) { - r["schema:familyName"] = [{ - "@value": lastname - }]; + r["schema:familyName"] = [ + { + "@value": lastname, + }, + ]; } if (name) { - r["schema:name"] = [{ - "@value": name - }]; + r["schema:name"] = [ + { + "@value": name, + }, + ]; } h[role] = [r]; } @@ -1560,23 +1587,27 @@ export default { }, get_json_bf_publication(publisherName, publishingPlace, publishingDate) { var h = { - "@type": "bf:Publication" + "@type": "bf:Publication", }; if (publisherName) { let pn = { "@type": "schema:Organization", - "schema:name": [{ - "@value": publisherName - }] + "schema:name": [ + { + "@value": publisherName, + }, + ], }; h["bf:agent"] = [pn]; } if (publishingPlace) { let pp = { "@type": "schema:Place", - "skos:prefLabel": [{ - "@value": publishingPlace - }] + "skos:prefLabel": [ + { + "@value": publishingPlace, + }, + ], }; h["bf:place"] = [pp]; } @@ -1588,12 +1619,14 @@ export default { }, get_json_study_plan(name, nameLanguage, notations) { var h = { - "@type": "aaiso:Programme" + "@type": "aaiso:Programme", }; if (name) { - h["skos:prefLabel"] = [{ - "@value": name - }]; + h["skos:prefLabel"] = [ + { + "@value": name, + }, + ]; if (nameLanguage) { h["skos:prefLabel"][0]["@language"] = nameLanguage; } @@ -1605,13 +1638,15 @@ export default { }, get_json_funder(name, nameLanguage, identifiers) { var h = { - "@type": "frapo:FundingAgency" + "@type": "frapo:FundingAgency", }; if (name) { - h["skos:prefLabel"] = [{ - "@value": name - }]; + h["skos:prefLabel"] = [ + { + "@value": name, + }, + ]; if (nameLanguage) { h["skos:prefLabel"][0]["@language"] = nameLanguage; } @@ -1691,7 +1726,7 @@ export default { //this.fields2json(jsonlds[jsonldid], s); } - Object.keys(jsonlds).forEach(function (key) { + Object.keys(jsonlds).forEach(function(key) { if (key.startsWith("subject-")) { if (Object.keys(jsonlds[key]).length > 1) { if (!jsonlds["container"]["dcterms:subject"]) { @@ -1720,7 +1755,7 @@ export default { if (s.type === "phaidra:Subject") { jsonldid = "subject-" + i; jsonlds[jsonldid] = { - "@type": "phaidra:Subject" + "@type": "phaidra:Subject", }; this.fields2json(jsonlds[jsonldid], s); } else { @@ -1728,7 +1763,7 @@ export default { } } - Object.keys(jsonlds).forEach(function (key) { + Object.keys(jsonlds).forEach(function(key) { if (key.startsWith("subject-")) { if (Object.keys(jsonlds[key]).length > 1) { if (!jsonlds["dcterms:subject"]) { @@ -1775,7 +1810,7 @@ export default { ); } break; - // dates + // dates case "date": case "dcterms:date": case "dcterms:created": @@ -1850,10 +1885,12 @@ export default { jsonld, f.predicate, this.get_json_object( - [{ - "@value": f.value, - "@language": f.language - }], + [ + { + "@value": f.value, + "@language": f.language, + }, + ], null, "skos:Concept" ) @@ -1864,7 +1901,6 @@ export default { case "dcterms:subject": if (f.value) { if (f.component === "ext-service") { - for (var k = 0; k < f.value.length; k++) { if (typeof f.value[k] !== "undefined") { if (f.value[k].geneName) { @@ -1907,14 +1943,10 @@ export default { } } } else if (f.component === "selection") { - - for (var m = 0; m < f.value.length; m++) { this.push_object(jsonld, f.predicate, f.value[m]); } - } else { - this.push_object( jsonld, f.predicate, @@ -1923,7 +1955,6 @@ export default { } } - break; case "frapo:isOutputOf": @@ -1973,13 +2004,15 @@ export default { if (f.value) { var mycontent = { "@type": "skos:Concept", - "skos: prefLabel": [{ - "@value": "container", - "@language": "eng" - }], + "skos:prefLabel": [ + { + "@value": "container", + "@language": "eng", + }, + ], "skos: exactMatch": [ - "https://pid.phaidra.org/vocabulary/8MY0-BQDQ" - ] + "https://pid.phaidra.org/vocabulary/8MY0-BQDQ", + ], }; this.push_object(jsonld, f.predicate, mycontent); @@ -2044,5 +2077,5 @@ export default { } } return jsonld; - } -}; \ No newline at end of file + }, +};