* The ID is invalid.
*/
public static String validateId(final String id) throws OmhException {
// Validate that the ID is not null.
if(id == null) {
throw new OmhException("The ID is null.");
}
// Remove surrounding whitespace.
String idTrimmed = id.trim();
// Validate that the ID is not empty or only whitespace.
if(idTrimmed.length() == 0) {
throw new OmhException("The ID is empty or only whitespace.");
}
// Validate that the trimmed ID matches the pattern.
if(! PATTERN_ID.matcher(idTrimmed).matches()) {
throw
new OmhException(
"The schema ID is invalid. It must be colon " +
"deliminated, alphanumeric sections, with or " +
"without underscores, where the first section is " +
"\"omh\": " +
idTrimmed);