Home
Categories
Dictionary
Glossary
Download
Project Details
Changes Log
What Links Here
FAQ
License

Jena module properties declaration



The Jena module has several mandatory and optional properties, allowing to define one or several ontologies. For each ontology we have:
  • name: (mandatory) the key of the Schema, to be used in the requests and responses
  • owlData: (mandatory) the files for the RDF data
  • owlSchema: (optional) the files for the OWL schema[1]
    The owlSchema is not mandatory, by default the Jena framework will look for both the definition and the data in the owlData file. See also separating the schema and the data for an ontology
  • prefixNS: (mandatory) the prefixes for the OWL query
  • owlNS: (mandatory) the namespaces for the OWL query
  • defaultNS: (optional) the default namespace
  • prefix: (optional) an additional array of prefix / namespaces
Note that all these properties are defined in an array group.

Namespace declarations


The prefixNS, owlNS, defaultNS, and prefix specify the prefix to use for the requests sent to the Jena engine.

Separating the schema and the data for an ontology

By default (using only the owlData property) the schema and the data are stored in one ontology. However it is possible to store separately the data and the schema by using both the owlSchema and owlData properties

For example, in the case above, suppose that we have a drones ontology with the pizzas schema in pizzaSchemas.owl, and the pizzas individuals in the pizzaData.owl. We would have the following properties:
      <properties>
         <application name="jena" >
            <module name="jena" >
               <moduleArrayGroupProperty key="schemas">
                  <moduleArrayValue>
                     <moduleProperty key="name" value="pizza" />
                     <moduleProperty key="owlSchema" value="pizzaSchemas.owl" />
                     <moduleProperty key="owlData" value="pizzaData.owl" />
                     <moduleProperty key="prefixNS" value="pizza:" />
                     <moduleProperty key="owlNS" value="http://www.co-ode.org/ontologies/pizza/pizza.owl#" />
                  </moduleArrayValue>
               </moduleArrayGroupProperty>
            </module>
         </application>
      </properties>

Defining more than one ontology

It is possible to define more than one ontology in the properties, Each one will be addressed using the reqSchema Service data. For example:
      <properties>
         <application name="jena" >
            <module name="jena" >
               <moduleArrayGroupProperty key="schemas">
                  <moduleArrayValue>
                     <moduleProperty key="name" value="drone" />
                     <moduleProperty key="owlData" value="drone.owl" />
                     <moduleProperty key="prefixNS" value="drone:" />
                     <moduleProperty key="owlNS" value="http://www.data.com/drone#" />
                  </moduleArrayValue>
                  <moduleArrayValue>
                     <moduleProperty key="name" value="pizza" />
                     <moduleProperty key="owlData" value="pizza.owl.rdf" />
                     <moduleProperty key="prefixNS" value="pizza:" />
                     <moduleProperty key="owlNS" value="http://www.co-ode.org/ontologies/pizza/pizza.owl#" />
                  </moduleArrayValue>
               </moduleArrayGroupProperty>
            </module>
         </application>
      </properties>

Examples

Basic example

Suppose that we have a pizza.owl.rdf data file which contains both the owl definition and the rdf data for pizzas. This definition has the following prefix and namespace:
  • prefix = "pizza"
  • namespace = "http://www.co-ode.org/ontologies/pizza/pizza.owl#"
In that case, we will have the following properties:
      <properties>
         <application name="jena" >
            <module name="jena" >
               <moduleArrayGroupProperty key="schemas">
                  <moduleArrayValue>
                     <moduleProperty key="name" value="pizza" />
                     <moduleProperty key="owlData" value="pizza.owl.rdf" />
                     <moduleProperty key="prefixNS" value="pizza:" />
                     <moduleProperty key="owlNS" value="http://www.co-ode.org/ontologies/pizza/pizza.owl#" />
                  </moduleArrayValue>
               </moduleArrayGroupProperty>
            </module>
         </application>
      </properties>

Specifying a default namespace

Suppose that we have a pizza.owl.rdf data file which contains both the owl definition and the rdf data for pizzas. This definition has the following prefix and namespace:
  • prefix = "pizza"
  • namespace = "http://www.co-ode.org/ontologies/pizza/pizza.owl#"
In that case, we will have the following properties:
      <properties>
         <application name="jena" >
            <module name="jena" >
               <moduleArrayGroupProperty key="schemas">
                  <moduleArrayValue>
                     <moduleProperty key="name" value="pizza" />
                     <moduleProperty key="owlData" value="pizza.owl.rdf" />
                     <moduleProperty key="prefixNS" value="pizza:" />
                     <moduleProperty key="owlNS" value="http://www.co-ode.org/ontologies/pizza/pizza.owl#" />
                  </moduleArrayValue>
               </moduleArrayGroupProperty>
            </module>
         </application>
      </properties>

Notes

  1. ^ The owlSchema is not mandatory, by default the Jena framework will look for both the definition and the data in the owlData file. See also separating the schema and the data for an ontology

See also


Categories: builtin-applis

Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence