From e1050dcd9d7de8b33728db7df16a3ec6a654a438 Mon Sep 17 00:00:00 2001 From: Sarath Menon Date: Tue, 28 Nov 2023 20:28:23 +0100 Subject: [PATCH] update ontology --- pyscal_rdf/network/ontology.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pyscal_rdf/network/ontology.py b/pyscal_rdf/network/ontology.py index 6d948e2..874a1f5 100644 --- a/pyscal_rdf/network/ontology.py +++ b/pyscal_rdf/network/ontology.py @@ -10,25 +10,25 @@ def read_ontology(): cmso = OntologyNetwork(os.path.join(file_location, 'data/cmso.owl')) pldo = OntologyNetwork(os.path.join(file_location, 'data/pldo.owl')) podo = OntologyNetwork(os.path.join(file_location, 'data/podo.owl')) - #msmo = OntologyNetwork('../pyscal_rdf/data/msmo.owl') + msmo = OntologyNetwork('../pyscal_rdf/data/msmo.owl') #combine them - #combo = cmso + pldo + podo + msmo - combo = cmso + pldo + podo + combo = cmso + pldo + podo + msmo + #combo = cmso + pldo + podo #add namespaces - #combo.add_namespace('prov', 'http://www.w3.org/ns/prov#') + combo.add_namespace('prov', 'http://www.w3.org/ns/prov#') combo.add_namespace('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#') combo.add_namespace('rdfs', 'http://www.w3.org/2000/01/rdf-schema#') #add extra terms for quering - #combo.add_term('http://www.w3.org/ns/prov#Entity', 'class', delimiter='#') - #combo.add_term('http://www.w3.org/ns/prov#Activity', 'class', delimiter='#') - #combo.add_term('http://www.w3.org/ns/prov#SoftwareAgent', 'class', delimiter='#') - #combo.add_term('http://www.w3.org/ns/prov#wasDerivedFrom', 'object_property', delimiter='#') - #combo.add_term('http://www.w3.org/ns/prov#wasGeneratedBy', 'object_property', delimiter='#') - #combo.add_term('http://www.w3.org/ns/prov#wasAssociatedWith', 'object_property', delimiter='#') - #combo.add_term('http://www.w3.org/ns/prov#actedOnBehalfOf', 'object_property', delimiter='#') + combo.add_term('http://www.w3.org/ns/prov#Entity', 'class', delimiter='#') + combo.add_term('http://www.w3.org/ns/prov#Activity', 'class', delimiter='#') + combo.add_term('http://www.w3.org/ns/prov#SoftwareAgent', 'class', delimiter='#') + combo.add_term('http://www.w3.org/ns/prov#wasDerivedFrom', 'object_property', delimiter='#') + combo.add_term('http://www.w3.org/ns/prov#wasGeneratedBy', 'object_property', delimiter='#') + combo.add_term('http://www.w3.org/ns/prov#wasAssociatedWith', 'object_property', delimiter='#') + combo.add_term('http://www.w3.org/ns/prov#actedOnBehalfOf', 'object_property', delimiter='#') combo.add_term('http://www.w3.org/2000/01/rdf-schema#label', 'data_property', delimiter='#', namespace='rdfs') combo.add_term('http://www.w3.org/1999/02/22-rdf-syntax-ns#type', 'object_property', delimiter='#', namespace='rdf') @@ -37,11 +37,11 @@ def read_ontology(): combo.add_path(('cmso:Material', 'cmso:hasDefect', 'podo:Vacancy')) combo.add_path(('cmso:SimulationCell', 'podo:hasVacancyConcentration', 'float')) combo.add_path(('cmso:SimulationCell', 'podo:hasNumberOfVacancies', 'int')) - #combo.add_path(('cmso:ComputationalSample', 'prov:wasDerivedFrom', 'cmso:ComputationalSample')) - #combo.add_path(('cmso:ComputationalSample', 'prov:wasGeneratedBy', 'msmo:ComputationalMethod')) - #combo.add_path(('msmo:ComputationalMethod', 'prov:wasAssociatedWith', 'prov:SoftwareAgent')) - #combo.add_path(('cmso:ComputationalSample', 'rdf:type', 'prov:Entity')) - #combo.add_path(('msmo:ComputationalMethod', 'rdf:type', 'prov:Activity')) + combo.add_path(('cmso:ComputationalSample', 'prov:wasDerivedFrom', 'cmso:ComputationalSample')) + combo.add_path(('cmso:ComputationalSample', 'prov:wasGeneratedBy', 'msmo:ComputationalMethod')) + combo.add_path(('msmo:ComputationalMethod', 'prov:wasAssociatedWith', 'prov:SoftwareAgent')) + combo.add_path(('cmso:ComputationalSample', 'rdf:type', 'prov:Entity')) + combo.add_path(('msmo:ComputationalMethod', 'rdf:type', 'prov:Activity')) #for Alt Name, maybe this should not be here combo.add_path(('cmso:CrystalStructure', 'cmso:hasAltName', 'string'))