rdf service information
introduction
This page contains a variety of information pertaining to the use of the rdf version of the eyeball web service. At present, this information is somewhat sketchy; expect it to be fleshed out in the fullness of time
The service itself can be found on index.jsp
in this directory.
supported operations
The following operations are recognised by the service, either as HTTP GET or POST requests. Operations are specified as a request variable. The service will respond according to the nature of the request (as detailed below)
- submitRDF - expects an RDF model (in N3, RDF/XML or N-TRIPLE)
- getReport - returns the report, as per configured language (defaults to simple text)
- getRepairedModel - returns the repaired model, in the same language as the input
- getValidInspectors - returns a model of inspectors, plus their descriptions
- getBuiltInAssumes - returns a model of the built in assumes
- setupConfig - expects an RDF/XML model of configuration options. The following options are supported (as the predicate of a statement, with the prefix
eyesvc
mapping to the EyeballService URI,<http://jena.sourceforge.net/EyeballService#>
):
eyesvc:doRepair
- can take any value. If a statement is present with this as its predicate, repair flag will be seteyesvc:doAnalysis
- can take any value. If a statement is present with this as its predicate, analysis flag will be seteyesvc:useInspector
- each of the values of statements with this predicate will be added as inspectorseyesvc:addAssume
- each of the objects (as literal values or URIs) of statements with this predicate will be added as assumeseyesvc:withBaseUrl
- should specify one URI resource only as the objecteyesvc:inputModelType
- should specify one literal only as the objecteyesvc:reportFormat
- should specify one literal only as the objecteyesvc:collectStatistics
- should specify one value only (true
/false
,yes
/no
, oron
/off
. Any case accepted, if it is not one of these, it is taken to meanfalse
.) as the object
If the requested operation is not recognised, or no operation is specified, the service will return an error.
handling output
The service will return an RDF/XML model with the requested information in it. In this way multiple pieces of request output are encoded into a single datastream. In order for the data not to lose semantics in transport, it is kept as its RDF triples (as opposed to, for example, serialising a model and storing it as a literal).
In the absence of a standard for named subgraphs in RDF at the time of writing, an implementation of a similar notion has been used. The eyeball service adds a statement for each subject in the model, specifying which piece of output it eyesvc:belongsTo
. There are resources defined for eyesvc:report
, eyesvc:outputModel
, eyesvc:inspectors
, and eyesvc:assumes
.
For example, to extract the report from the data stream, one could query the graph using SPARQL as follows:
PREFIX eyesvc: <http://jena.sourceforge.net/EyeballService#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
CONSTRUCT { ?subject ?predicate ?object }
WHERE
{ ?subject ?predicate ?object ;
eyesvc:belongsTo eyesvc:report .
FILTER ( ?predicate != eyesvc:belongsTo )
}
The model constructed from the query will contain the entire report in its original format. If you intend to output the report, it is worth copying the prefixMapping
from the server response into any model you create from the ResultSet
.
NB: while you can obviously substitute eyesvc:modelOutput
(to get the repaired model) for eyesvc:report
it is important to note that if, by some twist of fate, your model includes a statement with predicate http://jena.sourceforge.net/EyeballService#belongsTo
, it will be removed by the FILTER. If this is the case, you may need to write a more complicated SPARQL query to parse the results.