private Geometry readGeometry( ComplexInput gmlInput ) throws ProcessletException { try { XMLStreamReader xmlReader = gmlInput.getValueAsXMLStream(); GMLStreamReader gmlReader = GMLInputFactory.createGMLStreamReader( GML_31, xmlReader ); return gmlReader.readGeometry(); } catch ( Exception e ) { throw new ProcessletException( "Error parsing parameter " + gmlInput.getIdentifier() + ": " + e.getMessage() ); } }
private Geometry readGeometry( ComplexInput gmlInput ) throws ProcessletException { try { XMLStreamReader xmlReader = gmlInput.getValueAsXMLStream(); GMLStreamReader gmlReader = GMLInputFactory.createGMLStreamReader( GML_31, xmlReader ); return gmlReader.readGeometry(); } catch ( Exception e ) { throw new ProcessletException( "Error parsing parameter " + gmlInput.getIdentifier() + ": " + e.getMessage() ); } }
private Geometry readGeometry( ComplexInput gmlInput ) throws ProcessletException { try { XMLStreamReader xmlReader = gmlInput.getValueAsXMLStream(); GMLStreamReader gmlReader = GMLInputFactory.createGMLStreamReader( GML_31, xmlReader ); return gmlReader.readGeometry(); } catch ( Exception e ) { throw new ProcessletException( "Error parsing parameter " + gmlInput.getIdentifier() + ": " + e.getMessage() ); } }
private Geometry readGeometry( ComplexInput gmlInput ) throws ProcessletException { try { XMLStreamReader xmlReader = gmlInput.getValueAsXMLStream(); GMLStreamReader gmlReader = GMLInputFactory.createGMLStreamReader( GML_31, xmlReader ); return gmlReader.readGeometry(); } catch ( Exception e ) { throw new ProcessletException( "Error parsing parameter " + gmlInput.getIdentifier() + ": " + e.getMessage() ); } }
private Geometry readGeometry( ComplexInput gmlInput1 ) throws ProcessletException { try { XMLStreamReader xmlReader = gmlInput1.getValueAsXMLStream(); GMLStreamReader gmlReader = GMLInputFactory.createGMLStreamReader( GML_31, xmlReader ); return gmlReader.readGeometry(); } catch ( Exception e ) { throw new ProcessletException( "Error parsing parameter " + gmlInput1.getIdentifier() + ": " + e.getMessage() ); } }
private Geometry readGeometry( ComplexInput gmlInput1 ) throws ProcessletException { try { XMLStreamReader xmlReader = gmlInput1.getValueAsXMLStream(); GMLStreamReader gmlReader = GMLInputFactory.createGMLStreamReader( GML_31, xmlReader ); return gmlReader.readGeometry(); } catch ( Exception e ) { throw new ProcessletException( "Error parsing parameter " + gmlInput1.getIdentifier() + ": " + e.getMessage() ); } }
private Geometry readGeometry( ComplexInput gmlInput ) throws ProcessletException { try { XMLStreamReader xmlReader = gmlInput.getValueAsXMLStream(); GMLStreamReader gmlReader = GMLInputFactory.createGMLStreamReader( GML_31, xmlReader ); return gmlReader.readGeometry(); } catch ( Exception e ) { throw new ProcessletException( "Error parsing parameter " + gmlInput.getIdentifier() + ": " + e.getMessage() ); } } }
private Geometry readGeometry( ComplexInput gmlInput ) throws ProcessletException { try { XMLStreamReader xmlReader = gmlInput.getValueAsXMLStream(); GMLStreamReader gmlReader = GMLInputFactory.createGMLStreamReader( GML_31, xmlReader ); return gmlReader.readGeometry(); } catch ( Exception e ) { throw new ProcessletException( "Error parsing parameter " + gmlInput.getIdentifier() + ": " + e.getMessage() ); } }
private Geometry readGeometry( ComplexInput gmlInput ) throws ProcessletException { try { XMLStreamReader xmlReader = gmlInput.getValueAsXMLStream(); GMLStreamReader gmlReader = GMLInputFactory.createGMLStreamReader( GML_31, xmlReader ); return gmlReader.readGeometry(); } catch ( Exception e ) { throw new ProcessletException( "Error parsing parameter " + gmlInput.getIdentifier() + ": " + e.getMessage() ); } }
private Geometry readGeometry( ComplexInput gmlInput ) throws ProcessletException { try { XMLStreamReader xmlReader = gmlInput.getValueAsXMLStream(); GMLStreamReader gmlReader = GMLInputFactory.createGMLStreamReader( GML_31, xmlReader ); return gmlReader.readGeometry(); } catch ( Exception e ) { throw new ProcessletException( "Error parsing parameter " + gmlInput.getIdentifier() + ": " + e.getMessage() ); } }
private void writeGeometry( ComplexOutput gmlOutput, Geometry geometry ) throws ProcessletException { try { SchemaLocationXMLStreamWriter sw = new SchemaLocationXMLStreamWriter( gmlOutput.getXMLStreamWriter(), "http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/base/geometryAggregates.xsd" ); sw.setPrefix( "gml", GMLNS ); GMLStreamWriter gmlWriter = GMLOutputFactory.createGMLStreamWriter( GML_31, sw ); gmlWriter.write( geometry ); } catch ( Exception e ) { throw new ProcessletException( "Error exporting geometry: " + e.getMessage() ); } }
private void writeGeometry( ComplexOutput gmlOutput, Geometry geometry ) throws ProcessletException { try { SchemaLocationXMLStreamWriter sw = new SchemaLocationXMLStreamWriter( gmlOutput.getXMLStreamWriter(), "http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/base/geometryAggregates.xsd" ); sw.setPrefix( "gml", GMLNS ); GMLStreamWriter gmlWriter = GMLOutputFactory.createGMLStreamWriter( GML_31, sw ); gmlWriter.write( geometry ); } catch ( Exception e ) { throw new ProcessletException( "Error exporting geometry: " + e.getMessage() ); } }
private void writeGeometry( ComplexOutput gmlOutput, Geometry geometry ) throws ProcessletException { try { SchemaLocationXMLStreamWriter sw = new SchemaLocationXMLStreamWriter( gmlOutput.getXMLStreamWriter(), "http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/base/geometryAggregates.xsd" ); sw.setPrefix( "gml", GMLNS ); GMLStreamWriter gmlWriter = GMLOutputFactory.createGMLStreamWriter( GML_31, sw ); gmlWriter.write( geometry ); } catch ( Exception e ) { throw new ProcessletException( "Error exporting geometry: " + e.getMessage() ); } }
private void writeGeometry( ComplexOutput gmlOutput, Geometry geometry ) throws ProcessletException { try { SchemaLocationXMLStreamWriter sw = new SchemaLocationXMLStreamWriter( gmlOutput.getXMLStreamWriter(), "http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/base/geometryAggregates.xsd" ); sw.setPrefix( "gml", GMLNS ); GMLStreamWriter gmlWriter = GMLOutputFactory.createGMLStreamWriter( GML_31, sw ); gmlWriter.write( geometry ); } catch ( Exception e ) { throw new ProcessletException( "Error exporting geometry: " + e.getMessage() ); } }
private void writeGeometry( ComplexOutput gmlOutput, Geometry geometry ) throws ProcessletException { try { SchemaLocationXMLStreamWriter sw = new SchemaLocationXMLStreamWriter( gmlOutput.getXMLStreamWriter(), "http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/base/geometryAggregates.xsd" ); sw.setPrefix( "gml", GMLNS ); GMLStreamWriter gmlWriter = GMLOutputFactory.createGMLStreamWriter( GML_31, sw ); gmlWriter.write( geometry ); } catch ( Exception e ) { throw new ProcessletException( "Error exporting geometry: " + e.getMessage() ); } }
LOG.debug( "Exception message: " + e.getMessage(), e ); throw new ProcessletException( e.getLocalizedMessage() ); } catch ( IllegalArgumentException e ) { if ( LOG.isDebugEnabled() ) { LOG.debug( "Exception message: " + e.getMessage(), e ); throw new ProcessletException( new OWSException( e.getLocalizedMessage(), OWSException.INVALID_PARAMETER_VALUE ) ); } catch ( XMLStreamException e ) { LOG.debug( "Exception message: " + e.getMessage(), e ); throw new ProcessletException( new OWSException( e.getLocalizedMessage(), OWSException.INVALID_PARAMETER_VALUE ) ); } catch ( UnknownCRSException e ) { throw new ProcessletException( new OWSException( e.getLocalizedMessage(), OWSException.INVALID_PARAMETER_VALUE ) ); } catch ( TransformationException e ) { throw new ProcessletException( new OWSException( e.getLocalizedMessage(), WCTSConstants.ExceptionCodes.NotTransformable.name() ) ); } catch ( OutsideCRSDomainException e ) { throw new ProcessletException( new OWSException( e.getLocalizedMessage(), WCTSConstants.ExceptionCodes.InvalidArea.name() ) );
StringBuilder sb = new StringBuilder( "No input data given." ); String execCode = WCTSConstants.ExceptionCodes.NoInputData.name(); throw new ProcessletException( new OWSException( sb.toString(), execCode ) ); String outMime = xmlOutput.getRequestedMimeType(); if ( outMime != null && !outMime.equals( mime ) ) { throw new ProcessletException( new OWSException( "The inspire directive specifies that the output schema equals the input schema, therefore the mimetypes of the incoming data (" throw new ProcessletException( new OWSException( "The inspire directive specifies that the input schema ( " + inSchema + ") and the output schema (" + outSchema throw new ProcessletException( "Could not create an outputstream." + e.getLocalizedMessage() ); LOG.debug( "Exception message: " + e.getMessage(), e ); throw new ProcessletException( e.getLocalizedMessage() );
String msg = "Could not parse value of parameter " + IN_PARAM_ID + " as sld."; LOG.debug( msg ); throw new ProcessletException( msg ); } catch ( Exception e ) { LOG.error( "Could not create legend.", e ); throw new ProcessletException( e.getMessage() );
@Override public void process( ProcessletInputs in, ProcessletOutputs out, ProcessletExecutionInfo info ) throws ProcessletException { double bufferDistance = Double.parseDouble( ( (LiteralInput) in.getParameter( "BufferDistance" ) ).getValue() ); ComplexInput gmlInputGeometry = (ComplexInput) in.getParameter( "GMLInput" ); Geometry geom = null; Geometry bufferedGeom = null; try { XMLStreamReader xmlReader = gmlInputGeometry.getValueAsXMLStream(); GMLStreamReader gmlReader = GMLInputFactory.createGMLStreamReader( GML_31, xmlReader ); geom = gmlReader.readGeometry(); bufferedGeom = geom.getBuffer( new Measure( new BigDecimal( bufferDistance ), "unity" ) ); } catch ( Exception e ) { throw new ProcessletException( "Error parsing parameter " + gmlInputGeometry.getIdentifier() + ": " + e.getMessage() ); } ComplexOutput gmlOutputGeometry = (ComplexOutput) out.getParameter( "BufferedGeometry" ); try { SchemaLocationXMLStreamWriter sw = new SchemaLocationXMLStreamWriter( gmlOutputGeometry.getXMLStreamWriter(), "http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/base/geometryAggregates.xsd" ); sw.setPrefix( "gml", GMLNS ); GMLStreamWriter gmlWriter = GMLOutputFactory.createGMLStreamWriter( GML_31, sw ); gmlWriter.write( bufferedGeom ); } catch ( Exception e ) { throw new ProcessletException( "Error exporting geometry: " + e.getMessage() ); } }
throw new ProcessletException( e.getMessage() );