/** * Determines whether the entered value is an OBO Id * @return true if the entered value is an OBO Id otherwise false. */ private boolean isOboId() { String enteredValue = getEntityName(); return !enteredValue.isEmpty() && OboUtilities.isOboId(enteredValue); }
/** * Expands a string representation of an IRI into an IRI. OBO Library Identifiers are handled as are built in * OWL IRIs. This means that IAO:0000115 is expanded to http://purl.obolibrary.org/obo/IAO_0000115 for example, * and rdfs:label is expanded into its full IRI for example. * @param iri The string representation of the IRI. * @return The expanded IRI. If the string representation is null then the empty value is returned. */ public static Optional<IRI> expand(@Nullable String iri) { if(iri == null) { return Optional.empty(); } if(OboUtilities.isOboId(iri)) { return Optional.of(OboUtilities.getOboLibraryIriFromOboId(iri)); } IRI builtInIri = builtInVocabulary.get(iri); if(builtInIri != null) { return Optional.of(builtInIri); } else { return Optional.of(IRI.create(iri)); } } }
if(OboUtilities.isOboId(splitSearchString)) { preparedSearchString = splitSearchString.replace(":", "(?::|_)");