Package org.semanticweb.owlapi.io

Examples of org.semanticweb.owlapi.io.StreamDocumentTarget


        assertTrue(containsConsider(ont2, axAsubB));
        @SuppressWarnings("null")
        @Nonnull
        File savedLocation1 = folder.newFile("testont1B.owl");
        FileOutputStream out1 = new FileOutputStream(savedLocation1);
        StreamDocumentTarget writer1 = new StreamDocumentTarget(out1);
        ont1.getOWLOntologyManager().saveOntology(ont1, format, writer1);
        @SuppressWarnings("null")
        @Nonnull
        File savedLocation2 = folder.newFile("testont2B.owl");
        FileOutputStream out2 = new FileOutputStream(savedLocation2);
        StreamDocumentTarget writer2 = new StreamDocumentTarget(out2);
        ont2.getOWLOntologyManager().saveOntology(ont2, format, writer2);
        OWLOntologyManager man = OWLManager.createOWLOntologyManager();
        @SuppressWarnings("unused")
        OWLOntology ont1L = man
                .loadOntologyFromOntologyDocument(savedLocation1);
View Full Code Here


        ByteArrayOutputStream out = new ByteArrayOutputStream();
        if(object instanceof OWLOntology){
            OWLOntology o = (OWLOntology) object;
            ManchesterOWLSyntaxOntologyStorer mosos = new ManchesterOWLSyntaxOntologyStorer();
            try {
                mosos.storeOntology(o.getOWLOntologyManager(), o, new StreamDocumentTarget(out), new ManchesterOWLSyntaxOntologyFormat());
            } catch (OWLOntologyStorageException e) {
                log.error("Cannot stream the ontology",e);
                throw new RuntimeException(e);
            }
        }else if (object instanceof Model){
View Full Code Here

        output("Unreparable lints:");
        for( Lint lint : unreparableLints ) {
          output( lint.toString() );
        }
      }
      manager.saveOntology( rootOntologyLints.getOntology(), new StreamDocumentTarget( new FileOutputStream( m_OutputOntologyPath ) ) );
      output( "Saved to " + m_OutputOntologyPath );

    }
  }
View Full Code Here

        output("Unreparable lints:");
        for( Lint lint : unreparableLints ) {
          output( lint.toString() );
        }
      }
      manager.saveOntology( rootOntologyLints.getOntology(), new StreamDocumentTarget( new FileOutputStream( m_OutputOntologyPath ) ) );
      output( "Saved to " + m_OutputOntologyPath );

    }
  }
View Full Code Here

            throw new OWLOntologyStorageIOException(e);
        }
    }

    public void saveOntology(OWLOntology ontology, OutputStream outputStream) throws OWLOntologyStorageException {
        saveOntology(ontology, new StreamDocumentTarget(outputStream));
    }
View Full Code Here

    public void saveOntology(OWLOntology ontology, OutputStream outputStream) throws OWLOntologyStorageException {
        saveOntology(ontology, new StreamDocumentTarget(outputStream));
    }

    public void saveOntology(OWLOntology ontology, OWLOntologyFormat ontologyFormat, OutputStream outputStream) throws OWLOntologyStorageException {
        saveOntology(ontology, ontologyFormat, new StreamDocumentTarget(outputStream));
    }
View Full Code Here

  public static void save( Taxonomy<OWLClass> taxonomy,
      OutputStream outputStream ) throws IOException {
    try {
      OWLOntology ontology = createTaxonomyOntology( taxonomy );

      OWL.manager.saveOntology( ontology, new OWLXMLOntologyFormat(), new StreamDocumentTarget( outputStream) );
     
      outputStream.flush();
     
      OWL.manager.removeOntology( ontology );
    } catch( OWLException e ) {
View Full Code Here

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        if(object instanceof OWLOntology){
            OWLOntology o = (OWLOntology) object;
            ManchesterOWLSyntaxOntologyStorer mosos = new ManchesterOWLSyntaxOntologyStorer();
            try {
                mosos.storeOntology(o.getOWLOntologyManager(), o, new StreamDocumentTarget(out), new ManchesterOWLSyntaxOntologyFormat());
            } catch (OWLOntologyStorageException e) {
                log.error("Cannot stream the ontology",e);
                throw new RuntimeException(e);
            }
        }else if (object instanceof Model){
View Full Code Here

TOP

Related Classes of org.semanticweb.owlapi.io.StreamDocumentTarget

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.