{
String msg = "External reference metadata element has null title or URI.";
ThreddsXmlParserIssue issue = StaxThreddsXmlParserUtils.createIssueForUnexpectedElement( msg, this.reader );
log.warn( "parseStartElement(): " + issue.getMessage());
// ToDo Gather issues rather than throw exception.
throw new ThreddsXmlParserException( issue);
}
this.selfBuilder.setTitle( titleAtt.getValue() );
String uriString = externalRefAtt.getValue();
try
{
this.selfBuilder.setExternalReference( new URI( uriString ));
}
catch ( URISyntaxException e )
{
String msg = "External reference metadata element with bad URI syntax [" + uriString + "].";
ThreddsXmlParserIssue issue = StaxThreddsXmlParserUtils.createIssueForException( msg, this.reader, e );
log.warn( "parseStartElement(): " + issue.getMessage(), e );
// ToDo Gather issues rather than throw exception.
throw new ThreddsXmlParserException( issue );
}
}