@SuppressWarnings("unchecked") @Override public Object parse(ElementInstance instance, Node node, Object value) throws Exception { Ows10Factory ows10Factory = Ows10Factory.eINSTANCE; DCPType dcpType = ows10Factory.createDCPType(); HTTPType httpType = ows10Factory.createHTTPType(); dcpType.setHTTP(httpType); List<Node> httpChildren = node.getChildren("HTTP"); for (Node http : httpChildren) { Node get = http.getChild("Get"); if (get != null) { RequestMethodType methodType = createRequestMethodType(ows10Factory, get); httpType.getGet().add(methodType); } Node post = http.getChild("Post"); if (post != null) { RequestMethodType methodType = createRequestMethodType(ows10Factory, post); httpType.getPost().add(methodType); } } return dcpType; }
getCapabilitiesDCP.setHTTP(getCapabilitiesHTTP);
/** * Returns the operation URI for the given operation/http method as a String to avoid creating a * URL instance when not needed */ private String getOperationURI(WFSOperationType operation, HttpMethod method) { final OperationType operationType = getOperationMetadata(operation); final List<DCPType> dcps = operationType.getDCP(); for (DCPType dcp : dcps) { List<RequestMethodType> requests; if (GET == method) { requests = dcp.getHTTP().getGet(); } else { requests = dcp.getHTTP().getPost(); } for (RequestMethodType req : requests) { String href = req.getHref(); return href; } } return null; }
transactionDCP.setHTTP(transactionHTTP);
getCapabilitiesDCP.setHTTP(getCapabilitiesHTTP);
getRecordByIdDCP.setHTTP(getRecordByIdHTTP);
describeRecordDCP.setHTTP(describeRecordHTTP);
describeRecordDCP.setHTTP(describeRecordHTTP);
transactionDCP.setHTTP(transactionHTTP);
@SuppressWarnings("unchecked") @Override public Object parse(ElementInstance instance, Node node, Object value) throws Exception { Ows10Factory ows10Factory = Ows10Factory.eINSTANCE; DCPType dcpType = ows10Factory.createDCPType(); HTTPType httpType = ows10Factory.createHTTPType(); dcpType.setHTTP(httpType); List<Node> httpChildren = node.getChildren("HTTP"); for (Node http : httpChildren) { Node get = http.getChild("Get"); if (get != null) { RequestMethodType methodType = createRequestMethodType(ows10Factory, get); httpType.getGet().add(methodType); } Node post = http.getChild("Post"); if (post != null) { RequestMethodType methodType = createRequestMethodType(ows10Factory, post); httpType.getPost().add(methodType); } } return dcpType; }
getRecordByIdDCP.setHTTP(getRecordByIdHTTP);
getDomainDCP.setHTTP(getDomainHTTP);
getDomainDCP.setHTTP(getDomainHTTP);
getRecordsDCP.setHTTP(getRecordsHTTP);
getRecordsDCP.setHTTP(getRecordsHTTP);