public OWLAnnotationProperty getOWLAnnotationProperty(String rendering) { return finder.getOWLAnnotationProperty(rendering); } }
public OWLAnnotationProperty getOWLAnnotationProperty(String rendering) { return finder.getOWLAnnotationProperty(rendering); } }
public OWLAnnotationProperty getOWLAnnotationProperty(String rendering) { return finder.getOWLAnnotationProperty(rendering); } }
public OWLAnnotationProperty getOWLAnnotationProperty(String rendering) { return finder.getOWLAnnotationProperty(rendering); } }
return Optional.ofNullable((E) getOWLAnnotationProperty(rendering));
private Optional<IRI> parseIri(String text) throws URISyntaxException { String trimmedText = text.trim(); if(trimmedText.isEmpty()) { return Optional.empty(); } OWLAnnotationProperty property = getOWLModelManager().getOWLEntityFinder().getOWLAnnotationProperty(trimmedText); if(property != null) { return Optional.of(property.getIRI()); } if(text.startsWith("<") && text.endsWith(">")) { return Optional.of(IRI.create(new URI(trimmedText.substring(1, trimmedText.length() - 1)))); } try { URI uri = new URI(trimmedText); if(uri.isAbsolute()) { return Optional.of(IRI.create(uri)); } } catch (URISyntaxException e) { return Optional.empty(); } for (Namespaces ns : Namespaces.values()) { if (trimmedText.startsWith(ns.name().toLowerCase() + ":")) { return Optional.of(IRI.create(ns.toString() + text.substring(ns.name().length() + 1))); } } return Optional.of(IRI.create(new URI(trimmedText))); }
return Optional.ofNullable((E) getOWLAnnotationProperty(rendering));
private Optional<IRI> parseIri(String text) throws URISyntaxException { String trimmedText = text.trim(); if(trimmedText.isEmpty()) { return Optional.empty(); } OWLAnnotationProperty property = getOWLModelManager().getOWLEntityFinder().getOWLAnnotationProperty(trimmedText); if(property != null) { return Optional.of(property.getIRI()); } if(text.startsWith("<") && text.endsWith(">")) { return Optional.of(IRI.create(new URI(trimmedText.substring(1, trimmedText.length() - 1)))); } try { URI uri = new URI(trimmedText); if(uri.isAbsolute()) { return Optional.of(IRI.create(uri)); } } catch (URISyntaxException e) { return Optional.empty(); } for (Namespaces ns : Namespaces.values()) { if (trimmedText.startsWith(ns.name().toLowerCase() + ":")) { return Optional.of(IRI.create(ns.toString() + text.substring(ns.name().length() + 1))); } } return Optional.of(IRI.create(new URI(trimmedText))); }
private static OWLAnnotationProperty getOwlAnnotationProperty(String text, OWLModelManager modelManager) { for(DublinCoreVocabulary dc : DublinCoreVocabulary.values()) { if(dc.getPrefixedName().equals(text) || text.equals(dc.getIRI().toString())) { return modelManager.getOWLDataFactory().getOWLAnnotationProperty(dc.getIRI()); } } return modelManager.getOWLEntityFinder().getOWLAnnotationProperty(text); }
private static OWLAnnotationProperty getOwlAnnotationProperty(String text, OWLModelManager modelManager) { for(DublinCoreVocabulary dc : DublinCoreVocabulary.values()) { if(dc.getPrefixedName().equals(text) || text.equals(dc.getIRI().toString())) { return modelManager.getOWLDataFactory().getOWLAnnotationProperty(dc.getIRI()); } } return modelManager.getOWLEntityFinder().getOWLAnnotationProperty(text); }