/** * Gets an auto-generated ontology document IRI. * * @return An auto-generated ontology document IRI. The IRI has the form {@code * owlapi:ontologyNNNNNNNNNNN} */ public static IRI generateDocumentIRI() { return getNextDocumentIRI("owlapi:ontology"); }
/** * Gets an auto-generated ontology document IRI. * * @return An auto-generated ontology document IRI. The IRI has the form {@code * owlapi:ontologyNNNNNNNNNNN} */ public static IRI generateDocumentIRI() { return getNextDocumentIRI("owlapi:ontology"); }
/** * Gets an auto-generated ontology document IRI. * * @return An auto-generated ontology document IRI. The IRI has the form {@code * owlapi:ontologyNNNNNNNNNNN} */ public static IRI generateDocumentIRI() { return getNextDocumentIRI("owlapi:ontology"); }
/** * Constructs an ontology input source using the specified file. * * @param iriPrefix document IRI prefix - used to generate a new IRI * @param format ontology format. If null, it is considered unspecified * @param mime mime type. If null or empty, it is considered unspecified. */ public OWLOntologyDocumentSourceBase(String iriPrefix, @Nullable OWLDocumentFormat format, @Nullable String mime) { this(IRI.getNextDocumentIRI(iriPrefix), format, mime); }
/** * Constructs an ontology input source using the specified file. * * @param iriPrefix document IRI prefix - used to generate a new IRI * @param format ontology format. If null, it is considered unspecified * @param mime mime type. If null or empty, it is considered unspecified. */ public OWLOntologyDocumentSourceBase(String iriPrefix, @Nullable OWLDocumentFormat format, @Nullable String mime) { this(IRI.getNextDocumentIRI(iriPrefix), format, mime); }
/** * Constructs an ontology input source using the specified file. * * @param iriPrefix document IRI prefix - used to generate a new IRI * @param format ontology format. If null, it is considered unspecified * @param mime mime type. If null or empty, it is considered unspecified. */ public OWLOntologyDocumentSourceBase(String iriPrefix, @Nullable OWLDocumentFormat format, @Nullable String mime) { this(IRI.getNextDocumentIRI(iriPrefix), format, mime); }
/** * Creates a RioMemoryTripleSource using an {@link Iterable} of * {@link Statement} objects. * * @param statements An {@link Iterator} of {@link Statement} objects that make up this source. */ public RioMemoryTripleSource(Iterator<Statement> statements) { documentIRI = IRI.getNextDocumentIRI("rio-memory-triples:"); statementIterator = checkNotNull(statements, "statements cannot be null"); }
/** * Creates a new ontology that is initialised to contain specific axioms. The ontology will not * have an IRI. The document IRI of the created ontology will be auto-generated. * * @param axioms The axioms that should be copied into the new ontology * @return An ontology without an IRI that contains all of the specified axioms * @throws OWLOntologyCreationException if there was a problem creating the new ontology. * @throws OWLOntologyChangeException if there was a problem copying the axioms. */ default OWLOntology createOntology(Stream<OWLAxiom> axioms) throws OWLOntologyCreationException { return createOntology(axioms, IRI.getNextDocumentIRI("urn:unnamed:ontology#ont")); }
/** * Creates a RioMemoryTripleSource using an {@link Iterable} of * {@link Statement} objects. * * @param statements An {@link Iterator} of {@link Statement} objects that make up this source. */ public RioMemoryTripleSource(Iterator<Statement> statements) { documentIRI = IRI.getNextDocumentIRI("rio-memory-triples:"); statementIterator = checkNotNull(statements, "statements cannot be null"); }
/** * Creates a RioMemoryTripleSource using a closeable iteration. Internally * this wraps the statements as an Iterator, and hence all statements must * be read for the iterator to be closed automatically. * * @param statements A {@link CloseableIteration} of {@link Statement} objects that make up this * source. */ public RioMemoryTripleSource( final CloseableIteration<Statement, ? extends RDF4JException> statements) { documentIRI = IRI.getNextDocumentIRI("rio-memory-triples:"); statementIterator = new StatementIterator(statements); }
/** * Creates a new ontology that is initialised to contain specific axioms. The ontology will not * have an IRI. The document IRI of the created ontology will be auto-generated. * * @param axioms The axioms that should be copied into the new ontology * @return An ontology without an IRI that contains all of the specified axioms * @throws OWLOntologyCreationException if there was a problem creating the new ontology. * @throws OWLOntologyChangeException if there was a problem copying the axioms. */ default OWLOntology createOntology(Collection<OWLAxiom> axioms) throws OWLOntologyCreationException { return createOntology(axioms, IRI.getNextDocumentIRI("urn:unnamed:ontology#ont")); }
public static OWLLiteral createOWLLiteral() { return Literal("Test" + System.currentTimeMillis(), Datatype(getNextDocumentIRI(URNTESTS_URI))); }
private void mergeImportsClosure() { OWLOntology o = ontology; try { ontology = man .createOntology(IRI.getNextDocumentIRI("http://debugger.semanticweb.org/ontolog"), o.importsClosure(), true); } catch (OWLOntologyCreationException e) { throw new OWLRuntimeException(e); } }
private void mergeImportsClosure() { OWLOntology o = ontology; try { ontology = man .createOntology(IRI.getNextDocumentIRI("http://debugger.semanticweb.org/ontolog"), o.importsClosure(), true); } catch (OWLOntologyCreationException e) { throw new OWLRuntimeException(e); } }
private void mergeImportsClosure() { OWLOntology o = ontology; try { ontology = man .createOntology(IRI.getNextDocumentIRI("http://debugger.semanticweb.org/ontolog"), o.importsClosure(), true); } catch (OWLOntologyCreationException e) { throw new OWLRuntimeException(e); } }
private void mergeImportsClosure() { OWLOntology o = ontology; try { ontology = man .createOntology(IRI.getNextDocumentIRI("http://debugger.semanticweb.org/ontolog"), o.importsClosure(), true); } catch (OWLOntologyCreationException e) { throw new OWLRuntimeException(e); } }
@Override public void visit(OWLSubObjectPropertyOfAxiom axiom) { // subProp some {a} subClassOf supProp some {a} OWLIndividual ind = dataFactory .getOWLNamedIndividual(IRI.getNextDocumentIRI("http://debugger.com#A")); OWLClassExpression sub = dataFactory.getOWLObjectHasValue(axiom.getSubProperty(), ind); OWLClassExpression sup = dataFactory.getOWLObjectHasValue(axiom.getSuperProperty(), ind); OWLAxiom ax = dataFactory.getOWLSubClassOfAxiom(sub, sup); ax.accept(this); }
@Override public void visit(OWLSubObjectPropertyOfAxiom axiom) { // subProp some {a} subClassOf supProp some {a} OWLIndividual ind = dataFactory .getOWLNamedIndividual(IRI.getNextDocumentIRI("http://debugger.com#A")); OWLClassExpression sub = dataFactory.getOWLObjectHasValue(axiom.getSubProperty(), ind); OWLClassExpression sup = dataFactory.getOWLObjectHasValue(axiom.getSuperProperty(), ind); OWLAxiom ax = dataFactory.getOWLSubClassOfAxiom(sub, sup); ax.accept(this); }
@Override public void visit(OWLSubObjectPropertyOfAxiom axiom) { // subProp some {a} subClassOf supProp some {a} OWLIndividual ind = dataFactory .getOWLNamedIndividual(IRI.getNextDocumentIRI("http://debugger.com#A")); OWLClassExpression sub = dataFactory.getOWLObjectHasValue(axiom.getSubProperty(), ind); OWLClassExpression sup = dataFactory.getOWLObjectHasValue(axiom.getSuperProperty(), ind); OWLAxiom ax = dataFactory.getOWLSubClassOfAxiom(sub, sup); ax.accept(this); }
@Override public void visit(OWLSubObjectPropertyOfAxiom axiom) { // subProp some {a} subClassOf supProp some {a} OWLIndividual ind = dataFactory .getOWLNamedIndividual(IRI.getNextDocumentIRI("http://debugger.com#A")); OWLClassExpression sub = dataFactory.getOWLObjectHasValue(axiom.getSubProperty(), ind); OWLClassExpression sup = dataFactory.getOWLObjectHasValue(axiom.getSuperProperty(), ind); OWLAxiom ax = dataFactory.getOWLSubClassOfAxiom(sub, sup); ax.accept(this); }