/** * @param documentIRI iri for ontology that cannot be parsed */ public OWLOntologyFactoryNotFoundException(IRI documentIRI) { super("Could not find an appropriate factory to load ontology from ontology document: " + documentIRI.toQuotedString()); } }
/** * @param ontologyIRI iri that cannot be mapped */ public OWLOntologyIRIMappingNotFoundException(IRI ontologyIRI) { super("Could not find ontology document mapping for " + ontologyIRI.toQuotedString()); } }
/** * Gets the short form for an IRI. * * @param iri The IRI * @return The short form for the specified IRI */ public static String getShortForm(IRI iri) { return iri.toQuotedString(); }
/** * @param ontologyIRI iri that cannot be mapped */ public OWLOntologyIRIMappingNotFoundException(IRI ontologyIRI) { super("Could not find ontology document mapping for " + ontologyIRI.toQuotedString()); } }
/** * Gets the short form for an IRI. * * @param iri The IRI * @return The short form for the specified IRI */ public static String getShortForm(IRI iri) { return iri.toQuotedString(); }
/** * Gets the short form for an IRI. * * @param iri The IRI * @return The short form for the specified IRI */ public static String getShortForm(IRI iri) { return iri.toQuotedString(); }
/** * @param documentIRI iri for ontology that cannot be parsed */ public OWLOntologyFactoryNotFoundException(IRI documentIRI) { super("Could not find an appropriate factory to load ontology from ontology document: " + documentIRI.toQuotedString()); } }
@Override public String toString() { return String.format("Import(%s)", iri.toQuotedString()); } }
@Override public String getShortForm() { if (!remainder.isEmpty()) { return remainder; } int lastSlashIndex = namespace.lastIndexOf('/'); if (lastSlashIndex != -1 && lastSlashIndex != namespace.length() - 1) { return namespace.substring(lastSlashIndex + 1); } return toQuotedString(); }
@Override public String getShortForm() { if (!remainder.isEmpty()) { return remainder; } int lastSlashIndex = namespace.lastIndexOf('/'); if (lastSlashIndex != -1 && lastSlashIndex != namespace.length() - 1) { return namespace.substring(lastSlashIndex + 1); } return toQuotedString(); }
@Override public String toString() { StringBuilder sb = new StringBuilder("AutoIRIMapper: ("); sb.append(ontologyIRI2PhysicalURIMap.size()).append(" ontologies)\n"); ontologyIRI2PhysicalURIMap.forEach((k, v) -> sb.append(" ").append(k.toQuotedString()) .append(" -> ").append(v).append('\n')); return sb.toString(); }
@Override public String toString() { StringBuilder sb = new StringBuilder("AutoIRIMapper: ("); sb.append(ontologyIRI2PhysicalURIMap.size()).append(" ontologies)\n"); ontologyIRI2PhysicalURIMap.forEach((k, v) -> sb.append(" ").append(k.toQuotedString()) .append(" -> ").append(v).append('\n')); return sb.toString(); }
@Override public String toString() { StringBuilder sb = new StringBuilder("AutoIRIMapper: ("); sb.append(ontologyIRI2PhysicalURIMap.size()).append(" ontologies)\n"); ontologyIRI2PhysicalURIMap.forEach((k, v) -> sb.append(" ").append(k.toQuotedString()) .append(" -> ").append(v).append('\n')); return sb.toString(); }
@Override public String toString() { StringBuilder sb = new StringBuilder("AutoIRIMapper: ("); sb.append(ontologyIRI2PhysicalURIMap.size()).append(" ontologies)\n"); ontologyIRI2PhysicalURIMap.forEach((k, v) -> sb.append(" ").append(k.toQuotedString()) .append(" -> ").append(v).append('\n')); return sb.toString(); }
public String getShortForm(IRI iri) { String sf = getPrefixIRI(iri); if(sf == null) { return iri.toQuotedString(); } else { return sf; } }
@Override public String getShortForm(IRI iri) { String sf = getPrefixIRI(iri); if (sf == null) { return iri.toQuotedString(); } else { return sf; } }
/** * @param e exception * @param importsDeclaration imports declaration */ public UnloadableImportException(OWLOntologyCreationException e, OWLImportsDeclaration importsDeclaration) { super("Could not load imported ontology: " + importsDeclaration.getIRI().toQuotedString() + " Cause: " + e.getMessage(), e); this.importsDeclaration = importsDeclaration; ontologyCreationException = e; }
/** * @param e exception * @param importsDeclaration imports declaration */ public UnloadableImportException(OWLOntologyCreationException e, OWLImportsDeclaration importsDeclaration) { super("Could not load imported ontology: " + importsDeclaration.getIRI().toQuotedString() + " Cause: " + e.getMessage(), e); this.importsDeclaration = importsDeclaration; ontologyCreationException = e; }
/** * @param e exception * @param importsDeclaration imports declaration */ public UnloadableImportException(OWLOntologyCreationException e, OWLImportsDeclaration importsDeclaration) { super("Could not load imported ontology: " + importsDeclaration.getIRI().toQuotedString() + " Cause: " + e.getMessage(), e); this.importsDeclaration = importsDeclaration; ontologyCreationException = e; }
@Override public void visit(SWRLVariable node) { write("?"); // do not save the namespace if it's the conventional one if ("urn:swrl:var#".equals(node.getIRI().getNamespace()) || "urn:swrl#".equals(node.getIRI().getNamespace())) { write(node.getIRI().prefixedBy("")); } else { write(node.getIRI().toQuotedString()); } }