Package com.clarkparsia.modularity

Examples of com.clarkparsia.modularity.ModuleExtractor


    File testFile = new File( TEST_FILE );
    OWLOntology ontology = OntologyUtils.loadOntology( inputOnt );
   
    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
View Full Code Here


    File testFile = new File( TEST_FILE );
    OWLOntology ontology = OntologyUtils.loadOntology( inputOnt );
   
    try {
      PelletReasoner unified = PelletReasonerFactory.getInstance().createReasoner( ontology );
      ModuleExtractor moduleExtractor = createModuleExtractor();

      IncrementalClassifier modular = new IncrementalClassifier( unified, moduleExtractor );

      modular.classify();
View Full Code Here

  public void testPersistenceRemoves(String inputOnt) throws IOException {
    File testFile = new File( TEST_FILE );
    OWLOntology ontology = OntologyUtils.loadOntology( inputOnt );
   
    try {   
      ModuleExtractor moduleExtractor = createModuleExtractor();

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

      List<OWLAxiom> axiomsToRemove = new ArrayList<OWLAxiom>( TestUtils.selectRandomAxioms( ontology, 1 ) );
View Full Code Here

  public void testPersistenceAdds(String inputOnt) throws IOException {
    File testFile = new File( TEST_FILE );
    OWLOntology ontology = OntologyUtils.loadOntology( inputOnt );
   
    try {   
      ModuleExtractor moduleExtractor = createModuleExtractor();

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

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

  public void testAllowedUpdates(String inputOnt) throws IOException {
    File testFile = new File( TEST_FILE );
    OWLOntology ontology = OntologyUtils.loadOntology( inputOnt );
   
    try {
      ModuleExtractor moduleExtractor = createModuleExtractor();

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

      // first remove a random axiom
View Full Code Here

  public void testUpdatesAfterPersistence(String inputOnt) throws IOException {
    File testFile = new File( TEST_FILE );
    OWLOntology ontology = OntologyUtils.loadOntology( inputOnt );
   
    try {   
      ModuleExtractor moduleExtractor = createModuleExtractor();

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

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

    File testFile = new File( TEST_FILE );
    OWLOntology ontology = OntologyUtils.loadOntology( inputOnt );
   
    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
View Full Code Here

   * @return the newly created incremental classifier
   * @throws IOException if an error should occur during the reading
   * @throws OWLReasonerException
   */
  public static IncrementalClassifier load( InputStream inputStream, OWLOntology loadedOntology ) throws IOException {
    ModuleExtractor extractor = null;
    Taxonomy<OWLClass> taxonomy = null;
   
    ZipInputStream zipInputStream = new ZipInputStream( inputStream );
   
    extractor = ModuleExtractorFactory.createModuleExtractor();
    extractor.load( zipInputStream );
   
    ZipEntry currentEntry = zipInputStream.getNextEntry();
   
    if( !( TAXONOMY_FILE_NAME.equals( currentEntry.getName() ) ) ) {
      throw new IOException ( String.format( "Unexpected entry (%s) in ZipInputStream. Expected %s", currentEntry.getName(), TAXONOMY_FILE_NAME ) );
View Full Code Here

    return new AxiomBasedModuleExtractor();
  }
 
  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();
View Full Code Here

TOP

Related Classes of com.clarkparsia.modularity.ModuleExtractor

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.