/** * Retrieve the identifier for a given {@link OWLObject}. This methods uses * also shorthand hints to resolve the identifier. Should the translation * process encounter a problem or not find an identifier the defaultValue is * returned. * * @param obj the {@link OWLObject} to resolve * @param ont the target ontology * @param defaultValue the value to return in case of an error or no id * @return identifier or the default value */ public static String getIdentifierFromObject(OWLObject obj, OWLOntology ont, String defaultValue) { String id = defaultValue; try { id = getIdentifierFromObject(obj, ont); if (id == null) { id = defaultValue; } } catch (UntranslatableAxiomException e) { LOG.error(e.getMessage(), e); } return id; }
return ((OWLLiteral) value).getLiteral(); throw new UntranslatableAxiomException( "Untranslatable axiom, expected literal value, but was: " + value + " in axiom: " + ax);
return ((OWLLiteral) value).getLiteral(); throw new UntranslatableAxiomException( "Untranslatable axiom, expected literal value, but was: " + value + " in axiom: " + ax);
return ((OWLLiteral) value).getLiteral(); throw new UntranslatableAxiomException( "Untranslatable axiom, expected literal value, but was: " + value + " in axiom: " + ax);
return ((OWLLiteral) value).getLiteral(); throw new UntranslatableAxiomException( "Untranslatable axiom, expected literal value, but was: " + value + " in axiom: " + ax);
/** * Retrieve the identifier for a given {@link OWLObject}. This methods uses * also shorthand hints to resolve the identifier. Should the translation * process encounter a problem or not find an identifier the defaultValue is * returned. * * @param obj the {@link OWLObject} to resolve * @param ont the target ontology * @param defaultValue the value to return in case of an error or no id * @return identifier or the default value */ public static String getIdentifierFromObject(OWLObject obj, OWLOntology ont, String defaultValue) { String id = defaultValue; try { id = getIdentifierFromObject(obj, ont); if (id == null) { id = defaultValue; } } catch (UntranslatableAxiomException e) { LOG.error(e.getMessage(), e); } return id; }
/** * Retrieve the identifier for a given {@link OWLObject}. This methods uses * also shorthand hints to resolve the identifier. Should the translation * process encounter a problem or not find an identifier the defaultValue is * returned. * * @param obj the {@link OWLObject} to resolve * @param ont the target ontology * @param defaultValue the value to return in case of an error or no id * @return identifier or the default value */ public static String getIdentifierFromObject(OWLObject obj, OWLOntology ont, String defaultValue) { String id = defaultValue; try { id = getIdentifierFromObject(obj, ont); if (id == null) { id = defaultValue; } } catch (UntranslatableAxiomException e) { LOG.error(e.getMessage(), e); } return id; }
/** * Retrieve the identifier for a given {@link OWLObject}. This methods uses * also shorthand hints to resolve the identifier. Should the translation * process encounter a problem or not find an identifier the defaultValue is * returned. * * @param obj the {@link OWLObject} to resolve * @param ont the target ontology * @param defaultValue the value to return in case of an error or no id * @return identifier or the default value */ public static String getIdentifierFromObject(OWLObject obj, OWLOntology ont, String defaultValue) { String id = defaultValue; try { id = getIdentifierFromObject(obj, ont); if (id == null) { id = defaultValue; } } catch (UntranslatableAxiomException e) { LOG.error(e.getMessage(), e); } return id; }
/** * Gets the identifier. * * @param obj the obj * @return the identifier */ @Nullable public String getIdentifier(OWLObject obj) { try { return getIdentifierFromObject(obj, getOWLOntology()); } catch (UntranslatableAxiomException e) { error(e.getMessage(), true); } return null; }
/** * Gets the identifier. * * @param obj the obj * @return the identifier */ @Nullable public String getIdentifier(OWLObject obj) { try { return getIdentifierFromObject(obj, getOWLOntology()); } catch (UntranslatableAxiomException e) { error(e.getMessage(), true); } return null; }
/** * Gets the identifier. * * @param obj the obj * @return the identifier */ @Nullable public String getIdentifier(OWLObject obj) { try { return getIdentifierFromObject(obj, getOWLOntology()); } catch (UntranslatableAxiomException e) { error(e.getMessage(), true); } return null; }
/** * Gets the identifier. * * @param obj the obj * @return the identifier */ @Nullable public String getIdentifier(OWLObject obj) { try { return getIdentifierFromObject(obj, getOWLOntology()); } catch (UntranslatableAxiomException e) { error(e.getMessage(), true); } return null; }