/** * Convert the passageReference into a Passage or an empty Passage, * if there is an error. Note, this is not recommended as it throws * away the error. * * @param v11n * The Versification to which this Passage belongs. * @param passageReference * A String containing the text for the Passage * @return a new Passage filled with the desired Verses or an empty Passage */ public Key getValidKey(Versification v11n, String passageReference) { return getValidKey(v11n, passageReference, null); }
private Key getReferenceKey() { Key key=null; try { if (noteType.equals(NoteType.TYPE_REFERENCE)) { String reference = StringUtils.isNotEmpty(osisRef) ? osisRef : noteText; key = PassageKeyFactory.instance().getValidKey(v11n, reference); } } catch (Exception e) { log.warn("Error getting note reference for osisRef "+osisRef, e); } return key; }