## 4 Implementation of an Open Data Platform in Accordance with the Proposed Approach
### Introducing Hazelnut Trait Ontology
\begin{table}
\begin{tabular}{l} \hline \(<\)rdf:Description \\ rdf:about=”[[http://www.opendatainagiculture.com/ontologies/hazelnutontology/Temperature](http://www.opendatainagiculture.com/ontologies/hazelnutontology/Temperature)]([http://www.opendatainagiculture.com/ontologies/hazelnutontology/Temperature](http://www.opendatainagiculture.com/ontologies/hazelnutontology/Temperature))”\(>\) \\ \(<\)mapping:ClassName\(>\)-Temperature\(<\)/mapping:ClassName\(>\) \\ \(<\)mapping:DataUnit\(>\)’C\(<\)/mapping:DataUnit\(>\) \\ \(<\)mapping:SensorId\(>\)1000/\(\langle\)mapping:SensorId\(>\) \\ \(<\)mapping:SensorTypeName\(>\)BME 280 Temperature Humidity Barometric Pressure \\ Sensor\(<\)/mapping:SensorTypeName\(>\) \\ \(<\)mapping:TypeDef\(>\)WT\(<\)/mapping:TypeDef\(>\) \\ \(<\)mapping:TypeId\(>\)\(<\)/mapping:TypeId\(>\) \\ \(<\)mapping:TypeName\(>\)Weather Temperature\(<\)/mapping:TypeName\(>\) \\ \(<\)/rdf:Description\(>\) \\ \hline \end{tabular}
\end{table} 
Table 6: Mapping rule example. Figure 6: Mapping sensor measurement data type to ontology classes. ontologies/hazelnutontology. The URI reference should be the same with the URI reference of the relevant ontology classes to make a link between the sensor information and class definition within the mapping rule file. While linking sensor measurement data types with hazelnut trait ontology classes, SPARQL query statements are used to retrieve each attribute of sensor data from mapping rule file. The SPARQL query statement represented in Table 7 retrieves base ontology URI with: _Temperature_ class, sensor data type URI and the value of Id attribute of the sensor data type from mapping rule RDF file. This query statement is executed by rule engine of open-data platform and viewed as RDF triple, which contains three components named subject, predicate and object, respectively. In the example, subject, predicate and object are: _Temperature_ class, sensor data type and the value of Id attribute of the sensor data type, respectively. When the mapping procedure is completed using the data interchange engine of proposed approach, any stakeholder could create, export and publish datasets with respect to agricultural product, which is hazelnut in this case, in varied formats such as XML, JSON, RDF/XML, RDF/JSON, N-triples, Turtle, Notation 3, HTML, Excel spreadsheet and CSV. Figure 7 illustrates how to export these datasets from the platform. They can fulfil the procedures for discovering and analyzing using datasets stored in these files. The open-data platform improves the quality of data integration by applying inference rules on the traits which are mapped with the relevant sensor measurements. Furthermore, the inferred knowledge of a trait helps make better decisions concerning agricultural production for stakeholders who lack much information concerning how to perform PA activities. For instance, the \"topography\" class of hazelnut trait ontology can have the rules which are generated by a domain expert, using semantic web rule language (SWRL), represented in Table 8. According to the inferences provided by these rules, any stakeholder can easily identify whether the topography of an agricultural land surface is flat, hilly or mountainous.