pizza
schema which defines an Ontology of pizzas, which is often used to teach Owl.
<applications> <application name="jena"> <deployment> <lib url="JenaModule.jar" /> </deployment> </application> <application name="userInputs"> <deployment> <lib url="userInputs.jar" /> </deployment> <modules> <module name="userInputs"> <interfaces> <requestSend service="owlRequest" timeOut="200ms" /> </interfaces> </module> </modules> </application> </applications>We will specify the
pizza
schema for the Jena module 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>The pizza.owl.rdf file will contain the pizza Owl Schema.
<services> <requestResponse name="owlRequest" id="30" > <request> <data name="reqSchema" desc="Schema key" type="string" /> <data name="query" desc="JENA query" type="string" /> <data name="responseType" desc="Response Type" type="responseType" /> </request> <response> <data name="respSchema" desc="Schema key" type="string" /> <data name="response" desc="JENA query response" type="string" /> <data name="xmlResponse" desc="JENA XML query response" type="xml" /> <data name="requestStatus" desc="Request status" type="requestStatus" /> </response> </requestResponse> </services>And a very simple types definition:
<types> <simpleType name="string" baseType="string" /> <xmlType name="xml" /> <enumType name="requestStatus" > <enumValue name="VALID" /> <enumValue name="INVALID" /> <enumValue name="NO_SCHEMA" /> </enumType> <enumType name="responseType" > <enumValue name="FORMATTED" /> <enumValue name="XML" /> </enumType> </types>Now we have our configuration:
owlRequest
servicefilelist.xml
file:<files> <file url="applications.xml" /> <file url="services.xml" /> <file url="types.xml" /> <file url="properties.xml" /> </files>
filelist.xml
file for our configuration[1]
config
argument and specify the filelist after the start
java -jar protoframework.jar config=filelist.xml
One Window for the userInputs application will appear:reqSchema
: The Ontology Schema key: pizza
query
: The queryresponseType
: The type of responsereqSchema
field:query
field to edit the query. The text should be for our example:select ?pizza where {?pizza a owl:Class ; rdfs:subClassOf ?restriction. ?restriction owl:onProperty pizza:hasTopping ; owl:someValuesFrom pizza:PeperoniSausageTopping }We will look for pizzas which have a PeperoniSausageTopping.
response
field contains the response from Jena:------------------------------------------------------------------ | pizza | ================================================================== | <http://www.co-ode.org/ontologies/pizza/pizza.owl#AmericanHot> | | <http://www.co-ode.org/ontologies/pizza/pizza.owl#FourSeasons> | | <http://www.co-ode.org/ontologies/pizza/pizza.owl#American> | ------------------------------------------------------------------We can see here that the response if formatted as text, and clearly not usable in another module. For the next request, we will ask to format the request as XML.
xmlResponse
field contains the response from Jena, formatted as XML:<sparql xmlns="http://www.w3.org/2005/sparql-results#"> <head> <variable name="pizza"/> </head> <results> <result> <binding name="pizza"> <uri>http://www.co-ode.org/ontologies/pizza/pizza.owl#AmericanHot</uri> </binding> </result> <result> <binding name="pizza"> <uri>http://www.co-ode.org/ontologies/pizza/pizza.owl#FourSeasons</uri> </binding> </result> <result> <binding name="pizza"> <uri>http://www.co-ode.org/ontologies/pizza/pizza.owl#American</uri> </binding> </result> </results> </sparql>
config
argument and specify the filelist after the startCopyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence