Refine search
/** * @param ontology ontology */ public UseOfReservedVocabularyForOntologyIRI(OWLOntology ontology) { super(ontology, null, ontology.getOntologyID().getOntologyIRI().get()); }
/** * Transform a collection of ontology ids to a collection of IRIs of those ontology ids. * Anonymous ontology ids are skipped. * * @param ids ontology ids to transform * @return collection of IRIs for the ontology ids. */ public static Stream<IRI> ontologyIRIs(Stream<OWLOntologyID> ids) { return ids.filter(i -> i.getOntologyIRI().isPresent()).map(i -> i.getOntologyIRI().get()); } }
@Override public URI getURI() { if(onto != null && onto.getOntologyID() != null && onto.getOntologyID().getOntologyIRI() != null) { return onto.getOntologyID().getOntologyIRI().toURI(); } else { return null; } }
/** * @param ontology ontology */ public UseOfReservedVocabularyForOntologyIRI(OWLOntology ontology) { super(ontology, null, ontology.getOntologyID().getOntologyIRI().get()); }
/** * Transform a collection of ontology ids to a collection of IRIs of those ontology ids. * Anonymous ontology ids are skipped. * * @param ids ontology ids to transform * @return collection of IRIs for the ontology ids. */ public static Stream<IRI> ontologyIRIs(Stream<OWLOntologyID> ids) { return ids.filter(i -> i.getOntologyIRI().isPresent()).map(i -> i.getOntologyIRI().get()); } }
@Override public void visit(final OWLOntology ontology) { write(ontology.getOntologyID().getOntologyIRI().orElse(null)); }
/** * @param ontology ontology */ public UseOfReservedVocabularyForOntologyIRI(OWLOntology ontology) { super(ontology, null, ontology.getOntologyID().getOntologyIRI().get()); }
/** * Transform a collection of ontology ids to a collection of IRIs of those ontology ids. * Anonymous ontology ids are skipped. * * @param ids ontology ids to transform * @return collection of IRIs for the ontology ids. */ public static Stream<IRI> ontologyIRIs(Stream<OWLOntologyID> ids) { return ids.filter(i -> i.getOntologyIRI().isPresent()).map(i -> i.getOntologyIRI().get()); } }
private Set<OWLOntology> getOntologiesInSeries(OWLOntology ontology, Collection<OWLOntology> ontologies) { Set<OWLOntology> ontologiesInSeries = new HashSet<OWLOntology>(); if (!ontology.getOntologyID().isAnonymous()){ for (OWLOntology ont : ontologies){ if (!ont.getOntologyID().isAnonymous() && ont.getOntologyID().getOntologyIRI().equals(ontology.getOntologyID().getOntologyIRI())){ ontologiesInSeries.add(ont); } } } return ontologiesInSeries; }
/** * E.g. http://purl.obolibrary.org/obo/go.owl to "go"<br> * if does not match this pattern, then retain original IRI * * @param ontology the ontology * @return The OBO ID of the ontology */ public static String getOntologyId(OWLOntology ontology) { return getOntologyId(ontology.getOntologyID().getOntologyIRI().get()); }
private static byte[] bytesOfOntologyId(final OWLOntologyID ontologyID) { if (ontologyID.getVersionIRI().isPresent()) return (ontologyID.getOntologyIRI().get() + " " + ontologyID.getVersionIRI().get()).getBytes(); else return ontologyID.getOntologyIRI().get().toString().getBytes(); }
@Override public void visit(final OWLOntology ontology) { write(ontology.getOntologyID().getOntologyIRI().orElse(null)); }
/** * E.g. http://purl.obolibrary.org/obo/go.owl to "go"<br> * if does not match this pattern, then retain original IRI * * @param ontology the ontology * @return The OBO ID of the ontology */ public static String getOntologyId(OWLOntology ontology) { return getOntologyId(ontology.getOntologyID().getOntologyIRI().get()); }
private static byte[] bytesOfOntologyId(final OWLOntologyID ontologyID) { if (ontologyID.getVersionIRI().isPresent()) return (ontologyID.getOntologyIRI().get() + " " + ontologyID.getVersionIRI().get()).getBytes(); else return ontologyID.getOntologyIRI().get().toString().getBytes(); }
public String getDetailedDescription() { StringBuffer sb = new StringBuffer("This ontology indirectly imports the following ontologies that have rdf serialization problems:\n"); sb.append("\t<ul>\n"); for (OWLOntology badOntology : badImports) { sb.append("\t\t<li>" + badOntology.getOntologyID().getOntologyIRI().toString()); sb.append('\n'); } sb.append("\t</ul>\n"); return sb.toString(); }
/** * E.g. http://purl.obolibrary.org/obo/go.owl to "go"<br> * if does not match this pattern, then retain original IRI * * @param ontology the ontology * @return The OBO ID of the ontology */ public static String getOntologyId(OWLOntology ontology) { return getOntologyId(ontology.getOntologyID().getOntologyIRI().get()); }
private static byte[] bytesOfOntologyId(final OWLOntologyID ontologyID) { if (ontologyID.getVersionIRI().isPresent()) return (ontologyID.getOntologyIRI().get() + " " + ontologyID.getVersionIRI().get()).getBytes(); else return ontologyID.getOntologyIRI().get().toString().getBytes(); }
public Set<OWLOntology> getVersions(IRI ontology) { Set<OWLOntology> onts = new HashSet<OWLOntology>(); for (OWLOntology ont : getOntologies()) { if (ontology.equals(ont.getOntologyID().getOntologyIRI())) { onts.add(ont); } } return onts; }
/** * E.g. http://purl.obolibrary.org/obo/go.owl to "go"<br> * if does not match this pattern, then retain original IRI * * @param ontology the ontology * @return The OBO ID of the ontology */ public static String getOntologyId(OWLOntology ontology) { return getOntologyId(ontology.getOntologyID().getOntologyIRI().get()); }
protected void reservedForOntologyIRI(OWLOntologyID id) { if (id.isAnonymous()) { return; } Optional<IRI> oIRI = id.getOntologyIRI(); if (oIRI.isPresent() && oIRI.get().isReservedVocabulary()) { violations.add(new UseOfReservedVocabularyForOntologyIRI(getCurrentOntology())); } }