|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.hp.hpl.jena.ontology.tidy.impl.CheckerImpl
com.hp.hpl.jena.ontology.tidy.Checker
public class Checker
This class implements the OWL Syntax Checker,
and is integrated with Jena Models, OntModels, and Graphs.
The basic mode of use, is to create a Checker
and to add one or more Models, OntModels or Graphs.
It tries to do the right thing, vis-a-vis
imports, without duplicating imports processing
already performed by an OntModel
;
in particular, to use a specific
OntDocumentManager
create an OntModel
using that document
manager. Any imports that are processed by
this class, a private document manager is used,
constructed from the default profile
(with imports processing explicitly on).
The three methods CheckerImpl.getProblems()
CheckerImpl.getErrors()
and CheckerImpl.getSubLanguage()
can all be used repeatedly and at any point. They
report on what has been added so far.
When constructing a checker, you must choose whether
to record errors and problems concerning non-OWL Lite
constructs, or only concerning non-OWL DL constructs.
For either choice CheckerImpl.getSubLanguage()
functions
correctly (i.e. the grammar used is identical). However,
if the Checker has been constructed with the liteflag as false,
it is not possible to access a rationale for an ontology
being in OWL DL rather than OWL Lite.
Field Summary |
---|
Fields inherited from interface com.hp.hpl.jena.ontology.tidy.impl.Constants |
---|
BadOWL, BadRDF, BadXSD, DL, Failure, FirstOfOne, FirstOfTwo, ObjectAction, RemoveTriple, SecondOfTwo, SubjectAction |
Constructor Summary | |
---|---|
Checker(boolean liteFlag)
Create a new checker - indicate whether error reports are wanted for non-OWL Lite constructions or only non-OWL DL constructions. |
Method Summary | |
---|---|
void |
add(Graph g)
Adds the graph to the syntax check. |
void |
add(Model m)
Adds the model to the syntax check. |
void |
addGraphAndImports(Graph g)
Adds the graph, and definitely its imports, to the syntax check. |
void |
addRaw(Graph g)
Adds the graph, and definitely not its imports, to the syntax check. |
int |
getHighTide()
|
void |
load(String url)
Include an ontology and its imports in the check. |
void |
load(String url,
String lang)
Include an ontology and its imports in the check. |
void |
noremove()
|
void |
setOptimizeMemory(boolean big)
|
Methods inherited from class com.hp.hpl.jena.ontology.tidy.impl.CheckerImpl |
---|
getErrors, getProblems, getSubLanguage |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.hp.hpl.jena.ontology.tidy.CheckerResults |
---|
getErrors, getProblems, getSubLanguage, setOptimizeMemory |
Constructor Detail |
---|
public Checker(boolean liteFlag)
liteFlag
- If true
CheckerImpl.getErrors()
and
CheckerImpl.getProblems()
will indicate any OWL DL or OWL Full construction.Method Detail |
---|
public void addRaw(Graph g)
addRaw
in class com.hp.hpl.jena.ontology.tidy.impl.CheckerImpl
g
- The graph to be added.public void load(String url)
load
in class com.hp.hpl.jena.ontology.tidy.impl.CheckerImpl
url
- Load the ontology from this URL.public void load(String url, String lang)
load
in class com.hp.hpl.jena.ontology.tidy.impl.CheckerImpl
url
- Load the ontology from this URL.lang
- The language (RDF/XML, N3 or N-TRIPLE) in which the ontology is written.public void add(Graph g)
MultiUnion
has in fact been created by
OntModel
and contains the imports closure).
g
- The Graph to be added.public void addGraphAndImports(Graph g)
g
- The Graph to be added.public void add(Model m)
If the Model
is an
OntModel
created with the ModelFactory
then the base graph with its imports (which have already
been collected) are added. Import processing is not redone
at this stage.
The behaviour is identical to that of add(Graph)
;
better control,if needed, is achieved through the use of
addGraphAndImports(com.hp.hpl.jena.graph.Graph)
and addRaw(com.hp.hpl.jena.graph.Graph)
.
m
- The Model to be added.public int getHighTide()
public void noremove()
public void setOptimizeMemory(boolean big)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |