private static void exportOperationsMetadata( XMLStreamWriter writer ) throws XMLStreamException { List<Operation> operations = new LinkedList<Operation>(); List<DCP> dcps = null; try { DCP dcp = new DCP( new URL( OGCFrontController.getHttpGetURL() ), new URL( OGCFrontController.getHttpPostURL() ) ); dcps = Collections.singletonList( dcp ); } catch ( MalformedURLException e ) { // should never happen } List<Domain> params = new ArrayList<Domain>(); List<Domain> constraints = new ArrayList<Domain>(); List<OMElement> mdEls = new ArrayList<OMElement>(); operations.add( new Operation( "GetCapabilities", dcps, params, constraints, mdEls ) ); operations.add( new Operation( "DescribeProcess", dcps, params, constraints, mdEls ) ); operations.add( new Operation( "Execute", dcps, params, constraints, mdEls ) ); OperationsMetadata operationsMd = new OperationsMetadata( operations, params, constraints, null ); exportOperationsMetadata110( writer, operationsMd ); }
void exportOperationsMetadata() throws XMLStreamException { List<Operation> operations = new LinkedList<Operation>(); List<DCP> dcps = null; try { DCP dcp = new DCP( new URL( OGCFrontController.getHttpGetURL() ), null ); dcps = Collections.singletonList( dcp ); } catch ( MalformedURLException e ) { // should never happen } List<Domain> params = new ArrayList<Domain>(); List<Domain> constraints = new ArrayList<Domain>(); constraints.add( new Domain( "GetEncoding", Collections.singletonList( "KVP" ) ) ); List<OMElement> mdEls = new ArrayList<OMElement>(); operations.add( new Operation( "GetCapabilities", dcps, params, constraints, mdEls ) ); operations.add( new Operation( "GetTile", dcps, params, constraints, mdEls ) ); operations.add( new Operation( "GetFeatureInfo", dcps, params, constraints, mdEls ) ); OperationsMetadata operationsMd = new OperationsMetadata( operations, params, constraints, null ); exportOperationsMetadata110( writer, operationsMd ); }
@Override public OperationsMetadata parseOperationsMetadata() throws XMLParsingException { OMElement requestEl = getElement( getRootElement(), new XPath( getPrefix() + "Capability/" + getPrefix() + "Request", nsContext ) ); if ( requestEl == null ) { return null; } XPath xpath = new XPath( "./*", nsContext ); List<OMElement> opEls = getElements( requestEl, xpath ); List<Operation> operations = new ArrayList<Operation>( opEls.size() ); if ( opEls != null ) { for ( OMElement opEl : opEls ) { Operation op = parseOperation( opEl ); operations.add( op ); } } return new OperationsMetadata( operations, new ArrayList<Domain>(), new ArrayList<Domain>(), new ArrayList<OMElement>() ); }
@SuppressWarnings("unchecked") private void sendCapabilities( Map<String, String> map, HttpServletRequest request, HttpResponseBuffer response ) throws IOException { GetCapabilities req = GetCapabilitiesKVPParser.parse( map ); XMLOutputFactory factory = XMLOutputFactory.newInstance(); factory.setProperty( IS_REPAIRING_NAMESPACES, true ); try { XMLStreamWriter xsw = factory.createXMLStreamWriter( response.getOutputStream(), "UTF-8" ); IndentingXMLStreamWriter xmlWriter = new IndentingXMLStreamWriter( xsw ); List<Operation> operations = new ArrayList<Operation>(); List<DCP> dcps = Collections.singletonList( new DCP( new URL( OGCFrontController.getHttpGetURL() ), null ) ); List<Domain> params = Collections.emptyList(); List<Domain> constraints = Collections.emptyList(); for ( String operation : allowedOperations ) { operations.add( new Operation( operation, dcps, params, constraints, EMPTY_LIST ) ); } OperationsMetadata operationsMd = new OperationsMetadata( operations, params, constraints, null ); new CapabilitiesXMLAdapter().export040( xmlWriter, req, identification, provider, operationsMd, service.getServiceConfiguration() ); xmlWriter.writeEndDocument(); } catch ( XMLStreamException e ) { throw new IOException( e ); } }
return new OperationsMetadata( operations, params, constraints, extendedCaps );
return new OperationsMetadata( operations, params, constraints, extendedCaps );
new OperationsMetadata( operations, null, null, versionToExtendedCaps.get( "1.1.0" ) ) );
constraints.add( new Domain( "QueryExpressions", queryExprs ) ); OperationsMetadata operationsMd = new OperationsMetadata( operations, globalParams,