<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
geo
schema for the Jena module properties:<properties> <application name="jena"> <module name="jena"> <moduleArrayGroupProperty key="schemas"> <moduleArrayValue> <moduleProperty value="geo" key="name"/> <moduleProperty value="spatialdata.owl" key="owlData"/> <moduleProperty value="my:" key="prefixNS"/> <moduleProperty value="http://example.org/ApplicationSchema#" key="owlNS"/> <moduleProperty key="geosparql" value="true" /> </moduleArrayValue> </moduleArrayGroupProperty> </module> </application> </properties>The spatialdata.owl file will contain the 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:
java -jar protoframework.jar config=filelist.xml
One Window for the userInputs application will appear:reqSchema
: The Ontology Schema key: geo
query
: The queryresponseType
: The type of responsereqSchema
field.
query
field to edit the query. The text should be for our example:SELECT ?f WHERE { my:A my:hasExactGeometry ?aGeom . ?aGeom geo:asWKT ?aWKT . ?f my:hasExactGeometry ?fGeom . ?fGeom geo:asWKT ?fWKT . FILTER (geof:sfContains(?aWKT, ?fWKT)) }We will look for elements that
my:A
contains. it will include my:A
itself, because it obviously includes its own gemoetry.
response
field contains the response from Jena:-------------------------------------------- | f | ============================================ | <http://example.org/ApplicationSchema#F>> | | <http://example.org/ApplicationSchema#B> | | <http://example.org/ApplicationSchema#A> | --------------------------------------------
query
field to edit the query. The text should be for our example:SELECT ?f WHERE { my:A my:hasExactGeometry ?aGeom . ?aGeom geo:asWKT ?aWKT . ?f my:hasExactGeometry ?fGeom . ?fGeom geo:asWKT ?fWKT . FILTER (geof:sfContains(?aWKT, ?fWKT) && !sameTerm(?aGeom, ?fGeom)) }We will look for elements that
my:A
contains, excluding my:A
itself this time.
response
field contains the response from Jena:-------------------------------------------- | f | ============================================ | <http://example.org/ApplicationSchema#F>> | | <http://example.org/ApplicationSchema#B> | --------------------------------------------
Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence