org.semanticweb.owlapi.api.test
Class AbstractOWLAPITestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.semanticweb.owlapi.api.test.AbstractOWLAPITestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
AbstractFileTestCase, AbstractRoundTrippingTest, AnnotationPropertyReferencesTestCase, BuiltInPropertyTestCase, EquivalentClassesAxiomTestCase, NNFTestCase, OntologyMutationTestCase, OntologyURITestCase, OWLOntologyAccessorsTestCase, RenameEntityTestCase

public abstract class AbstractOWLAPITestCase
extends junit.framework.TestCase

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 10-May-2008


Constructor Summary
AbstractOWLAPITestCase()
           
 
Method Summary
 void addAxiom(OWLOntology ont, OWLAxiom ax)
           
 OWLDataFactory getFactory()
           
 OWLOntologyManager getManager()
           
 OWLAnnotationProperty getOWLAnnotationProperty(java.lang.String name)
           
 OWLClass getOWLClass(java.lang.String name)
           
 OWLDataProperty getOWLDataProperty(java.lang.String name)
           
 OWLDatatype getOWLDatatype(java.lang.String name)
           
 OWLNamedIndividual getOWLIndividual(java.lang.String name)
           
 OWLObjectProperty getOWLObjectProperty(java.lang.String name)
           
 OWLOntology getOWLOntology(java.lang.String name)
           
protected  void handleSaved(StringOutputTarget target, OWLOntologyFormat format)
           
protected  boolean isIgnoreDeclarationAxioms(OWLOntologyFormat format)
           
 OWLOntology loadOntology(java.lang.String fileName)
           
 void roundTripOntology(OWLOntology ont)
           
 void roundTripOntology(OWLOntology ont, OWLOntologyFormat format)
          Saves the specified ontology in the specified format and reloads it.
protected  void setUp()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractOWLAPITestCase

public AbstractOWLAPITestCase()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

getManager

public OWLOntologyManager getManager()

getFactory

public OWLDataFactory getFactory()

getOWLOntology

public OWLOntology getOWLOntology(java.lang.String name)

loadOntology

public OWLOntology loadOntology(java.lang.String fileName)

getOWLClass

public OWLClass getOWLClass(java.lang.String name)

getOWLObjectProperty

public OWLObjectProperty getOWLObjectProperty(java.lang.String name)

getOWLDataProperty

public OWLDataProperty getOWLDataProperty(java.lang.String name)

getOWLIndividual

public OWLNamedIndividual getOWLIndividual(java.lang.String name)

getOWLDatatype

public OWLDatatype getOWLDatatype(java.lang.String name)

getOWLAnnotationProperty

public OWLAnnotationProperty getOWLAnnotationProperty(java.lang.String name)

addAxiom

public void addAxiom(OWLOntology ont,
                     OWLAxiom ax)

roundTripOntology

public void roundTripOntology(OWLOntology ont)

roundTripOntology

public void roundTripOntology(OWLOntology ont,
                              OWLOntologyFormat format)
Saves the specified ontology in the specified format and reloads it. Calling this method from a test will cause the test to fail if the ontology could not be stored, could not be reloaded, or was reloaded and the reloaded version is not equal (in terms of ontology URI and axioms) with the original.

Parameters:
ont - The ontology to be round tripped.
format - The format to use when doing the round trip.

isIgnoreDeclarationAxioms

protected final boolean isIgnoreDeclarationAxioms(OWLOntologyFormat format)

handleSaved

protected void handleSaved(StringOutputTarget target,
                           OWLOntologyFormat format)