Package com.clarkparsia.modularity

Examples of com.clarkparsia.modularity.IncrementalClassifier.classify()


   
    try {
      ModuleExtractor moduleExtractor = createModuleExtractor();

      IncrementalClassifier modular = PelletIncremantalReasonerFactory.getInstance().createReasoner( ontology, moduleExtractor );
      modular.classify();

      // first remove a random axiom
      List<OWLAxiom> axiomsToRemove = new ArrayList<OWLAxiom>( TestUtils.selectRandomAxioms( ontology, 1 ) );

      for( OWLAxiom axiomToRemove : axiomsToRemove ) {
View Full Code Here


      for( OWLAxiom axiomToRemove : axiomsToRemove2 ) {
        OWL.manager.applyChange( new RemoveAxiom(ontology, axiomToRemove ) );
      }

      // classify (i.e., update)
      modular.classify();

      // at this point, the ontology should be updated (despite the changes), and the save should succeed.   
      FileOutputStream fos = new FileOutputStream( testFile );

      IncrementalClassifierPersistence.save( modular, fos );
View Full Code Here

   
    try {   
      ModuleExtractor moduleExtractor = createModuleExtractor();

      IncrementalClassifier modular = PelletIncremantalReasonerFactory.getInstance().createReasoner( ontology, moduleExtractor );
      modular.classify();

      FileOutputStream fos = new FileOutputStream( testFile );

      IncrementalClassifierPersistence.save( modular, fos );
View Full Code Here

      for( OWLAxiom axiomToRemove : axiomsToRemove ) {
        OWL.manager.applyChange( new RemoveAxiom( modular.getRootOntology(), axiomToRemove) );
      }

      modular.classify();

      PelletReasoner expected = PelletReasonerFactory.getInstance().createReasoner( modular.getRootOntology() );   

      assertClassificationEquals( expected, modular );
    } finally {
View Full Code Here

    File testFile = new File( TEST_FILE );
    OWLOntology ontology = OntologyUtils.loadOntology( inputOnt );
   
    try {
      IncrementalClassifier modular = PelletIncremantalReasonerFactory.getInstance().createReasoner( ontology, createModuleExtractor() );   
      modular.classify();

      FileOutputStream fos = new FileOutputStream( testFile );

      IncrementalClassifierPersistence.save( modular, fos );
View Full Code Here

      for( OWLAxiom axiomToRemove : axiomsToRemove ) {
        OWL.manager.applyChange( new RemoveAxiom(ontology, axiomToRemove ) );
      }

      modular.classify();

      PelletReasoner expected = PelletReasonerFactory.getInstance().createReasoner( ontology );

      assertClassificationEquals( expected, modular );
    } finally {
View Full Code Here

    File testFile = new File( TEST_FILE );
    OWLOntology ontology = OntologyUtils.loadOntology( inputOnt );
   
    try {
      IncrementalClassifier modular = PelletIncremantalReasonerFactory.getInstance().createReasoner( ontology, createModuleExtractor() );   
      modular.classify();

      FileOutputStream fos = new FileOutputStream( testFile );

      IncrementalClassifierPersistence.save( modular, fos );
View Full Code Here

    try {
      PelletReasoner unified = PelletReasonerFactory.getInstance().createReasoner( ontology );
      ModuleExtractor moduleExtractor = createModuleExtractor();

      IncrementalClassifier modular = new IncrementalClassifier( unified, moduleExtractor );
      modular.classify();

      // first we only persist classified-but-not-realized classifier
      assertFalse( modular.isRealized() );

      FileOutputStream fos = new FileOutputStream( testFile );
View Full Code Here

  private void testPersistence( OWLOntology ontology ) throws IOException {
    File testFile = new File( TEST_FILE );
    ModuleExtractor moduleExtractor = createModuleExtractor();
   
    IncrementalClassifier modular = PelletIncremantalReasonerFactory.getInstance().createReasoner( ontology, moduleExtractor )
    modular.classify();
   
    MultiValueMap<OWLEntity, OWLEntity> expectedModules = modular.getModules();
     
    FileOutputStream fos = new FileOutputStream( testFile );
 
View Full Code Here

  public void addNonLocal() throws OWLException {
    OWLAxiom[] axioms = { subClassOf( A, B ), subClassOf( C, D ) };
    createOntology( axioms );

    IncrementalClassifier modular = PelletIncremantalReasonerFactory.getInstance().createReasoner( ontology );
    modular.classify();
   
    assertTrue( modular.isEntailed( subClassOf( A, B ) ) );
    assertFalse( modular.isEntailed( subClassOf( B, C ) ) );
    assertTrue( modular.isEntailed( subClassOf( C, D ) ) );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.