com.hp.hpl.jena.eyeball
Interface Inspector

All Known Implementing Classes:
AllTypedInspector, CardinalityInspector, ClassInspector, ConsistentTypeInspector, Inspector.InspectorSet, InspectorBase, ListInspector, LiteralInspector, NullInspector, OwlSyntaxInspector, PrefixInspector, PropertyInspector, SparqlDrivenInspector, TestEyeball.LoggingInspector, TestInspectorAssembler.InspectorLewis, TestInspectorAssembler.InspectorMorse, TestSparqlDrivenInspector.InsertingInspector, URIInspector, VocabularyInspector

public interface Inspector

An Inspector is a component that is given a model and the statements in it, and decides if there are any reports to be issued.

The Eyeball framework will construct an Inspector object and call its methods in the following order:

The Report object r is the same one each time. The statements s are the statements from the base model of m. The model assume is a single OntModel containing all the models taken as assumptions, ie the ontologies against which the inspection is made.

If an inspector can operate by dealing with once statement at a time, it is reccomended that it do so. If an Eyeballing has multiple inspectors, they share a single iteration through the model under inspection for the inspectStatement methods.

It is the responsibility of the begin method to do necessary initialisation, such as declare the properties used in reports.

Author:
kers

Nested Class Summary
static class Inspector.InspectorSet
           
static class Inspector.Operations
          This class is a utility class to contain the createInspectorList method.
 
Method Summary
 void begin(Report r, com.hp.hpl.jena.ontology.OntModel assume)
          Initialise this Inspector, given the assumed ontologies and the report object which will hold the reports from this inspection.
 void end(Report r)
          End the inspection.
 void inspectModel(Report r, com.hp.hpl.jena.ontology.OntModel m)
          Inspect the model as a whole.
 void inspectStatement(Report r, com.hp.hpl.jena.rdf.model.Statement s)
          Inspect a single statement s from the model being inspected.
 

Method Detail

begin

void begin(Report r,
           com.hp.hpl.jena.ontology.OntModel assume)
Initialise this Inspector, given the assumed ontologies and the report object which will hold the reports from this inspection. This method should declare the report properties this inspector uses -- see the Report documentation.


inspectModel

void inspectModel(Report r,
                  com.hp.hpl.jena.ontology.OntModel m)
Inspect the model as a whole. This is an opportunity to perform arbitrary queries over the model's statements and associated entities, eg its prefix-mappings.


inspectStatement

void inspectStatement(Report r,
                      com.hp.hpl.jena.rdf.model.Statement s)
Inspect a single statement s from the model being inspected. The order of the statements is not specified.


end

void end(Report r)
End the inspection. This method is called after all the statements have been individually inspected, so any final analyssi can be done.