owlRequest: this service answers to SPARQL requests to the Jena framework. The service returns the results as a formatted or XML contenthttp://dassault-aviation.com/jena:owlObjectRequest: this service answers to SPARQL requests to the Jena framework and return the results as results as an objectprefix declarations for your requests. The module will automatically add these declarations at the beginning of your requests, depending on the module namespace properties.
owlRequest Service is a request-response Service Service which answers to SPARQL requests to the Jena framework.reqSchema: the key of the OWL schema to use for the request, must correspond to the name of one of the owlSchemas in the propertiesquery: the SPARQL query without the prefix. For example we could have:
SELECT ?pizza WHERE { ?pizza a owl:Class ; rdfs:subClassOf ?restriction. ?restriction owl:onProperty pizza:hasTopping ; owl:someValuesFrom pizza:PeperoniSausageTopping }
responseType: the way we want the response to be formatted. It is an enumeration with two possible values: FORMATTED for a text formatted response, and XML for an XML responserespSchema: the key of the OWL schema which was used for the resquestresponse: the response formatted as text if the responseType for set to FORMATTEDxmlResponse: the response as XML if the responseType for set to XMLrequestStatus: the status which can be NO_SCHEMA if there was no OWL schema associated with the key, INVALID, if the request was invalid, and VALID if the request was validorg.da.protoframework.jena.common.JenaCommonUtilities static methods[1]
JenaCommon.jar Jar file on your library pathpublic void subscribe(ServiceInstance service) { Data xmlResponse = service.getData("xmlResponse"); Map>String, QueryResult.Result> results = JenaCommonUtilities.getResults(xmlResponse, true, "pizza"); }
http://dassault-aviation.com/jena:owlObjectRequest Service is a request-response Service Service which answers to SPARQL requests to the Jena framework, bur return the results as a org.da.protoframework.jena.common.QueryResult object.reqSchema: the key of the OWL schema to use for the request, must correspond to the name of one of the owlSchemas in the propertiesquery: the SPARQL query without the prefix. For example we could have:
SELECT ?pizza WHERE { ?pizza a owl:Class ; rdfs:subClassOf ?restriction. ?restriction owl:onProperty pizza:hasTopping ; owl:someValuesFrom pizza:PeperoniSausageTopping }
stripPrefix: a boolean indicating if the prefix of the response results must be retained or stripped from the resultsorderedBy: the name of the class used to order the resultsrespSchema: the key of the OWL schema which was used for the requestresponse: the response as a QueryResult objectrequestStatus: the status which can be NO_SCHEMA if there was no OWL schema associated with the key, INVALID, if the request was invalid, and VALID if the request was validpublic void subscribe(ServiceInstance service) { QueryResults response = service.getData("response"); Map<String, QueryResults.Result> results = response.getResults(); Iterator<QueryResults.Result> it = results.values().iterator(); while (it.hasNext()) { QueryResults.Result result = it.next(); System.out.println("Key: " + result.getKey()); } }
xsd:decimal property)xsd:decimal property)sine function is not handled by SPARQL. But we will be able to define a opposite function with two arguments and then specify the following SPARQL query:SELECT ?triangle ?hypothenuse ?opposite WHERE { ?triangle rdf:type my:Triangle . ?triangle my:Hypothenuse ?hypothenuse . ?triangle my:Angle ?angle . BIND (my:opposite(?hypothenuse, ?angle) as ?opposite) }
JenaCommon.jar Jar file on your library pathCopyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence