}
String safeId;
try {
safeId = java.net.URLEncoder.encode(localId, "US-ASCII");
} catch (UnsupportedEncodingException e1) {
throw new OWLRuntimeException(e1);
}
if (safeId.contains(" ")) {
safeId = safeId.replace(" ", "_");
}
IRI iri = null;
try {
iri = IRI.create(uriPrefix + safeId);
} catch (IllegalArgumentException e) {
throw new OWLRuntimeException(e);
}
return iri;
}