Skip to content

Commit b85d674

Browse files
committed
feat: define field ontology
1 parent 47140e0 commit b85d674

3 files changed

Lines changed: 108 additions & 103 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ public/*
55
!public/ICON_VAIMEE.svg
66
rdf2html/node_modules/
77
catalog-v001.xml
8+
!agora/catalog-v001.xml
89
*.rdf
910
.DS_Store
1011
protege-graph-plugin/target/

agora/agora.ttl

Lines changed: 102 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
<http://onto.vaimee.com/agora#> rdf:type owl:Ontology ;
2222
owl:versionIRI <http://onto.vaimee.com/agora/1.0.19#> ;
23-
owl:imports <http://onto.vaimee.com/fsm/1.0.17> ,
23+
owl:imports <http://onto.vaimee.com/fsm/1.0.19> ,
2424
<http://www.opengis.net/ont/geosparql> ,
2525
<http://www.w3.org/2006/time#2016> ,
2626
<http://www.w3.org/ns/prov-o-20130430> ,
@@ -121,10 +121,17 @@ foaf:member rdf:type owl:AnnotationProperty .
121121
# Object Properties
122122
#################################################################
123123

124+
### http://onto.vaimee.com/agora#hasAtmosphere
125+
:hasAtmosphere rdf:type owl:ObjectProperty ;
126+
rdfs:subPropertyOf owl:topObjectProperty ;
127+
rdfs:domain :Field ;
128+
rdfs:range :Atmosphere .
129+
130+
124131
### http://onto.vaimee.com/agora#hasCrop
125132
:hasCrop rdf:type owl:ObjectProperty ;
126133
rdfs:subPropertyOf owl:topObjectProperty ;
127-
rdfs:domain :Model ;
134+
rdfs:domain :Field ;
128135
rdfs:range :Crop .
129136

130137

@@ -157,7 +164,7 @@ foaf:member rdf:type owl:AnnotationProperty .
157164
### http://onto.vaimee.com/agora#hasSoil
158165
:hasSoil rdf:type owl:ObjectProperty ;
159166
rdfs:subPropertyOf owl:topObjectProperty ;
160-
rdfs:domain :Model ;
167+
rdfs:domain :Field ;
161168
rdfs:range :Soil .
162169

163170

@@ -186,13 +193,6 @@ foaf:member rdf:type owl:AnnotationProperty .
186193
rdfs:range :State .
187194

188195

189-
### http://onto.vaimee.com/agora#hasWeatherData
190-
:hasWeatherData rdf:type owl:ObjectProperty ;
191-
rdfs:subPropertyOf owl:topObjectProperty ;
192-
rdfs:domain :Model ;
193-
rdfs:range :WeatherData .
194-
195-
196196
### http://onto.vaimee.com/agora/criteria#hasCrop
197197
criteria:hasCrop rdf:type owl:ObjectProperty ;
198198
rdfs:subPropertyOf :hasCrop ;
@@ -599,13 +599,17 @@ criteria:waterRetentionFitting rdf:type owl:DatatypeProperty ;
599599
# Classes
600600
#################################################################
601601

602-
### http://onto.vaimee.com/agora#Criteria1DAgent
603-
:Criteria1DAgent rdf:type owl:Class ;
604-
rdfs:subClassOf prov:SoftwareAgent .
602+
### http://onto.vaimee.com/agora#Atmosphere
603+
:Atmosphere rdf:type owl:Class ;
604+
rdfs:subClassOf geo:Feature ,
605+
sosa:FeatureOfInterest ;
606+
rdfs:comment "The atmospheric context associated with a field." ;
607+
rdfs:label "Atmosphere" .
605608

606609

607610
### http://onto.vaimee.com/agora#Crop
608611
:Crop rdf:type owl:Class ;
612+
rdfs:subClassOf sosa:FeatureOfInterest ;
609613
rdfs:comment "Defines growth parameters, thermal thresholds, and irrigation requirements for a specific plant type." ;
610614
rdfs:label "Crop" ;
611615
skos:closeMatch <http://aims.fao.org/aos/agrovoc/c_1972> .
@@ -621,6 +625,36 @@ criteria:waterRetentionFitting rdf:type owl:DatatypeProperty ;
621625
:CropCycle rdf:type owl:Class .
622626

623627

628+
### http://onto.vaimee.com/agora#Field
629+
:Field rdf:type owl:Class ;
630+
rdfs:subClassOf geo:Feature ,
631+
sosa:FeatureOfInterest ,
632+
[ rdf:type owl:Restriction ;
633+
owl:onProperty :hasAtmosphere ;
634+
owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger ;
635+
owl:onClass :Atmosphere
636+
] ,
637+
[ rdf:type owl:Restriction ;
638+
owl:onProperty :hasCrop ;
639+
owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger ;
640+
owl:onClass :Crop
641+
] ,
642+
[ rdf:type owl:Restriction ;
643+
owl:onProperty :hasSoil ;
644+
owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger ;
645+
owl:onClass :Soil
646+
] ;
647+
rdfs:comment "An agricultural field composed of exactly one crop, one soil, and one atmosphere." ;
648+
rdfs:label "Field" ;
649+
skos:exactMatch <http://aims.fao.org/aos/agrovoc/c_2894> .
650+
651+
652+
### http://onto.vaimee.com/agora#FieldDigitalTwin
653+
:FieldDigitalTwin rdf:type owl:Class ;
654+
rdfs:subClassOf prov:SoftwareAgent ,
655+
sosa:Sensor .
656+
657+
624658
### http://onto.vaimee.com/agora#InvalidSoilTexture
625659
:InvalidSoilTexture rdf:type owl:Class ;
626660
owl:disjointWith :SoilTexture ;
@@ -639,8 +673,7 @@ criteria:waterRetentionFitting rdf:type owl:DatatypeProperty ;
639673

640674
### http://onto.vaimee.com/agora#Model
641675
:Model rdf:type owl:Class ;
642-
rdfs:subClassOf geo:Feature ,
643-
sosa:FeatureOfInterest .
676+
rdfs:subClassOf sosa:Procedure .
644677

645678

646679
### http://onto.vaimee.com/agora#RootDevelopment
@@ -649,6 +682,7 @@ criteria:waterRetentionFitting rdf:type owl:DatatypeProperty ;
649682

650683
### http://onto.vaimee.com/agora#Soil
651684
:Soil rdf:type owl:Class ;
685+
rdfs:subClassOf sosa:FeatureOfInterest ;
652686
rdfs:comment "The physical profile of the earth at a specific location." ;
653687
rdfs:label "Soil" ;
654688
skos:exactMatch <http://aims.fao.org/aos/agrovoc/c_7156> .
@@ -696,17 +730,8 @@ criteria:waterRetentionFitting rdf:type owl:DatatypeProperty ;
696730

697731
### http://onto.vaimee.com/agora#WeatherAgent
698732
:WeatherAgent rdf:type owl:Class ;
699-
rdfs:subClassOf prov:SoftwareAgent .
700-
701-
702-
### http://onto.vaimee.com/agora#WeatherData
703-
:WeatherData rdf:type owl:Class ;
704-
rdfs:subClassOf geo:Feature ,
705-
sosa:FeatureOfInterest ;
706-
rdfs:comment "A geographic point responsible for providing weather data (observed or forecast) to one or more Units." ;
707-
rdfs:label "MeteoLocation" ;
708-
rdfs:seeAlso <https://docs.ogc.org/is/22-047r1/22-047r1.html#_class_geofeature> ;
709-
skos:closeMatch <https://aims.fao.org/aos/agrovoc/c_331000> .
733+
rdfs:subClassOf prov:SoftwareAgent ,
734+
sosa:Sensor .
710735

711736

712737
### http://onto.vaimee.com/agora/criteria#CRITERIA1D
@@ -771,101 +796,64 @@ geo:Feature rdf:type owl:Class .
771796
:bulkDensity 2.3 .
772797

773798

774-
#################################################################
775-
# Rules
776-
#################################################################
777-
778-
### http://onto.vaimee.com/agora#SoilTextureSumTo100Rule
779-
:SoilTextureSumTo100Rule rdf:type swrl:Imp ;
780-
rdfs:label "SoilTexture sum-to-100 integrity constraint" ;
781-
rdfs:comment "SoilTexture(?texture) ^ clay(?texture,?clayVal) ^ sand(?texture,?sandVal) ^ silt(?texture,?siltVal) ^ swrlb:add(?sum1,?clayVal,?sandVal) ^ swrlb:add(?sum2,?sum1,?siltVal) ^ swrlb:notEqual(?sum2,100.0) -> InvalidSoilTexture(?texture). Requires a SWRL-aware reasoner (e.g. Pellet); plain OWL 2 DL reasoners such as HermiT ignore this rule." ;
782-
swrl:body _:soilTextureSumTo100Body1 ;
783-
swrl:head _:soilTextureSumTo100Head1 .
784-
785-
_:soilTextureSumTo100Body1 rdf:type swrl:AtomList ;
786-
rdf:first _:atomSoilTexture ;
787-
rdf:rest _:soilTextureSumTo100Body2 .
799+
### http://onto.vaimee.com/agora#maximumDailyTemperature
800+
:maximumDailyTemperature rdf:type owl:NamedIndividual ,
801+
sosa:ObservableProperty .
788802

789-
_:soilTextureSumTo100Body2 rdf:type swrl:AtomList ;
790-
rdf:first _:atomClay ;
791-
rdf:rest _:soilTextureSumTo100Body3 .
792803

793-
_:soilTextureSumTo100Body3 rdf:type swrl:AtomList ;
794-
rdf:first _:atomSand ;
795-
rdf:rest _:soilTextureSumTo100Body4 .
804+
### http://onto.vaimee.com/agora#minimumDailyTemperature
805+
:minimumDailyTemperature rdf:type owl:NamedIndividual ,
806+
sosa:ObservableProperty .
796807

797-
_:soilTextureSumTo100Body4 rdf:type swrl:AtomList ;
798-
rdf:first _:atomSilt ;
799-
rdf:rest _:soilTextureSumTo100Body5 .
800808

801-
_:soilTextureSumTo100Body5 rdf:type swrl:AtomList ;
802-
rdf:first _:atomAdd1 ;
803-
rdf:rest _:soilTextureSumTo100Body6 .
809+
### http://onto.vaimee.com/agora#totalDailyPrecipitation
810+
:totalDailyPrecipitation rdf:type owl:NamedIndividual ,
811+
sosa:ObservableProperty .
804812

805-
_:soilTextureSumTo100Body6 rdf:type swrl:AtomList ;
806-
rdf:first _:atomAdd2 ;
807-
rdf:rest _:soilTextureSumTo100Body7 .
808813

809-
_:soilTextureSumTo100Body7 rdf:type swrl:AtomList ;
810-
rdf:first _:atomNotEqual ;
811-
rdf:rest rdf:nil .
814+
[ swrl:argument1 :texture ;
815+
swrl:classPredicate :InvalidSoilTexture
816+
] .
812817

813-
_:soilTextureSumTo100Head1 rdf:type swrl:AtomList ;
814-
rdf:first _:atomInvalidSoilTexture ;
815-
rdf:rest rdf:nil .
818+
[ swrl:arguments [ ] ;
819+
swrl:builtin swrlb:add
820+
] .
816821

817-
_:atomSoilTexture rdf:type swrl:ClassAtom ;
818-
swrl:classPredicate :SoilTexture ;
819-
swrl:argument1 :texture .
822+
[ swrl:arguments [ ] ;
823+
swrl:builtin swrlb:add
824+
] .
820825

821-
_:atomClay rdf:type swrl:DatavaluedPropertyAtom ;
822-
swrl:propertyPredicate :clay ;
823-
swrl:argument1 :texture ;
824-
swrl:argument2 :clayVal .
826+
[ swrl:arguments [ ] ;
827+
swrl:builtin swrlb:notEqual
828+
] .
825829

826-
_:atomSand rdf:type swrl:DatavaluedPropertyAtom ;
827-
swrl:propertyPredicate :sand ;
828-
swrl:argument1 :texture ;
829-
swrl:argument2 :sandVal .
830+
[ swrl:argument1 :texture ;
831+
swrl:argument2 :sandVal ;
832+
swrl:propertyPredicate :sand
833+
] .
830834

831-
_:atomSilt rdf:type swrl:DatavaluedPropertyAtom ;
832-
swrl:propertyPredicate :silt ;
833-
swrl:argument1 :texture ;
834-
swrl:argument2 :siltVal .
835+
[ swrl:argument1 :texture ;
836+
swrl:argument2 :siltVal ;
837+
swrl:propertyPredicate :silt
838+
] .
835839

836-
_:atomAdd1 rdf:type swrl:BuiltinAtom ;
837-
swrl:builtin swrlb:add ;
838-
swrl:arguments ( :sum1 :clayVal :sandVal ) .
839-
840-
_:atomAdd2 rdf:type swrl:BuiltinAtom ;
841-
swrl:builtin swrlb:add ;
842-
swrl:arguments ( :sum2 :sum1 :siltVal ) .
843-
844-
_:atomNotEqual rdf:type swrl:BuiltinAtom ;
845-
swrl:builtin swrlb:notEqual ;
846-
swrl:arguments ( :sum2 "100.0"^^xsd:decimal ) .
847-
848-
_:atomInvalidSoilTexture rdf:type swrl:ClassAtom ;
849-
swrl:classPredicate :InvalidSoilTexture ;
850-
swrl:argument1 :texture .
851-
852-
:texture rdf:type swrl:Variable .
853-
854-
:clayVal rdf:type swrl:Variable .
855-
856-
:sandVal rdf:type swrl:Variable .
857-
858-
:siltVal rdf:type swrl:Variable .
859-
860-
:sum1 rdf:type swrl:Variable .
861-
862-
:sum2 rdf:type swrl:Variable .
840+
[ swrl:argument1 :texture ;
841+
swrl:argument2 :clayVal ;
842+
swrl:propertyPredicate :clay
843+
] .
863844

845+
[ swrl:argument1 :texture ;
846+
swrl:classPredicate :SoilTexture
847+
] .
864848

865849
#################################################################
866850
# Annotations
867851
#################################################################
868852

853+
:SoilTextureSumTo100Rule swrl:body [ ] ;
854+
swrl:head [ ] .
855+
856+
869857
<https://vaimee.com> foaf:homepage "https://vaimee.com" ;
870858
foaf:name "VAIMEE srl" .
871859

@@ -874,4 +862,15 @@ _:atomInvalidSoilTexture rdf:type swrl:ClassAtom ;
874862
foaf:name "Luca Roffia" .
875863

876864

865+
#################################################################
866+
# Rules
867+
#################################################################
868+
869+
[ rdfs:comment "SoilTexture(?texture) ^ clay(?texture,?clayVal) ^ sand(?texture,?sandVal) ^ silt(?texture,?siltVal) ^ swrlb:add(?sum1,?clayVal,?sandVal) ^ swrlb:add(?sum2,?sum1,?siltVal) ^ swrlb:notEqual(?sum2,100.0) -> InvalidSoilTexture(?texture). Requires a SWRL-aware reasoner (e.g. Pellet); plain OWL 2 DL reasoners such as HermiT ignore this rule." ;
870+
rdfs:label "SoilTexture sum-to-100 integrity constraint" ;
871+
rdf:type swrl:Imp ;
872+
swrl:body rdf:nil ;
873+
swrl:head rdf:nil
874+
] .
875+
877876
### Generated by the OWL API (version 4.5.29.2024-05-13T12:11:03Z) https://github.com/owlcs/owlapi

agora/catalog-v001.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<catalog prefer="public" xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
3+
<uri name="http://onto.vaimee.com/fsm/1.0.19" uri="../fsm/fsm.ttl"/>
4+
<uri name="http://onto.vaimee.com/fsm/1.0.17" uri="../fsm/fsm.ttl"/>
5+
</catalog>

0 commit comments

Comments
 (0)