diff --git a/src/utils/fields.js b/src/utils/fields.js index 3ee730cc73497c6e6e35f61170f4a78d84184d0b..ecb099977bd1040bfcc316a9e9315253b315e5b8 100644 --- a/src/utils/fields.js +++ b/src/utils/fields.js @@ -176,7 +176,7 @@ const fields = [ predicate: "dcterms:subject", // predicate: "select", type: "skos:Concept", - subjectType: "BiologicalMacromolecule:", + //subjectType: "BiologicalMacromolecule:", label: "Biological macromolecule:", value: "", component: "selection", @@ -193,7 +193,7 @@ const fields = [ { id: "1-Uniprot", predicate: "dcterms:subject", - type: "pharmaWien:protein_uniprot", + type: "pharmaWien:uniprot_protein", //type: "skos:Concept", //subjectType: "protein_uniprot", // for freefield @type label: "Uniprot record", @@ -215,7 +215,7 @@ const fields = [ { id: "1-Isoform", predicate: "dcterms:subject", - type: "pharmaWien:isoform", + type: "pharmaWien:isoform_protein", subjectType: "isoform", label: "Isoform:", value: "", @@ -233,7 +233,7 @@ const fields = [ { id: "1-Protein-sequence-alteration", predicate: "dcterms:subject", - type: "pharmaWien:protein_ProteinSequenceAlteration", + type: "pharmaWien:proteinSequenceAlteration_protein", subjectType: "ProteinSequenceAlteration", label: "Protein Sequence alteration:", value: "", @@ -251,7 +251,7 @@ const fields = [ { id: "1-Protein-modification", predicate: "dcterms:subject", - type: "pharmaWien:protein_ProteinModifaction", + type: "pharmaWien:proteinModifaction_protein", subjectType: "ProteinModifaction", label: "Protein modifaction:", value: "", @@ -269,8 +269,8 @@ const fields = [ { id: "1-Entrez-gene-ID", predicate: "dcterms:subject", - type: "pharmaWien:gene_EntrezGene_ID", - subjectType: "EntrezGene_ID", + type: "pharmaWien:entrezGeneid_gene", + //subjectType: "EntrezGene_ID", label: "Entrez Gene_ID:", value: "", required: false, @@ -287,8 +287,8 @@ const fields = [ { id: "1-Gene-modification", predicate: "dcterms:subject", - type: "gene_GeneModification", - subjectType: "GeneModification", + type: "pharmaWien:modification_gene", + //subjectType: "GeneModification", label: "Gene modification:", value: "", required: false, @@ -305,8 +305,8 @@ const fields = [ { id: "1-Nucleic-acid-type", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "polynucl_nucleicAcidType", + type: "pharmaWien:nucleicAcidType_polyNucl", + //subjectType: "polynucl_nucleicAcidType", label: "Nucleic acid type:", value: "", text: "", @@ -326,8 +326,8 @@ const fields = [ { id: "1-RefSeq-accession", predicate: "dcterms:subject", - type: "RefSeqAccession", - subjectType: "polynucl_RefSeqAccession", + type: "pharmaWien:refSeqAccession_polynucl", + //subjectType: "polynucl_RefSeqAccession", label: "RefSeq accession:", value: "", required: false, @@ -344,8 +344,8 @@ const fields = [ { id: "1-PFAM-accession", predicate: "dcterms:subject", - type: "PFAM_accession", - subjectType: "protFam_PFAMaccession", + type: "pharmaWien:PFAMaccession_protFam", + //subjectType: "protFam_PFAMaccession", label: "PFAM accession number:", value: "", required: false, @@ -362,8 +362,8 @@ const fields = [ { id: "1-Uniprot-protein-subunit", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "proteinSub_uniprot", + type: "pharmaWien:uniprot_proteinSub", + //subjectType: "proteinSub_uniprot", label: "Uniprot accession number:", value: "", text: "", @@ -382,8 +382,8 @@ const fields = [ { id: "1-Isoform-protein-subunit", predicate: "dcterms:subject", - type: "proteinSub_isoform", - subjectType: "isoform_proteinSub", + type: "pharmaWien:isoform_proteinSub", + //subjectType: "isoform_proteinSub", label: "Isoform:", value: "", required: false, @@ -401,8 +401,8 @@ const fields = [ { id: "1-Protein-sequence-alteration-protein-subunit", predicate: "dcterms:subject", - type: "proteinSub_ProteinSequenceAlteration", - subjectType: "ProteinSequenceAlteration_proteinSub", + type: "pharmaWien:proteinSequenceAlteration_proteinSub", + //subjectType: "ProteinSequenceAlteration_proteinSub", label: "Protein Sequence alteration:", value: "", required: false, @@ -420,8 +420,8 @@ const fields = [ { id: "1-Protein-modification-protein-subunit", predicate: "dcterms:subject", - type: "proteinSub_ProteinMod", - subjectType: "ProteinMod_proteinSub", + type: "pharmaWien:proteinMod_proteinSub", + //subjectType: "ProteinMod_proteinSub", label: "Protein modification:", value: "", required: false, @@ -439,8 +439,8 @@ const fields = [ { id: "1-Complex-portal-accession", predicate: "dcterms:subject", - type: "Complex-PortalAccession", - subjectType: "ProteinComplex_Complex-PortalAccession", + type: "pharmaWien:complexPortalAccession_proteinComplex", + //subjectType: "ProteinComplex_Complex-PortalAccession", label: "Complex-Portal Accession:", value: "", required: false, @@ -457,8 +457,8 @@ const fields = [ { id: "1-Polysaccharide", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "polysaccharide", + type: "pharmaWien:polysaccharide", + //subjectType: "polysaccharide", label: "Polysaccharide name:", value: "", text: "", @@ -478,8 +478,8 @@ const fields = [ { id: "1-Lipid", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "lipid", + type: "pharmaWien:lipid", + //subjectType: "lipid", label: "Lipid name:", value: "", text: "", @@ -498,8 +498,8 @@ const fields = [ { id: "2-Life", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "life", + type: "pharmaWien:life", + //subjectType: "life", label: "Life:", value: "", component: "selection", @@ -518,8 +518,8 @@ const fields = [ { id: "2-Living-organism", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "LivingOrganism", + type: "pharmaWien:LivingOrganism", + //subjectType: "LivingOrganism", label: "Living Organism:", value: "", visible: false, @@ -542,8 +542,8 @@ const fields = [ { id: "2-Viruses", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "LivingOrganismVirus", + type: "pharmaWien:LivingOrganismVirus", + //subjectType: "LivingOrganismVirus", label: "Viruses", value: "", visible: false, @@ -566,8 +566,8 @@ const fields = [ { id: "2-Viroids", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "LivingOrganismViroids", + type: "pharmaWien:LivingOrganismViroids", + //subjectType: "LivingOrganismViroids", label: "Viroids", value: "", visible: false, @@ -590,8 +590,8 @@ const fields = [ { id: "2-cellular-organisms", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "LivingOrganismCellularO", + type: "pharmaWien:LivingOrganismCellularO", + //subjectType: "LivingOrganismCellularO", label: "Cellular organisms", value: "", visible: false, @@ -614,8 +614,8 @@ const fields = [ { id: "2-otherSequences", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "LivingOrganism", + type: "pharmaWien:LivingOrganismOSeq", + //subjectType: "LivingOrganism", label: "other sequences:", value: "", visible: false, @@ -638,8 +638,8 @@ const fields = [ { id: "2-unclassifiedSequences", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "LivingOrganism", + type: "pharmaWien:LivingOrganismUSeq", + //subjectType: "LivingOrganism", label: "Unclassified sequences:", value: "", visible: false, @@ -662,8 +662,8 @@ const fields = [ { id: "2-cellosaurus", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "cellosaurus", + type: "pharmaWien:cellosaurus", + //subjectType: "cellosaurus", label: "Cellosaurus cell-line:", value: "", text: "", @@ -679,8 +679,8 @@ const fields = [ { id: "2-cultured-cell", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "cultured-cell", + type: "pharmaWien:cultured-cell", + //subjectType: "cultured-cell", label: "Cultured cell (CLO):", value: "", text: "", @@ -699,8 +699,8 @@ const fields = [ { id: "3-Disease", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "disease", + type: "pharmaWien:disease", + //subjectType: "disease", label: "Disease:", value: "", text: "", @@ -724,7 +724,7 @@ const fields = [ id: "4-Anatomical-category", predicate: "dcterms:subject", type: "skos:Concept", - subjectType: "Anatomical Category:", + //subjectType: "Anatomical Category:", label: "Anatomical Category:", value: "", component: "selection", @@ -739,8 +739,8 @@ const fields = [ { id: "4-Anatomical-entity", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "AnatomEntity", + type: "pharmaWien:AnatomEntity", + //subjectType: "AnatomEntity", label: "Anatomical entity:", visible: false, //visible: false, @@ -762,8 +762,8 @@ const fields = [ { id: "4-Plant-anatomical-entity", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "PlantAnat", + type: "pharmaWien:PlantAnat", + //subjectType: "PlantAnat", label: " Plant anatomical entity:", visible: false, //visible: false, @@ -785,8 +785,8 @@ const fields = [ { id: "4-Fungal-structure", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "FungStruct", + type: "pharmaWien:FungStruct", + //subjectType: "FungStruct", label: "Fungal structure:", //visible: true, visible: false, @@ -808,8 +808,8 @@ const fields = [ { id: "4-Bacterial-structures", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "BactStruct", + type: "pharmaWien:BactStruct", + //subjectType: "BactStruct", label: " Bacterial structures:", //visible: true, visible: false, @@ -831,8 +831,8 @@ const fields = [ { id: "4-Viral-structures", predicate: "dcterms:subject", - subjectType: "ViralStruct", - type: "skos:Concept", + //subjectType: "ViralStruct", + type: "pharmaWien:ViralStruct", label: "Viral structures:", //visible: true, visible: false, @@ -854,7 +854,7 @@ const fields = [ { id: "5-Molecular-function", predicate: "dcterms:subject", - type: "skos:Concept", + type: "pharmaWien:goBioProcess", subjectType: "goMolFunct", visible: true, label: "GO Molecular Function:", @@ -875,8 +875,8 @@ const fields = [ { id: "5-Biological-process", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "goBioProcess", + type: "pharmaWien:goBioProcess", + //subjectType: "goBioProcess", label: "GO Biological Process:", visible: true, value: "", @@ -897,8 +897,8 @@ const fields = [ { id: "5-Cellular-component", predicate: "dcterms:subject", - type: "skos:Concept", - subjectType: "goCellComp", + type: "pharmaWien:goCellComp", + //subjectType: "goCellComp", visible: true, label: "GO Cellular Component:", value: "", diff --git a/src/utils/json-ld.js b/src/utils/json-ld.js index fe3238b2bacaa508ba5329eb593e7d1d052c6bc9..8c155c56fb0fee2940f67d84053594ffe6f55232 100644 --- a/src/utils/json-ld.js +++ b/src/utils/json-ld.js @@ -1896,8 +1896,6 @@ export default { if (f.value) { if (f.component === "ext-service") { //if (f.type === "skos:Concept") { - console.log("here2", f.type); - //replace f.type for keeping track of categories //this is to take care of the fact that the getChildren response has still //detailed info we do not want sent to phaidra @@ -1937,15 +1935,14 @@ export default { delete f.value[k]["@hierarchicalAncestors"]; } - console.log("lala", f.value[k]["@type"], f.type); f.value[k]["@type"] = f.type; - console.log("lala2", f.value[k]["@type"]); + this.push_object(jsonld, f.predicate, f.value[k]); } } } else if (f.component === "selection") { - console.log("here3", f.value[k]); - this.push_object(jsonld, f.predicate, f.value[k]); + //console.log("selection", f.value); + this.push_object(jsonld, f.predicate, f.value[0]); } else { console.log("else", f); this.push_object(