Package owlOntologies

Examples of owlOntologies.CreateOntologyFromThesaurus


 
  @Test
  //you will have to adjust these paths for the machine this is run on. 
  //NOTE!!  the corpus file can ONLY contain the word "foal"  thats it
  public void testBuildOntologyFromScratch() throws OWLOntologyCreationException, OWLOntologyStorageException, IOException {
    CreateOntologyFromThesaurus cot = new CreateOntologyFromThesaurus();
    String ontologyLocation = "/home/nicholas/research/Experiments/DataONEjava/outputTest.owl";
    cot.buildOntologyFromScratch("/home/nicholas/research/Experiments/DataONEjava/unitTestData/testForCreateOntologyFromThesaurus.txt", ontologyLocation);
    //first, test that it wrote SOMETHING to the ontology location
    File f = new File(ontologyLocation);
    assertTrue(f.exists());
   
    //second, load it up and check that it contains the following classes
View Full Code Here


   
  }
 
  @Test
  public void testAddToOntology() throws OWLOntologyCreationException, OWLOntologyStorageException, IOException {
    CreateOntologyFromThesaurus cot = new CreateOntologyFromThesaurus();
    String ontologyLocation = "/home/nicholas/research/Experiments/DataONEjava/outputTest.owl";
    cot.buildOntologyFromScratch("/home/nicholas/research/Experiments/DataONEjava/unitTestData/testForCreateOntologyFromThesaurus.txt", ontologyLocation);
   
    cot.addToOntology(ontologyLocation, "genoa");
   
    MyOwlOntologyManager myOwl = new MyOwlOntologyManager();
    OWLOntologyManager manager = myOwl.loadOntologyFromFile(ontologyLocation);
   
    OWLOntology ontology = manager.getOntology(myOwl.getCurrentOntologyID());
View Full Code Here

   
  }
 
  @Test
  public void shouldMergeOntologies() throws OWLOntologyStorageException, OWLOntologyCreationException{
    CreateOntologyFromThesaurus cot = new CreateOntologyFromThesaurus();
    cot.mergeOntology("/home/nicholas/research/Experiments/DataONEjava/unitTestData/ontologyMergerTest1.owl",
        "/home/nicholas/research/Experiments/DataONEjava/unitTestData/ontologyMergerTest2.owl",
        "/home/nicholas/research/Experiments/DataONEjava/unitTestData/ontologyMergerResults.owl");
   
    File f = new File("/home/nicholas/research/Experiments/DataONEjava/unitTestData/ontologyMergerResults.owl");
    assertTrue(f.exists());
View Full Code Here

TOP

Related Classes of owlOntologies.CreateOntologyFromThesaurus

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.