uk.ac.man.cs.img.owl.validation
Class SpeciesValidator

java.lang.Object
  |
  +--uk.ac.man.cs.img.owl.validation.SpeciesValidator
All Implemented Interfaces:
OWLValidationConstants, SpeciesValidator

public class SpeciesValidator
extends Object
implements SpeciesValidator, OWLValidationConstants

This class provides functionality for identifying the particular species that an ontology belongs to. See the uk.ac.man.cs.img.owl.validation documentation for further information.

Version:
$Id: SpeciesValidator.java,v 1.7 2004/03/05 17:34:49 sean_bechhofer Exp $

Field Summary
protected static int OTHER
           
 
Fields inherited from interface org.semanticweb.owl.validation.OWLValidationConstants
BUILTINREDEFINITION, CARDINALITY, COMPLEMENT, COMPLETE, COMPLEXTRANSITIVE, DATARANGE, DATATYPE, DIFFERENTINDIVIDUAL, DISJOINT, DL, EQUIVALENCE, EQUIVALENTPROPERTY, EXPRESSIONINAXIOM, EXPRESSIONINRESTRICTION, FULL, FUNCTIONAL, INDIVIDUALDATA, INDIVIDUALS, INTERSECTION, INVERSE, INVERSEFUNCTIONAL, LITE, ONEOF, OWLNAMESPACEUSED, PARTIAL, RELATEDINDIVIDUALS, SAMEINDIVIDUAL, SEPARATIONVIOLATION, SUBCLASS, SUBPROPERTY, SYMMETRIC, TRANSITIVE, UNION, UNKNOWN, UNTYPEDINDIVIDUAL, ZEROONECARDINALITY
 
Constructor Summary
SpeciesValidator()
          Create a new validator.
 
Method Summary
protected  void explain(int l, int code, String str)
          Provide an explanation as to why the validator considers the ontology to be in a particular species.
 Map getOptions()
          Get options for this validator
 boolean isOWLDL(OWLOntology ontology)
          Returns true if the ontology is OWL-DL.
 boolean isOWLDL(URI uri)
          Returns true if the ontology obtained by parsing the URI is in OWL DL.
 boolean isOWLFull(OWLOntology ontology)
          Returns true if the ontology is OWL-Full.
 boolean isOWLFull(URI uri)
          Returns true if the ontology obtained by parsing the URI is in OWL Full.
 boolean isOWLLite(OWLOntology ontology)
          Returns true if the ontology is OWL-Lite.
 boolean isOWLLite(URI uri)
          Returns true if the ontology obtained by parsing the URI is in OWL Lite.
protected static String level(int l)
           
static void main(String[] args)
           
protected  void message(String str)
          Write a message.
static String readableCode(int code)
           
 void setConnection(OWLConnection connection)
          Set the connection (e.g. the implementation that the validator will choose to use when constructing ontologies.
 void setOptions(Map options)
          Set options for this validator
 void setReporter(SpeciesValidatorReporter reporter)
          Set the reporter that this speciesValidator will use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OTHER

protected static final int OTHER
See Also:
Constant Field Values
Constructor Detail

SpeciesValidator

public SpeciesValidator()
                 throws OWLException
Create a new validator. Will report to stdout by default.

Method Detail

setConnection

public void setConnection(OWLConnection connection)
Set the connection (e.g. the implementation that the validator will choose to use when constructing ontologies.

Specified by:
setConnection in interface SpeciesValidator

setReporter

public void setReporter(SpeciesValidatorReporter reporter)
Set the reporter that this speciesValidator will use. By default, the validator will write to stdout. If you want to stop this happening, set the reporter to null

Specified by:
setReporter in interface SpeciesValidator

explain

protected void explain(int l,
                       int code,
                       String str)
Provide an explanation as to why the validator considers the ontology to be in a particular species.

Parameters:
l - an int value
str - a String value

message

protected void message(String str)
Write a message.

Parameters:
str - a String value

level

protected static String level(int l)

setOptions

public void setOptions(Map options)
Set options for this validator

Specified by:
setOptions in interface SpeciesValidator
Parameters:
options - a Map value. Should contain a map from Strings to Strings.

getOptions

public Map getOptions()
Get options for this validator

Specified by:
getOptions in interface SpeciesValidator
Returns:
a Map value. Contains a map from Strings to Strings.

isOWLLite

public boolean isOWLLite(URI uri)
Returns true if the ontology obtained by parsing the URI is in OWL Lite. Will report findings to the reporter as it goes. Note that the inner workings of the validator assume that the ontology has not already been parsed.

Specified by:
isOWLLite in interface SpeciesValidator
Parameters:
uri - an URI value
Returns:
a boolean value

isOWLDL

public boolean isOWLDL(URI uri)
Returns true if the ontology obtained by parsing the URI is in OWL DL. Will report findings to the reporter as it goes. Note that the inner workings of the validator assume that the ontology has not already been parsed.

Specified by:
isOWLDL in interface SpeciesValidator
Parameters:
uri - an URI value
Returns:
a boolean value

isOWLFull

public boolean isOWLFull(URI uri)
Returns true if the ontology obtained by parsing the URI is in OWL Full. Will report findings to the reporter as it goes. Note that the inner workings of the validator assume that the ontology has not already been parsed.

Specified by:
isOWLFull in interface SpeciesValidator
Parameters:
uri - an URI value
Returns:
a boolean value

isOWLLite

public boolean isOWLLite(OWLOntology ontology)
                  throws OWLException
Returns true if the ontology is OWL-Lite. Will report findings to the reporter as it goes.

Specified by:
isOWLLite in interface SpeciesValidator
Parameters:
ontology - an OWLOntology value
Returns:
a boolean value
Throws:
OWLException - if an error occurs

isOWLDL

public boolean isOWLDL(OWLOntology ontology)
                throws OWLException
Returns true if the ontology is OWL-DL. Will report findings to the reporter as it goes.

Specified by:
isOWLDL in interface SpeciesValidator
Parameters:
ontology - an OWLOntology value
Returns:
a boolean value
Throws:
OWLException - if an error occurs

isOWLFull

public boolean isOWLFull(OWLOntology ontology)
                  throws OWLException
Returns true if the ontology is OWL-Full. Will report findings to the reporter as it goes.

Specified by:
isOWLFull in interface SpeciesValidator
Parameters:
ontology - an OWLOntology value
Returns:
a boolean value
Throws:
OWLException - if an error occurs

readableCode

public static String readableCode(int code)

main

public static void main(String[] args)


WonderWeb