use of net.opengis.ows.x11.ExceptionReportDocument in project arctic-sea by 52North.
the class OwsEncoderv110 method encodeOwsExceptionReport.
private ExceptionReportDocument encodeOwsExceptionReport(final OwsExceptionReport owsExceptionReport) {
ExceptionReportDocument erd = ExceptionReportDocument.Factory.newInstance(getXmlOptions());
ExceptionReport er = erd.addNewExceptionReport();
// er.setLanguage("en");
er.setVersion(owsExceptionReport.getVersion());
List<ExceptionType> exceptionTypes = new ArrayList<>(owsExceptionReport.getExceptions().size());
owsExceptionReport.getExceptions().stream().map(this::encodeOwsException).map(ExceptionDocument::getException).forEach(exceptionTypes::add);
er.setExceptionArray(exceptionTypes.toArray(new ExceptionType[exceptionTypes.size()]));
N52XmlHelper.setSchemaLocationsToDocument(erd, Collections.singletonList(N52XmlHelper.getSchemaLocationForOWS110()));
return erd;
}
Aggregations