@Override public OWLOntology loadOntologyFromOntologyDocument(InputStream inputStream) throws OWLOntologyCreationException { // XXX check default return loadOntologyFromOntologyDocument(new StreamDocumentSource(inputStream)); }
/** * Constructs an input source which will read an ontology from * a representation from the specified stream. * @param is The stream that the ontology representation will be * read from. */ public StreamDocumentSource(InputStream is) { this(is, getNextDocumentIRI()); }
/** * Constructs an input source which will read an ontology from * a representation from the specified stream. * @param stream The stream that the ontology representation will be * read from. * @param documentIRI The document IRI */ public StreamDocumentSource(InputStream stream, IRI documentIRI) { this.documentIRI = documentIRI; readIntoBuffer(stream); }
@Override public OWLOntology loadOntologyFromOntologyDocument(InputStream inputStream) throws OWLOntologyCreationException { // XXX check default return loadOntologyFromOntologyDocument(new StreamDocumentSource(inputStream)); }
@Override public OWLOntology loadOntologyFromOntologyDocument(InputStream inputStream) throws OWLOntologyCreationException { // XXX check default return loadOntologyFromOntologyDocument(new StreamDocumentSource(inputStream)); }
@Override public OWLOntology loadOntologyFromOntologyDocument(InputStream inputStream) throws OWLOntologyCreationException { // XXX check default return loadOntologyFromOntologyDocument(new StreamDocumentSource(inputStream)); }
public OWLOntology loadOntologyFromOntologyDocument(InputStream inputStream) throws OWLOntologyCreationException { return loadOntologyFromOntologyDocument(new StreamDocumentSource(inputStream)); }
/** * Loads an ontology from an ontology document obtained from an input stream. The loaded * ontology will be assigned an auto-generated document IRI with "inputstream" as its scheme. * * @param inputStream The input stream that can be used to obtain a representation of an * ontology * @return The ontology that was parsed from the input stream. * @throws OWLOntologyCreationException If there was a problem in creating and loading the * ontology. * @throws org.semanticweb.owlapi.io.UnparsableOntologyException if the ontology could not be * parsed. * @throws UnloadableImportException if the ontology imports ontologies and one of the imports * could not be loaded for what ever reason. If the * {@link MissingImportHandlingStrategy} is set to * {@link MissingImportHandlingStrategy#SILENT} then this exception will not be thrown. * The {@code UnloadableImportException} contains information about the import * declaration that triggered the import and the cause of this exception is an {@code * OWLOntologyCreationException} which contains information about why the import could not be * loaded. * @throws org.semanticweb.owlapi.io.OWLOntologyCreationIOException if there was an {@code * IOException} when trying to load the ontology. * @throws OWLOntologyAlreadyExistsException if the manager already contains an ontology whose * ontology IRI and version IRI is the same as the ontology IRI and version IRI of the * ontology obtained from parsing the content of the input stream. */ default OWLOntology loadOntologyFromOntologyDocument(InputStream inputStream) throws OWLOntologyCreationException { return loadOntologyFromOntologyDocument(new StreamDocumentSource(inputStream)); }
/** * Loads an ontology from an ontology document obtained from an input stream. The loaded * ontology will be assigned an auto-generated document IRI with "inputstream" as its scheme. * * @param inputStream The input stream that can be used to obtain a representation of an * ontology * @return The ontology that was parsed from the input stream. * @throws OWLOntologyCreationException If there was a problem in creating and loading the * ontology. * @throws org.semanticweb.owlapi.io.UnparsableOntologyException if the ontology could not be * parsed. * @throws UnloadableImportException if the ontology imports ontologies and one of the imports * could not be loaded for what ever reason. If the * {@link MissingImportHandlingStrategy} is set to * {@link MissingImportHandlingStrategy#SILENT} then this exception will not be thrown. * The {@code UnloadableImportException} contains information about the import * declaration that triggered the import and the cause of this exception is an {@code * OWLOntologyCreationException} which contains information about why the import could not be * loaded. * @throws org.semanticweb.owlapi.io.OWLOntologyCreationIOException if there was an {@code * IOException} when trying to load the ontology. * @throws OWLOntologyAlreadyExistsException if the manager already contains an ontology whose * ontology IRI and version IRI is the same as the ontology IRI and version IRI of the * ontology obtained from parsing the content of the input stream. */ default OWLOntology loadOntologyFromOntologyDocument(InputStream inputStream) throws OWLOntologyCreationException { return loadOntologyFromOntologyDocument(new StreamDocumentSource(inputStream)); }
/** * Loads an ontology from an ontology document obtained from an input stream. The loaded * ontology will be assigned an auto-generated document IRI with "inputstream" as its scheme. * * @param inputStream The input stream that can be used to obtain a representation of an * ontology * @return The ontology that was parsed from the input stream. * @throws OWLOntologyCreationException If there was a problem in creating and loading the * ontology. * @throws org.semanticweb.owlapi.io.UnparsableOntologyException if the ontology could not be * parsed. * @throws UnloadableImportException if the ontology imports ontologies and one of the imports * could not be loaded for what ever reason. If the * {@link MissingImportHandlingStrategy} is set to * {@link MissingImportHandlingStrategy#SILENT} then this exception will not be thrown. * The {@code UnloadableImportException} contains information about the import * declaration that triggered the import and the cause of this exception is an {@code * OWLOntologyCreationException} which contains information about why the import could not be * loaded. * @throws org.semanticweb.owlapi.io.OWLOntologyCreationIOException if there was an {@code * IOException} when trying to load the ontology. * @throws OWLOntologyAlreadyExistsException if the manager already contains an ontology whose * ontology IRI and version IRI is the same as the ontology IRI and version IRI of the * ontology obtained from parsing the content of the input stream. */ default OWLOntology loadOntologyFromOntologyDocument(InputStream inputStream) throws OWLOntologyCreationException { return loadOntologyFromOntologyDocument(new StreamDocumentSource(inputStream)); }
parser.parse( new StreamDocumentSource( in ), ontology );
@Override public void parse(@Nullable InputStream in, @Nullable String baseURI) { OWLDocumentFormat nextFormat = getRDFFormat().getOWLFormat(); String mime = getRDFFormat().getDefaultMIMEType(); IRI iri = IRI.create(checkNotNull(baseURI)); render(new StreamDocumentSource(checkNotNull(in), iri, nextFormat, mime)); }
log.debug("Try to load the configuration ontology from a local bundle relative path"); InputStream is = this.getClass().getResourceAsStream(configPath); oConfSrc = new StreamDocumentSource(is); } catch (Exception e1) { try {
log.debug("Try to load the configuration ontology from a local bundle relative path"); InputStream is = this.getClass().getResourceAsStream(configPath); oConfSrc = new StreamDocumentSource(is); } catch (Exception e1) { try {
@Override public void parse(@Nullable InputStream in, @Nullable String baseURI) { OWLDocumentFormat nextFormat = getRDFFormat().getOWLFormat(); String mime = getRDFFormat().getDefaultMIMEType(); IRI iri = IRI.create(checkNotNull(baseURI)); render(new StreamDocumentSource(checkNotNull(in), iri, nextFormat, mime)); }
new StreamDocumentSource(inputStream, IRI.create(actualBaseUri), formatFactory);
if (dataFileProvider != null && dataFileProvider.isAvailable(null, loc, info)) src = new StreamDocumentSource( dataFileProvider.getInputStream(null, loc, info));
if (dataFileProvider != null && dataFileProvider.isAvailable(null, loc, info)) src = new StreamDocumentSource( dataFileProvider.getInputStream(null, loc, info));
new StreamDocumentSource(this.input, IRI.create("http://purl.obolibrary.org/obo/po.owl"), formatFactory);