This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new 8d078b1 CAMEL-15253: Make baseUrl not a query parameter and make it lenient so additional query parameters goes to the remote http call. 8d078b1 is described below commit 8d078b1f70a87ad26d533c5b6ad0ce1e9a8ff41b Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Thu Aug 13 15:32:06 2020 +0200 CAMEL-15253: Make baseUrl not a query parameter and make it lenient so additional query parameters goes to the remote http call. --- .../apache/camel/catalog/components/oaipmh.json | 5 +- .../camel/catalog/docs/oaipmh-component.adoc | 9 ++-- .../oaipmh/component/OAIPMHEndpointConfigurer.java | 5 -- .../org/apache/camel/oaipmh/component/oaipmh.json | 5 +- .../src/main/docs/oaipmh-component.adoc | 9 ++-- .../camel/oaipmh/component/OAIPMHComponent.java | 4 +- .../camel/oaipmh/component/OAIPMHEndpoint.java | 57 +++++++++++++--------- .../OAIPMHComponentConsumerParticularCaseTest.java | 2 +- .../src/generated/resources/metadata.json | 2 +- .../builder/endpoint/StaticEndpointBuilders.java | 12 ++--- .../endpoint/dsl/OAIPMHEndpointBuilderFactory.java | 48 +++--------------- .../modules/ROOT/pages/oaipmh-component.adoc | 9 ++-- 12 files changed, 65 insertions(+), 102 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/oaipmh.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/oaipmh.json index 70f1692..c36f846 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/oaipmh.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/oaipmh.json @@ -14,7 +14,7 @@ "version": "3.5.0-SNAPSHOT", "scheme": "oaipmh", "extendsScheme": "", - "syntax": "oaipmh:url", + "syntax": "oaipmh:baseUrl", "async": false, "consumerOnly": false, "producerOnly": false, @@ -26,8 +26,7 @@ "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" } }, "properties": { - "url": { "kind": "path", "displayName": "Url", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.net.URI", "deprecated": false, "deprecationNote": "", "secret": false, "description": "Base URL of the repository to which the request is made through the OAI-PMH protocol" }, - "endpointUrl": { "kind": "parameter", "displayName": "Endpoint Url", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Base URL of the repository to which the request is made through the OAI-PMH protocol. (Parameter)" }, + "baseUrl": { "kind": "path", "displayName": "Base Url", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "description": "Base URL of the repository to which the request is made through the OAI-PMH protocol" }, "from": { "kind": "parameter", "displayName": "From", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Specifies a lower bound for datestamp-based selective harvesting. UTC DateTime value" }, "identifier": { "kind": "parameter", "displayName": "Identifier", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Identifier of the requested resources. Applicable only with certain verbs" }, "metadataPrefix": { "kind": "parameter", "displayName": "Metadata Prefix", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "oai_dc", "description": "Specifies the metadataPrefix of the format that should be included in the metadata part of the returned records." }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/oaipmh-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/oaipmh-component.adoc index ef6cb5b..7934876 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/oaipmh-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/oaipmh-component.adoc @@ -11,8 +11,6 @@ *{component-header}* - - The oaipmh component is used for harvest OAI-PMH data providers. It allows do request to OAI-PMH endpoint using all verbs supported by the protocol. Maven users will need to add the following dependency to their `pom.xml` @@ -60,7 +58,7 @@ The OAI-PMH component supports 3 options, which are listed below. The OAI-PMH endpoint is configured using URI syntax: ---- -oaipmh:url +oaipmh:baseUrl ---- with the following path and query parameters: @@ -71,17 +69,16 @@ with the following path and query parameters: [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *url* | *Required* Base URL of the repository to which the request is made through the OAI-PMH protocol | | URI +| *baseUrl* | *Required* Base URL of the repository to which the request is made through the OAI-PMH protocol | | String |=== -=== Query Parameters (32 parameters): +=== Query Parameters (31 parameters): [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *endpointUrl* (common) | Base URL of the repository to which the request is made through the OAI-PMH protocol. (Parameter) | | String | *from* (common) | Specifies a lower bound for datestamp-based selective harvesting. UTC DateTime value | | String | *identifier* (common) | Identifier of the requested resources. Applicable only with certain verbs | | String | *metadataPrefix* (common) | Specifies the metadataPrefix of the format that should be included in the metadata part of the returned records. | oai_dc | String diff --git a/components/camel-oaipmh/src/generated/java/org/apache/camel/oaipmh/component/OAIPMHEndpointConfigurer.java b/components/camel-oaipmh/src/generated/java/org/apache/camel/oaipmh/component/OAIPMHEndpointConfigurer.java index 7191caf..76b288e 100644 --- a/components/camel-oaipmh/src/generated/java/org/apache/camel/oaipmh/component/OAIPMHEndpointConfigurer.java +++ b/components/camel-oaipmh/src/generated/java/org/apache/camel/oaipmh/component/OAIPMHEndpointConfigurer.java @@ -30,8 +30,6 @@ public class OAIPMHEndpointConfigurer extends PropertyConfigurerSupport implemen case "bridgeerrorhandler": case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true; case "delay": target.setDelay(property(camelContext, long.class, value)); return true; - case "endpointurl": - case "endpointUrl": target.setEndpointUrl(property(camelContext, java.lang.String.class, value)); return true; case "exceptionhandler": case "exceptionHandler": target.setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true; case "exchangepattern": @@ -86,7 +84,6 @@ public class OAIPMHEndpointConfigurer extends PropertyConfigurerSupport implemen answer.put("basicPropertyBinding", boolean.class); answer.put("bridgeErrorHandler", boolean.class); answer.put("delay", long.class); - answer.put("endpointUrl", java.lang.String.class); answer.put("exceptionHandler", org.apache.camel.spi.ExceptionHandler.class); answer.put("exchangePattern", org.apache.camel.ExchangePattern.class); answer.put("from", java.lang.String.class); @@ -130,8 +127,6 @@ public class OAIPMHEndpointConfigurer extends PropertyConfigurerSupport implemen case "bridgeerrorhandler": case "bridgeErrorHandler": return target.isBridgeErrorHandler(); case "delay": return target.getDelay(); - case "endpointurl": - case "endpointUrl": return target.getEndpointUrl(); case "exceptionhandler": case "exceptionHandler": return target.getExceptionHandler(); case "exchangepattern": diff --git a/components/camel-oaipmh/src/generated/resources/org/apache/camel/oaipmh/component/oaipmh.json b/components/camel-oaipmh/src/generated/resources/org/apache/camel/oaipmh/component/oaipmh.json index 70f1692..c36f846 100644 --- a/components/camel-oaipmh/src/generated/resources/org/apache/camel/oaipmh/component/oaipmh.json +++ b/components/camel-oaipmh/src/generated/resources/org/apache/camel/oaipmh/component/oaipmh.json @@ -14,7 +14,7 @@ "version": "3.5.0-SNAPSHOT", "scheme": "oaipmh", "extendsScheme": "", - "syntax": "oaipmh:url", + "syntax": "oaipmh:baseUrl", "async": false, "consumerOnly": false, "producerOnly": false, @@ -26,8 +26,7 @@ "basicPropertyBinding": { "kind": "property", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the component should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" } }, "properties": { - "url": { "kind": "path", "displayName": "Url", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.net.URI", "deprecated": false, "deprecationNote": "", "secret": false, "description": "Base URL of the repository to which the request is made through the OAI-PMH protocol" }, - "endpointUrl": { "kind": "parameter", "displayName": "Endpoint Url", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Base URL of the repository to which the request is made through the OAI-PMH protocol. (Parameter)" }, + "baseUrl": { "kind": "path", "displayName": "Base Url", "group": "common", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "description": "Base URL of the repository to which the request is made through the OAI-PMH protocol" }, "from": { "kind": "parameter", "displayName": "From", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Specifies a lower bound for datestamp-based selective harvesting. UTC DateTime value" }, "identifier": { "kind": "parameter", "displayName": "Identifier", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Identifier of the requested resources. Applicable only with certain verbs" }, "metadataPrefix": { "kind": "parameter", "displayName": "Metadata Prefix", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "oai_dc", "description": "Specifies the metadataPrefix of the format that should be included in the metadata part of the returned records." }, diff --git a/components/camel-oaipmh/src/main/docs/oaipmh-component.adoc b/components/camel-oaipmh/src/main/docs/oaipmh-component.adoc index ef6cb5b..7934876 100644 --- a/components/camel-oaipmh/src/main/docs/oaipmh-component.adoc +++ b/components/camel-oaipmh/src/main/docs/oaipmh-component.adoc @@ -11,8 +11,6 @@ *{component-header}* - - The oaipmh component is used for harvest OAI-PMH data providers. It allows do request to OAI-PMH endpoint using all verbs supported by the protocol. Maven users will need to add the following dependency to their `pom.xml` @@ -60,7 +58,7 @@ The OAI-PMH component supports 3 options, which are listed below. The OAI-PMH endpoint is configured using URI syntax: ---- -oaipmh:url +oaipmh:baseUrl ---- with the following path and query parameters: @@ -71,17 +69,16 @@ with the following path and query parameters: [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *url* | *Required* Base URL of the repository to which the request is made through the OAI-PMH protocol | | URI +| *baseUrl* | *Required* Base URL of the repository to which the request is made through the OAI-PMH protocol | | String |=== -=== Query Parameters (32 parameters): +=== Query Parameters (31 parameters): [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *endpointUrl* (common) | Base URL of the repository to which the request is made through the OAI-PMH protocol. (Parameter) | | String | *from* (common) | Specifies a lower bound for datestamp-based selective harvesting. UTC DateTime value | | String | *identifier* (common) | Identifier of the requested resources. Applicable only with certain verbs | | String | *metadataPrefix* (common) | Specifies the metadataPrefix of the format that should be included in the metadata part of the returned records. | oai_dc | String diff --git a/components/camel-oaipmh/src/main/java/org/apache/camel/oaipmh/component/OAIPMHComponent.java b/components/camel-oaipmh/src/main/java/org/apache/camel/oaipmh/component/OAIPMHComponent.java index 50f6db7..fe47a94 100644 --- a/components/camel-oaipmh/src/main/java/org/apache/camel/oaipmh/component/OAIPMHComponent.java +++ b/components/camel-oaipmh/src/main/java/org/apache/camel/oaipmh/component/OAIPMHComponent.java @@ -27,8 +27,10 @@ public class OAIPMHComponent extends DefaultComponent { @Override protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { - Endpoint endpoint = new OAIPMHEndpoint(uri, remaining, this); + OAIPMHEndpoint endpoint = new OAIPMHEndpoint(uri, remaining, this); setProperties(endpoint, parameters); + // any additional parameters are for the remaining uri + endpoint.setQueryParameters(parameters); return endpoint; } diff --git a/components/camel-oaipmh/src/main/java/org/apache/camel/oaipmh/component/OAIPMHEndpoint.java b/components/camel-oaipmh/src/main/java/org/apache/camel/oaipmh/component/OAIPMHEndpoint.java index 599250b..7947ee0 100644 --- a/components/camel-oaipmh/src/main/java/org/apache/camel/oaipmh/component/OAIPMHEndpoint.java +++ b/components/camel-oaipmh/src/main/java/org/apache/camel/oaipmh/component/OAIPMHEndpoint.java @@ -18,6 +18,7 @@ package org.apache.camel.oaipmh.component; import java.net.URI; import java.net.URISyntaxException; +import java.util.Map; import org.apache.camel.Category; import org.apache.camel.Consumer; @@ -28,21 +29,20 @@ import org.apache.camel.spi.UriEndpoint; import org.apache.camel.spi.UriParam; import org.apache.camel.spi.UriPath; import org.apache.camel.support.DefaultPollingEndpoint; -import org.apache.http.client.utils.URIBuilder; +import org.apache.camel.util.URISupport; import org.joda.time.format.ISODateTimeFormat; /** * Harvest metadata using OAI-PMH protocol */ -@UriEndpoint(firstVersion = "3.5.0", scheme = "oaipmh", title = "OAI-PMH", syntax = "oaipmh:url", category = {Category.ENDPOINT, Category.WEBSERVICE, Category.BATCH}) +@UriEndpoint(firstVersion = "3.5.0", scheme = "oaipmh", title = "OAI-PMH", syntax = "oaipmh:baseUrl", category = {Category.ENDPOINT, Category.WEBSERVICE, Category.BATCH}) public class OAIPMHEndpoint extends DefaultPollingEndpoint { + private transient URI url; + @UriPath(description = "Base URL of the repository to which the request is made through the OAI-PMH protocol") @Metadata(required = true) - private URI url; - - @UriParam(description = "Base URL of the repository to which the request is made through the OAI-PMH protocol. (Parameter)") - private String endpointUrl; + private String baseUrl; @UriParam(description = "Specifies a lower bound for datestamp-based selective harvesting. UTC DateTime value") private String from; @@ -71,42 +71,55 @@ public class OAIPMHEndpoint extends DefaultPollingEndpoint { @UriParam(label = "producer", description = "Returns the response of a single request. Otherwise it will make requests until there is no more data to return.") private boolean onlyFirst; - public OAIPMHEndpoint(String uri, String url, OAIPMHComponent component) { + private Map<String, Object> queryParameters; + + @Override + public boolean isLenientProperties() { + return true; + } + + public OAIPMHEndpoint(String uri, String remaining, OAIPMHComponent component) { super(uri, component); - if (this.getEndpointUrl() != null) { - this.url = URI.create(this.getEndpointUrl()); - } else { - this.url = url.isEmpty() ? null : URI.create((this.isSsl() ? "https://" : "http://") + url); - } + this.baseUrl = remaining; } - public String getEndpointUrl() { - return endpointUrl; + public Map<String, Object> getQueryParameters() { + return queryParameters; } - public void setEndpointUrl(String endpointUrl) { - this.url = URI.create(endpointUrl); - this.endpointUrl = endpointUrl; + public void setQueryParameters(Map<String, Object> queryParameters) { + this.queryParameters = queryParameters; } @Override - public Producer createProducer() throws Exception { + protected void doInit() throws Exception { + super.doInit(); + validateParameters(); + + // build uri from parameters + this.url = URI.create((this.isSsl() ? "https://" : "http://") + baseUrl); + // append extra parameters + if (queryParameters != null && !queryParameters.isEmpty()) { + Map<String, Object> parameters = URISupport.parseParameters(url); + parameters.putAll(queryParameters); + this.url = URISupport.createRemainingURI(url, parameters); + } + } + + @Override + public Producer createProducer() throws Exception { return new OAIPMHProducer(this); } @Override public Consumer createConsumer(Processor processor) throws Exception { - validateParameters(); OAIPMHConsumer consumer = new OAIPMHConsumer(this, processor); configureConsumer(consumer); return consumer; } private void validateParameters() throws URISyntaxException { - //Update url if SSL is set to true - this.url = new URIBuilder(this.url).setScheme(this.ssl ? "https" : "http").build(); - // From parameter in ISO 8601 format if (from != null) { ISODateTimeFormat.dateTimeNoMillis().parseDateTime(from); diff --git a/components/camel-oaipmh/src/test/java/org/apache/camel/oaipmh/OAIPMHComponentConsumerParticularCaseTest.java b/components/camel-oaipmh/src/test/java/org/apache/camel/oaipmh/OAIPMHComponentConsumerParticularCaseTest.java index b3a50d9..bc0948d 100644 --- a/components/camel-oaipmh/src/test/java/org/apache/camel/oaipmh/OAIPMHComponentConsumerParticularCaseTest.java +++ b/components/camel-oaipmh/src/test/java/org/apache/camel/oaipmh/OAIPMHComponentConsumerParticularCaseTest.java @@ -52,7 +52,7 @@ public class OAIPMHComponentConsumerParticularCaseTest extends CamelTestSupport protected RouteBuilder createRouteBuilder() throws Exception { return new RouteBuilder() { public void configure() { - from("oaipmh:?endpointUrl=http://localhost:" + JettyTestServer.getInstance().port + "/index.php?page=oai&" + from("oaipmh:localhost:" + JettyTestServer.getInstance().port + "/index.php?page=oai&" + "delay=1000&" + "from=2020-02-01T00:00:00Z&" + "initialDelay=1000") diff --git a/core/camel-componentdsl/src/generated/resources/metadata.json b/core/camel-componentdsl/src/generated/resources/metadata.json index 90ccf83..4d81868 100644 --- a/core/camel-componentdsl/src/generated/resources/metadata.json +++ b/core/camel-componentdsl/src/generated/resources/metadata.json @@ -5207,7 +5207,7 @@ "version": "3.5.0-SNAPSHOT", "scheme": "oaipmh", "extendsScheme": "", - "syntax": "oaipmh:url", + "syntax": "oaipmh:baseUrl", "async": false, "consumerOnly": false, "producerOnly": false, diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java index 9f3a488..4f06e16 100644 --- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java +++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java @@ -10828,13 +10828,13 @@ public class StaticEndpointBuilders { * Since: 3.5 * Maven coordinates: org.apache.camel:camel-oaipmh * - * Syntax: <code>oaipmh:url</code> + * Syntax: <code>oaipmh:baseUrl</code> * - * Path parameter: url (required) + * Path parameter: baseUrl (required) * Base URL of the repository to which the request is made through the * OAI-PMH protocol * - * @param path url + * @param path baseUrl */ public static org.apache.camel.builder.endpoint.dsl.OAIPMHEndpointBuilderFactory.OAIPMHEndpointBuilder oaipmh( String path) { @@ -10848,15 +10848,15 @@ public class StaticEndpointBuilders { * Since: 3.5 * Maven coordinates: org.apache.camel:camel-oaipmh * - * Syntax: <code>oaipmh:url</code> + * Syntax: <code>oaipmh:baseUrl</code> * - * Path parameter: url (required) + * Path parameter: baseUrl (required) * Base URL of the repository to which the request is made through the * OAI-PMH protocol * * @param componentName to use a custom component name for the endpoint * instead of the default name - * @param path url + * @param path baseUrl */ public static org.apache.camel.builder.endpoint.dsl.OAIPMHEndpointBuilderFactory.OAIPMHEndpointBuilder oaipmh( String componentName, diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/OAIPMHEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/OAIPMHEndpointBuilderFactory.java index df02cf1..175fa00 100644 --- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/OAIPMHEndpointBuilderFactory.java +++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/OAIPMHEndpointBuilderFactory.java @@ -47,18 +47,6 @@ public interface OAIPMHEndpointBuilderFactory { return (AdvancedOAIPMHEndpointConsumerBuilder) this; } /** - * Base URL of the repository to which the request is made through the - * OAI-PMH protocol. (Parameter). - * - * The option is a: <code>java.lang.String</code> type. - * - * Group: common - */ - default OAIPMHEndpointConsumerBuilder endpointUrl(String endpointUrl) { - doSetProperty("endpointUrl", endpointUrl); - return this; - } - /** * Specifies a lower bound for datestamp-based selective harvesting. UTC * DateTime value. * @@ -788,18 +776,6 @@ public interface OAIPMHEndpointBuilderFactory { return (AdvancedOAIPMHEndpointProducerBuilder) this; } /** - * Base URL of the repository to which the request is made through the - * OAI-PMH protocol. (Parameter). - * - * The option is a: <code>java.lang.String</code> type. - * - * Group: common - */ - default OAIPMHEndpointProducerBuilder endpointUrl(String endpointUrl) { - doSetProperty("endpointUrl", endpointUrl); - return this; - } - /** * Specifies a lower bound for datestamp-based selective harvesting. UTC * DateTime value. * @@ -1071,18 +1047,6 @@ public interface OAIPMHEndpointBuilderFactory { return (AdvancedOAIPMHEndpointBuilder) this; } /** - * Base URL of the repository to which the request is made through the - * OAI-PMH protocol. (Parameter). - * - * The option is a: <code>java.lang.String</code> type. - * - * Group: common - */ - default OAIPMHEndpointBuilder endpointUrl(String endpointUrl) { - doSetProperty("endpointUrl", endpointUrl); - return this; - } - /** * Specifies a lower bound for datestamp-based selective harvesting. UTC * DateTime value. * @@ -1281,13 +1245,13 @@ public interface OAIPMHEndpointBuilderFactory { * Since: 3.5 * Maven coordinates: org.apache.camel:camel-oaipmh * - * Syntax: <code>oaipmh:url</code> + * Syntax: <code>oaipmh:baseUrl</code> * - * Path parameter: url (required) + * Path parameter: baseUrl (required) * Base URL of the repository to which the request is made through the * OAI-PMH protocol * - * @param path url + * @param path baseUrl */ default OAIPMHEndpointBuilder oaipmh(String path) { return OAIPMHEndpointBuilderFactory.endpointBuilder("oaipmh", path); @@ -1300,15 +1264,15 @@ public interface OAIPMHEndpointBuilderFactory { * Since: 3.5 * Maven coordinates: org.apache.camel:camel-oaipmh * - * Syntax: <code>oaipmh:url</code> + * Syntax: <code>oaipmh:baseUrl</code> * - * Path parameter: url (required) + * Path parameter: baseUrl (required) * Base URL of the repository to which the request is made through the * OAI-PMH protocol * * @param componentName to use a custom component name for the endpoint * instead of the default name - * @param path url + * @param path baseUrl */ default OAIPMHEndpointBuilder oaipmh(String componentName, String path) { return OAIPMHEndpointBuilderFactory.endpointBuilder(componentName, path); diff --git a/docs/components/modules/ROOT/pages/oaipmh-component.adoc b/docs/components/modules/ROOT/pages/oaipmh-component.adoc index f4ba124..27e9d96 100644 --- a/docs/components/modules/ROOT/pages/oaipmh-component.adoc +++ b/docs/components/modules/ROOT/pages/oaipmh-component.adoc @@ -13,8 +13,6 @@ *{component-header}* - - The oaipmh component is used for harvest OAI-PMH data providers. It allows do request to OAI-PMH endpoint using all verbs supported by the protocol. Maven users will need to add the following dependency to their `pom.xml` @@ -62,7 +60,7 @@ The OAI-PMH component supports 3 options, which are listed below. The OAI-PMH endpoint is configured using URI syntax: ---- -oaipmh:name +oaipmh:baseUrl ---- with the following path and query parameters: @@ -73,17 +71,16 @@ with the following path and query parameters: [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *url* | *Required* Base URL of the repository to which the request is made through the OAI-PMH protocol | | URI +| *baseUrl* | *Required* Base URL of the repository to which the request is made through the OAI-PMH protocol | | String |=== -=== Query Parameters (32 parameters): +=== Query Parameters (31 parameters): [width="100%",cols="2,5,^1,2",options="header"] |=== | Name | Description | Default | Type -| *endpointUrl* (common) | Base URL of the repository to which the request is made through the OAI-PMH protocol. (Parameter) | | String | *from* (common) | Specifies a lower bound for datestamp-based selective harvesting. UTC DateTime value | | String | *identifier* (common) | Identifier of the requested resources. Applicable only with certain verbs | | String | *metadataPrefix* (common) | Specifies the metadataPrefix of the format that should be included in the metadata part of the returned records. | oai_dc | String