@Override public LanguageString apply( String u ) { return new LanguageString( u, null ); } };
@Override public Version checkVersion( Version version ) { if ( VERSION_100.equals( version ) ) return VERSION_202; return version; }
/** * Returns the old-style version information (used by pre-OWS GetCapabilities requests, see section D.11 of OGC * 06-121r3). * * @return old-style version information, may be <code>null</code> (if this is an OWS-style request or an pre-OWS * request without version specification) * @throws InvalidParameterValueException * if any of the versions is not syntactically correct */ public Version getVersionAsVersion() throws InvalidParameterValueException { return Version.parseVersion( version ); }
@Override protected Version getServiceVersion() { return new Version( 1, 3, 0 ); }
private void writeIdentifier( CodeType id ) throws XMLStreamException { writer.writeStartElement( "ows", "Identifier", owsNS ); if ( id.getCodeSpace() != null ) { writer.writeCharacters( id.getCodeSpace() + ":" + id.getCode() ); } else { writer.writeCharacters( id.getCode() ); } writer.writeEndElement(); }
/** * Constructs a new <code>GetCapabilities</code> request that specifies the requested version in a pre-OWS fashion * (see section D.11 of OGC 06-121r3). * * @param version * old-style version information, may be <code>null</code> */ public GetCapabilities( Version version ) { if ( version != null ) { this.version = version.toString(); } }
/** * Returns the output parameters with the given identifier. * * @param parameterId * identifier of the output parameters to be looked up * @param codeSpace * codeSpace of the parameter identifier * @return the output parameters with the given identifier */ public ProcessletOutput getParameter( String parameterId, String codeSpace ) { return idToOutput.get( new CodeType( parameterId, codeSpace ) ); }
@Override public OWSException inputNoSuchParameter( CodeType identifier ) { String msg = processMsg + " has no input parameter with identifier '" + identifier + "'."; return new OWSException( msg, OWSException.INVALID_PARAMETER_VALUE, identifier.getCode() ); }
@Override public OWSException inputInvalidDatatype( CodeType parameterId, String foundDatatype, String definedDataType ) { String msg = processMsg + ", the value of datatype attribute (='" + foundDatatype + "') for input parameter '" + parameterId + "' does not match the datatype from the corresponding parameter definition (='" + definedDataType + "')"; return new OWSException( msg, OWSException.INVALID_PARAMETER_VALUE, parameterId.toString() ); }
private WFSVersion( String ogcVersion, String ns ) { this.ogcVersion = Version.parseVersion( ogcVersion ); this.ns = ns; }
@Override public LanguageString apply( LanguageStringType u ) { return new LanguageString( u.getValue(), u.getLang() ); } };
@Override public String getGetRecordByIdSchemaLocation( Version version ) { if ( VERSION_202.equals( version ) ) { return CSW_202_NS + " " + CSW_202_DISCOVERY_SCHEMA; } return null; }
@Override protected Version getServiceVersion() { return new Version( 1, 1, 1 ); }
@Override public CodeType apply( org.deegree.commons.metadata.description.jaxb.CodeType u ) { if ( u == null ) { return null; } return new CodeType( u.getValue(), u.getCodeSpace() ); } };
@Override public OWSException inputInvalidParameter( CodeType inputParameterId, Pair<String, String> kvp ) { String msg = processMsg + "Given value: " + kvp + " of input parameter '" + inputParameterId + "' is not supported according the corresponding parameter definition."; return new OWSException( msg, OWSException.INVALID_PARAMETER_VALUE, inputParameterId.toString() ); }
private void sendServiceException( OWSException ex, HttpResponseBuffer response ) throws ServletException { sendException( null, getExceptionSerializer( parseVersion( "1.2.0" ) ), ex, response ); }
@Override public LanguageString apply( LanguageStringType u ) { return new LanguageString( u.getValue(), u.getLang() ); } };
private void writeAdditionalObjectsStart( XMLStreamWriter xmlStream, Version requestVersion ) throws XMLStreamException { if ( requestVersion.equals( VERSION_200 ) ) { xmlStream.writeStartElement( "wfs", "additionalObjects", WFS_200_NS ); xmlStream.writeStartElement( "wfs", "SimpleFeatureCollection", WFS_200_NS ); } else { xmlStream.writeComment( "Additional features (subfeatures of requested features)" ); } }
@Override public OWSException outputInvalidParameter( CodeType outputParameterId, Pair<String, String> kvp ) { String msg = processMsg + "Given value: " + kvp + " of outputparameter '" + outputParameterId + "' is not supported according the corresponding parameter definition."; return new OWSException( msg, OWSException.INVALID_PARAMETER_VALUE, outputParameterId.toString() ); }
/** * * @param version * of the suspected protocol. * @return the name as it is define in the spec for given protocol version. */ public String getProtocolName( Version version ) { if ( VERSION_100.equals( version ) ) { return name_1_0_0; } return name(); }