Skip to content

Commit

Permalink
update ontology
Browse files Browse the repository at this point in the history
  • Loading branch information
srmnitc committed Nov 28, 2023
1 parent e2c08c4 commit e1050dc
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions pyscal_rdf/network/ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand All @@ -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'))

Expand Down

0 comments on commit e1050dc

Please sign in to comment.