Skip to content

Commit

Permalink
modified
Browse files Browse the repository at this point in the history
  • Loading branch information
aguayoe committed Jan 9, 2024
1 parent 6a966ab commit 3dc0766
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 26 deletions.
31 changes: 17 additions & 14 deletions SemanticModel/YARRRML/admin_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@


"triplets" : [
["this:$(bgvid)_$(uniqid)#Collection","prov:wasAssociatedWith","$(org_id)","iri"], #Organization?
["$(org_id)","sio:000671","this:$(uniqid)#Identifier","iri"],
["$(org_id)","sio:000059","this:$(uniqid)#Individual","iri"],
["this:$(uniqid)#Individual","sio:000228","this:$(uniqid)#Role","iri"],
["this:$(bgvid)_$(uniqid)#Collection","prov:wasAssociatedWith","$(org_id)","iri"],
["$(org_id)","sio:SIO_000671","this:$(uniqid)#identifier","iri"],
["$(org_id)","sio:SIO_000059","this:$(uniqid)#individual","iri"],
["this:$(uniqid)#individual","sio:SIO_000228","this:$(uniqid)#Role","iri"],

["this:$(bgvid)_$(uniqid)#Collection","rdf:type","sio:001049","iri"],
["this:$(bgvid)_$(uniqid)#Collection","rdf:type","sio:SIO_001049","iri"],
["this:$(bgvid)_$(uniqid)#Collection","rdf:type","prov:activity","iri"],
["$(org_id)","rdf:type","prov:Agent","iri"],
["$(org_id)","rdfs:label","$(org_name)","string"], #Value
["$(org_id)","rdfs:label","$(org_name)","string"],
["$(org_id)","rdf:type","org:Organization","iri"],
["$(org_id)","rdf:type","sio:000012","iri"],
["this:$(uniqid)#Identifier","sio:000300","$(org_id)","xsd:string"], #url?
["this:$(uniqid)#Individual","foaf:name","$(member_name)","xsd:string"], #value
["this:$(uniqid)#Individual","rdf:type","prov:Agent","iri"],
["this:$(uniqid)#Individual","rdf:type","org:Membership","iri"],
["this:$(uniqid)#Individual","rdf:type","sio:SIO_000498","iri"],
["$(org_id)","rdf:type","sio:SIO_000012","iri"],
["this:$(uniqid)#identifier","sio:SIO_000300","$(org_id)","xsd:string"],
["this:$(uniqid)#individual","foaf:name","$(member_name)","xsd:string"],
["this:$(uniqid)#individual","rdf:type","prov:Agent","iri"],
["this:$(uniqid)#individual","rdf:type","org:Membership","iri"],
["this:$(uniqid)#individual","rdf:type","sio:SIO_000498","iri"],
["this:$(uniqid)#Role","rdf:type","org:role","iri"],
["this:$(uniqid)#Role","rdf:type","$(member_role)","iri"],
],

"config" : {
"source_name" : "source_cde_test",
"configuration" : "default",
"csv_name" : "atributos BANSEM_c_etl_smv_6",
"csv_name" : "administrative.csv",
"basicURI" : "this"
}
}
Expand All @@ -50,4 +50,7 @@
test_obda = yarrrml.transform_OBDA()
print(test_obda)
test_sparql = yarrrml.transform_SPARQL()
print(test_sparql)
print(test_sparql)



38 changes: 26 additions & 12 deletions SemanticModel/YARRRML/location_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,35 @@


"triplets" : [
["this:$(uniqid)#Collection","sio:has-output","this:$(uniqid)#Germplasm","iri"],
["this:$(uniqid)#Collection","sio:measured-at","this:$(uniqid)#Colecction_date","iri"],
["this:$(uniqid)#Collection_date","sio:SIO_000680","this:$(uniqid)#Collection_Start","iri"],
["this:$(uniqid)#Collection_date","sio:SIO_000681","this:$(uniqid)#Collection_End","iri"],
["this:$(uniqid)#Geolocation","sio:if-location-of","this:$(uniqid)#Collection","iri"],
["this:$(uniqid)#Geolocation", "sio:is-located-in", "https://en.wikipedia.org/wiki/ISO_3166-1:$(country_code)", "iri"]
["this:$(uniqid)#Geolocation"," ","this:$(uniqid)#Soil_type","iri"],
["this:$(uniqid)#Collection","sio:SIO_000229","this:$(uniqid)#Germplasm","iri"],
["this:$(uniqid)#Collection","sio:SIO_000793","this:$(uniqid)#timeofobservation","iri"],
["this:$(uniqid)#Germplasm","sio:SIO_000671","this:$(uniqid)#identifier","iri"],
["this:$(uniqid)#timeofobservation","sio:SIO_000680","this:$(uniqid)#start","iri"],
["this:$(uniqid)#timeofobservation","sio:SIO_000681","this:$(uniqid)#end","iri"],
["this:$(uniqid)#GeoLocation","sio:SIO_000145","this:$(uniqid)#Collection","iri"],
["this:$(uniqid)#GeoLocation", "sio:SIO_000061", "$(country_name)", "iri"],
["this:$(uniqid)#GeoLocation","http://some.ontology.term/soiltype","this:$(uniqid)#soil_type","iri"],


["this:$(uniqid)#Collection","rdf:type","sio:SIO_001049","iri"],
["this:$(uniqid)#Collection","rdf:type","","iri"],




["this:$(uniqid)#Collection","rdfs:label","$(comment)","xsd:string"],
["this:$(uniqid)#Germplasm","rdf:type","efo:EFO_0007059","iri"],
["this:$(uniqid)#identifier","sio:SIO_000300","$(bgvid)","xsd:string"],
["this:$(uniqid)#timeofobservation","sio:SIO_000300","$(collection_date)","xsd:date"],
["this:$(uniqid)#timeofobservation","rdf:type","sio:SIO_000391","iri"],
["this:$(uniqid)#timeofobservation","rdf:type","sio:SIO_000417","iri"],
["this:$(uniqid)#start","rdf:type","sio:SIO_000669","iri"],
["this:$(uniqid)#start","sio:SIO_000300","$(collection_start)","xsd:date"],
["this:$(uniqid)#end","sio:SIO_000300","$(collection_end)","xsd:date"],
["this:$(uniqid)#end","rdf:type","sio:SIO_000670","iri"],
["this:$(uniqid)#GeoLocation","rdf:type","$(latitude)","xsd:float"],
["this:$(uniqid)#GeoLocation","rdf:type","$(longitude)","xsd:float"],
["this:$(uniqid)#soil_type","sio:SIO_000300","$(soil_label)","iri"],
["this:$(uniqid)#soil_type","rdf:type","$(soil_type)","iri"],
["$(country_name)", "rdf:type", "sio:SIO_000664"],
["$(country_name)", "rdfs:label", "$(country_name)"],
["$(country_name)", "rdfs:label", "$(country_code)"],

],

"config" : {
Expand Down

0 comments on commit 3dc0766

Please sign in to comment.