/** * @param iri the iri to check * @return true if the input iri matches the ontology iri or the version iri */ public boolean match(IRI iri) { return matchOntology(iri) || matchVersion(iri); }
/** * @param iri the iri to check * @return true if the input iri matches the ontology iri or the version iri */ public boolean match(IRI iri) { return matchOntology(iri) || matchVersion(iri); }
/** * @param iri the iri to check * @return true if the input iri matches the ontology iri or the version iri */ public boolean match(IRI iri) { return matchOntology(iri) || matchVersion(iri); }
/** * Gets the versions (if any) of the ontology that have the specified IRI * * @param ontology The ontology IRI * @return The set of ontologies that have the specified ontology IRI. */ default Stream<OWLOntology> versions(IRI ontology) { return ontologies().filter(o -> o.getOntologyID().matchOntology(ontology)); }
/** * Gets the versions (if any) of the ontology that have the specified IRI * * @param ontology The ontology IRI * @return The set of ontologies that have the specified ontology IRI. */ default Stream<OWLOntology> versions(IRI ontology) { return ontologies().filter(o -> o.getOntologyID().matchOntology(ontology)); }
/** * Gets the versions (if any) of the ontology that have the specified IRI * * @param ontology The ontology IRI * @return The set of ontologies that have the specified ontology IRI. */ default Stream<OWLOntology> versions(IRI ontology) { return ontologies().filter(o -> o.getOntologyID().matchOntology(ontology)); }
@Override @Nullable public OWLOntology getOntology(OWLOntologyID id) { readLock.lock(); try { OWLOntology result = ontologiesByID.get(id); if (result == null && !id.isAnonymous()) { java.util.Optional<OWLOntologyID> findAny = ids().filter(o -> o.matchOntology(id.getOntologyIRI().get())).findAny(); if (findAny.isPresent()) { result = ontologiesByID.get(findAny.get()); } } // HACK: This extra clause is necessary to make getOntology match // the behaviour of createOntology in cases where a documentIRI has // been recorded, based on the mappers, but an ontology has not // been stored in ontologiesByID if (result == null) { checkDocumentIRI(id); } return result; } finally { readLock.unlock(); } }
@Override @Nullable public OWLOntology getOntology(OWLOntologyID id) { readLock.lock(); try { OWLOntology result = ontologiesByID.get(id); if (result == null && !id.isAnonymous()) { java.util.Optional<OWLOntologyID> findAny = ids().filter(o -> o.matchOntology(id.getOntologyIRI().get())).findAny(); if (findAny.isPresent()) { result = ontologiesByID.get(findAny.get()); } } // HACK: This extra clause is necessary to make getOntology match // the behaviour of createOntology in cases where a documentIRI has // been recorded, based on the mappers, but an ontology has not // been stored in ontologiesByID if (result == null) { checkDocumentIRI(id); } return result; } finally { readLock.unlock(); } }
@Override @Nullable public OWLOntology getOntology(OWLOntologyID id) { readLock.lock(); try { OWLOntology result = ontologiesByID.get(id); if (result == null && !id.isAnonymous()) { java.util.Optional<OWLOntologyID> findAny = ids().filter(o -> o.matchOntology(id.getOntologyIRI().get())).findAny(); if (findAny.isPresent()) { result = ontologiesByID.get(findAny.get()); } } // HACK: This extra clause is necessary to make getOntology match // the behaviour of createOntology in cases where a documentIRI has // been recorded, based on the mappers, but an ontology has not // been stored in ontologiesByID if (result == null) { checkDocumentIRI(id); } return result; } finally { readLock.unlock(); } }
@Override @Nullable public OWLOntology getOntology(OWLOntologyID id) { readLock.lock(); try { OWLOntology result = ontologiesByID.get(id); if (result == null && !id.isAnonymous()) { java.util.Optional<OWLOntologyID> findAny = ids().filter(o -> o.matchOntology(id.getOntologyIRI().get())).findAny(); if (findAny.isPresent()) { result = ontologiesByID.get(findAny.get()); } } // HACK: This extra clause is necessary to make getOntology match // the behaviour of createOntology in cases where a documentIRI has // been recorded, based on the mappers, but an ontology has not // been stored in ontologiesByID if (result == null) { checkDocumentIRI(id); } return result; } finally { readLock.unlock(); } }