@Override public OWS build() { return new WebFeatureService( metadata, workspace, config ); }
private Collection<FeatureType> getFeatureTypesToExport() { if ( mdProvider.getDatasetMetadata() != null && !mdProvider.getDatasetMetadata().isEmpty() ) { LOG.debug( "Dataset metadata available. Only announcing feature types with metadata." ); return getFeatureTypesWithMetadata(); } LOG.debug( "No dataset metadata available. Announcing feature types from all feature stores." ); return getAllFeatureTypes(); }
Version requestVersion = null; try { requestVersion = getVersion( kvpParamsUC.get( "VERSION" ) ); String requestName = KVPUtils.getRequired( kvpParamsUC, "REQUEST" ); WFSRequestType requestType = getRequestTypeByName( requestName ); checkVersion( requestVersion ); case DescribeFeatureType: DescribeFeatureType describeFt = DescribeFeatureTypeKVPAdapter.parse( kvpParamsUC ); Format format = determineFormat( requestVersion, describeFt.getOutputFormat(), "outputFormat" ); format.doDescribeFeatureType( describeFt, response, false ); break; case GetCapabilities: GetCapabilities getCapabilities = GetCapabilitiesKVPParser.parse( kvpParamsUC ); doGetCapabilities( getCapabilities, response ); break; case GetFeature: GetFeature getFeature = GetFeatureKVPAdapter.parse( kvpParamsUC, nsMap ); updateResolveTimeOut( getFeature.getResolveParams() ); format = determineFormat( requestVersion, getFeature.getPresentationParams().getOutputFormat(), "outputFormat" ); format.doGetFeature( getFeature, response ); break; case GetFeatureWithLock: checkTransactionsEnabled( requestName ); GetFeatureWithLock getFeatureWithLock = GetFeatureWithLockKVPAdapter.parse( kvpParamsUC ); updateResolveTimeOut( getFeatureWithLock.getResolveParams() );
if ( !isSoapSupported() ) { super.doSOAP( soapDoc, request, response, multiParts, factory ); return; xmlWriter.writeStartElement( soapEnvNS, "Body" ); } else { beginSOAPResponse( response ); WFSRequestType requestType = getRequestTypeByName( requestName ); requestVersion = getVersion( body.getAttributeValue( new QName( "version" ) ) ); if ( requestType != WFSRequestType.GetCapabilities ) { requestVersion = checkVersion( requestVersion ); describeFtAdapter.setRootElement( body ); DescribeFeatureType describeFt = describeFtAdapter.parse(); Format format = determineFormat( requestVersion, describeFt.getOutputFormat(), "outputFormat" ); format.doDescribeFeatureType( describeFt, response, true ); break; getCapabilitiesAdapter.setRootElement( body ); GetCapabilities wfsRequest = getCapabilitiesAdapter.parse( requestVersion ); doGetCapabilities( wfsRequest, response ); break; case GetFeature: getFeatureAdapter.setRootElement( body ); GetFeature getFeature = getFeatureAdapter.parse(); updateResolveTimeOut( getFeature.getResolveParams() );
private LimitedSupportedEncodings parseEncodingWithSupportedEncodings( List<String> supportedEncodingsForAllRequestTypes ) { LimitedSupportedEncodings<WFSRequestType> limitedSupportedEncodings = new LimitedSupportedEncodings(); limitedSupportedEncodings.addEnabledEncodings( CreateStoredQuery, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( DescribeFeatureType, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( DescribeStoredQueries, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( DropStoredQuery, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetCapabilities, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetFeature, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetFeatureWithLock, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetGmlObject, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetPropertyValue, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( ListStoredQueries, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( LockFeature, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( Transaction, collectEnabledEncodings( supportedEncodingsForAllRequestTypes ) ); return limitedSupportedEncodings; }
try { String requestName = xmlStream.getLocalName(); WFSRequestType requestType = getRequestTypeByName( requestName ); requestVersion = getVersion( XMLStreamUtils.getAttributeValue( xmlStream, "version" ) ); if ( requestType != WFSRequestType.GetCapabilities ) { requestVersion = checkVersion( requestVersion ); describeFtAdapter.setRootElement( new XMLAdapter( xmlStream ).getRootElement() ); DescribeFeatureType describeFt = describeFtAdapter.parse(); Format format = determineFormat( requestVersion, describeFt.getOutputFormat(), "outputFormat" ); format.doDescribeFeatureType( describeFt, response, false ); break; getCapabilitiesAdapter.setRootElement( new XMLAdapter( xmlStream ).getRootElement() ); GetCapabilities wfsRequest = getCapabilitiesAdapter.parse( requestVersion ); doGetCapabilities( wfsRequest, response ); break; case GetFeature: getFeatureAdapter.setRootElement( new XMLAdapter( xmlStream ).getRootElement() ); GetFeature getFeature = getFeatureAdapter.parse(); updateResolveTimeOut( getFeature.getResolveParams() ); format = determineFormat( requestVersion, getFeature.getPresentationParams().getOutputFormat(), "outputFormat" ); format.doGetFeature( getFeature, response ); break; case GetFeatureWithLock: checkTransactionsEnabled( requestName );
LimitedSupportedEncodings<WFSRequestType> limitedSupportedEncodings = new LimitedSupportedEncodings(); limitedSupportedEncodings.addEnabledEncodings( CreateStoredQuery, collectEnabledEncodings( supportedRequests.getCreateStoredQuery(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( DescribeFeatureType, collectEnabledEncodings( supportedRequests.getDescribeFeatureType(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( DescribeStoredQueries, collectEnabledEncodings( supportedRequests.getDescribeStoredQueries(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( DropStoredQuery, collectEnabledEncodings( supportedRequests.getDropStoredQuery(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetCapabilities, collectEnabledEncodings( supportedRequests.getGetCapabilities(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetFeature, collectEnabledEncodings( supportedRequests.getGetFeature(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetFeatureWithLock, collectEnabledEncodings( supportedRequests.getGetFeatureWithLock(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetGmlObject, collectEnabledEncodings( supportedRequests.getGetGmlObject(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( GetPropertyValue, collectEnabledEncodings( supportedRequests.getGetPropertyValue(), supportedEncodingsForAllRequestTypes ) ); limitedSupportedEncodings.addEnabledEncodings( ListStoredQueries,