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
commit 880b14ae8ad9507db43554e2f1eed3bb9727484a Author: Claus Ibsen <[email protected]> AuthorDate: Thu Aug 13 15:01:55 2020 +0200 CAMEL-15253: Polished --- .../oaipmh/component/OAIPMHEndpointConfigurer.java | 6 +- .../org/apache/camel/oaipmh/component/oaipmh.json | 18 +- .../src/main/docs/oaipmh-component.adoc | 28 +- .../camel/oaipmh/component/OAIPMHComponent.java | 3 - .../camel/oaipmh/component/OAIPMHConsumer.java | 2 +- .../camel/oaipmh/component/OAIPMHEndpoint.java | 27 +- .../camel/oaipmh/component/OAIPMHProducer.java | 2 +- .../component/ComponentsBuilderFactory.java | 4 +- .../dsl/OaipmhComponentBuilderFactory.java | 8 +- .../src/generated/resources/metadata.json | 4 +- .../builder/endpoint/StaticEndpointBuilders.java | 12 +- .../endpoint/dsl/OAIPMHEndpointBuilderFactory.java | 412 +++++++++------------ 12 files changed, 233 insertions(+), 293 deletions(-) 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 1c617de..7191caf 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 @@ -38,7 +38,7 @@ public class OAIPMHEndpointConfigurer extends PropertyConfigurerSupport implemen case "exchangePattern": target.setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true; case "from": target.setFrom(property(camelContext, java.lang.String.class, value)); return true; case "greedy": target.setGreedy(property(camelContext, boolean.class, value)); return true; - case "identitier": target.setIdentitier(property(camelContext, java.lang.String.class, value)); return true; + case "identifier": target.setIdentifier(property(camelContext, java.lang.String.class, value)); return true; case "ignoresslwarnings": case "ignoreSSLWarnings": target.setIgnoreSSLWarnings(property(camelContext, boolean.class, value)); return true; case "initialdelay": @@ -91,7 +91,7 @@ public class OAIPMHEndpointConfigurer extends PropertyConfigurerSupport implemen answer.put("exchangePattern", org.apache.camel.ExchangePattern.class); answer.put("from", java.lang.String.class); answer.put("greedy", boolean.class); - answer.put("identitier", java.lang.String.class); + answer.put("identifier", java.lang.String.class); answer.put("ignoreSSLWarnings", boolean.class); answer.put("initialDelay", long.class); answer.put("lazyStartProducer", boolean.class); @@ -138,7 +138,7 @@ public class OAIPMHEndpointConfigurer extends PropertyConfigurerSupport implemen case "exchangePattern": return target.getExchangePattern(); case "from": return target.getFrom(); case "greedy": return target.isGreedy(); - case "identitier": return target.getIdentitier(); + case "identifier": return target.getIdentifier(); case "ignoresslwarnings": case "ignoreSSLWarnings": return target.isIgnoreSSLWarnings(); case "initialdelay": 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 0476813..1cd96d9 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 @@ -2,8 +2,8 @@ "component": { "kind": "component", "name": "oaipmh", - "title": "OAIPMH", - "description": "Represents a OAIPMH endpoint. Component for do OAI-PMH request", + "title": "OAI-PMH", + "description": "Harvest metadata using OAI-PMH protocol", "deprecated": false, "firstVersion": "3.5.0", "label": "endpoint,webservice,batch", @@ -26,15 +26,12 @@ "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": "advanced", "label": "advanced", "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." }, + "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)" }, "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" }, - "identitier": { "kind": "parameter", "displayName": "Identitier", "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" }, - "ignoreSSLWarnings": { "kind": "parameter", "displayName": "Ignore SSLWarnings", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Ignore SSL certificate warnings" }, + "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." }, - "onlyFirst": { "kind": "parameter", "displayName": "Only First", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "False", "description": "Returns the response of a single request. Otherwise it will make requests until there is no more data to return." }, - "set": { "kind": "parameter", "displayName": "Set", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Specifies membership as a criteria for set-based selective harvesting." }, - "ssl": { "kind": "parameter", "displayName": "Ssl", "group": "common", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Causes the defined url to make an https request" }, + "set": { "kind": "parameter", "displayName": "Set", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Specifies membership as a criteria for set-based selective harvesting" }, "until": { "kind": "parameter", "displayName": "Until", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "description": "Specifies an upper bound for datestamp-based selective harvesting. UTC DateTime value." }, "verb": { "kind": "parameter", "displayName": "Verb", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "defaultValue": "ListRecords", "description": "Request name supported by OAI-PMh protocol" }, "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled b [...] @@ -43,6 +40,7 @@ "exchangePattern": { "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut", "InOptionalOut" ], "deprecated": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." }, "pollStrategy": { "kind": "parameter", "displayName": "Poll Strategy", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.PollingConsumerPollStrategy", "deprecated": false, "secret": false, "description": "A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange h [...] "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the [...] + "onlyFirst": { "kind": "parameter", "displayName": "Only First", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Returns the response of a single request. Otherwise it will make requests until there is no more data to return." }, "basicPropertyBinding": { "kind": "parameter", "displayName": "Basic Property Binding", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities" }, "synchronous": { "kind": "parameter", "displayName": "Synchronous", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "description": "Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported)." }, "backoffErrorThreshold": { "kind": "parameter", "displayName": "Backoff Error Threshold", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "secret": false, "description": "The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in." }, @@ -58,6 +56,8 @@ "schedulerProperties": { "kind": "parameter", "displayName": "Scheduler Properties", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "scheduler.", "multiValue": true, "deprecated": false, "secret": false, "description": "To configure additional properties when using a custom scheduler or any of the Quartz, Spring based scheduler." }, "startScheduler": { "kind": "parameter", "displayName": "Start Scheduler", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "description": "Whether the scheduler should be auto started." }, "timeUnit": { "kind": "parameter", "displayName": "Time Unit", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "object", "javaType": "java.util.concurrent.TimeUnit", "enum": [ "NANOSECONDS", "MICROSECONDS", "MILLISECONDS", "SECONDS", "MINUTES", "HOURS", "DAYS" ], "deprecated": false, "secret": false, "defaultValue": "MILLISECONDS", "description": "Time unit for initialDelay and delay options." }, - "useFixedDelay": { "kind": "parameter", "displayName": "Use Fixed Delay", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "description": "Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details." } + "useFixedDelay": { "kind": "parameter", "displayName": "Use Fixed Delay", "group": "scheduler", "label": "consumer,scheduler", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "description": "Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details." }, + "ignoreSSLWarnings": { "kind": "parameter", "displayName": "Ignore SSLWarnings", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Ignore SSL certificate warnings" }, + "ssl": { "kind": "parameter", "displayName": "Ssl", "group": "security", "label": "security", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": false, "description": "Causes the defined url to make an https request" } } } diff --git a/components/camel-oaipmh/src/main/docs/oaipmh-component.adoc b/components/camel-oaipmh/src/main/docs/oaipmh-component.adoc index 9ec9c53..b0db216 100644 --- a/components/camel-oaipmh/src/main/docs/oaipmh-component.adoc +++ b/components/camel-oaipmh/src/main/docs/oaipmh-component.adoc @@ -1,8 +1,8 @@ [[oaipmh-component]] -= OAIPMH Component -:docTitle: OAIPMH += OAI-PMH Component +:docTitle: OAI-PMH :artifactId: camel-oaipmh -:description: Represents a OAIPMH endpoint. Component for do OAI-PMH request +:description: Harvest metadata using OAI-PMH protocol :since: 3.5 :supportLevel: Preview :component-header: Both producer and consumer are supported @@ -13,7 +13,7 @@ -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. +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` for this component: @@ -41,7 +41,7 @@ You can append query options to the URI in the following format, == Options // component options: START -The OAIPMH component supports 3 options, which are listed below. +The OAI-PMH component supports 3 options, which are listed below. @@ -57,7 +57,7 @@ The OAIPMH component supports 3 options, which are listed below. // endpoint options: START -The OAIPMH endpoint is configured using URI syntax: +The OAI-PMH endpoint is configured using URI syntax: ---- oaipmh:name @@ -71,7 +71,7 @@ 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 +| *url* | *Required* Base URL of the repository to which the request is made through the OAI-PMH protocol | | URI |=== @@ -83,12 +83,9 @@ with the following path and query parameters: | 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 -| *identitier* (common) | Identifier of the requested resources. Applicable only with certain verbs | | String -| *ignoreSSLWarnings* (common) | Ignore SSL certificate warnings | false | boolean +| *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 -| *onlyFirst* (common) | Returns the response of a single request. Otherwise it will make requests until there is no more data to return. | False | boolean -| *set* (common) | Specifies membership as a criteria for set-based selective harvesting. | | String -| *ssl* (common) | Causes the defined url to make an https request | false | boolean +| *set* (common) | Specifies membership as a criteria for set-based selective harvesting | | String | *until* (common) | Specifies an upper bound for datestamp-based selective harvesting. UTC DateTime value. | | String | *verb* (common) | Request name supported by OAI-PMh protocol | ListRecords | String | *bridgeErrorHandler* (consumer) | Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored. | false | boolean @@ -97,6 +94,7 @@ with the following path and query parameters: | *exchangePattern* (consumer) | Sets the exchange pattern when the consumer creates an exchange. The value can be one of: InOnly, InOut, InOptionalOut | | ExchangePattern | *pollStrategy* (consumer) | A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. | | PollingConsumerPollStrategy | *lazyStartProducer* (producer) | Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and [...] +| *onlyFirst* (producer) | Returns the response of a single request. Otherwise it will make requests until there is no more data to return. | false | boolean | *basicPropertyBinding* (advanced) | Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities | false | boolean | *synchronous* (advanced) | Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). | false | boolean | *backoffErrorThreshold* (scheduler) | The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in. | | int @@ -113,6 +111,8 @@ with the following path and query parameters: | *startScheduler* (scheduler) | Whether the scheduler should be auto started. | true | boolean | *timeUnit* (scheduler) | Time unit for initialDelay and delay options. The value can be one of: NANOSECONDS, MICROSECONDS, MILLISECONDS, SECONDS, MINUTES, HOURS, DAYS | MILLISECONDS | TimeUnit | *useFixedDelay* (scheduler) | Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. | true | boolean +| *ignoreSSLWarnings* (security) | Ignore SSL certificate warnings | false | boolean +| *ssl* (security) | Causes the defined url to make an https request | false | boolean |=== // endpoint options: END @@ -126,8 +126,6 @@ with the following path and query parameters: |======================================================================= |Name |Description |`CamelOaimphResumptionToken` | This header is obtained when onlyFirst option is enable. Return resumptiontoken of the request when data is still available. - - |======================================================================= == Usage @@ -163,5 +161,3 @@ from("oaipmh:baseUrlRepository/oai/request") --------------------------------------------------------- For more details about OAI-PMH see the documentation: http://www.openarchives.org/pmh/ - - 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 3db3376..50f6db7 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 @@ -22,9 +22,6 @@ import org.apache.camel.Endpoint; import org.apache.camel.spi.annotations.Component; import org.apache.camel.support.DefaultComponent; -/** - * Represents the component that manages {@link OAIPMHEndpoint}. - */ @Component("oaipmh") public class OAIPMHComponent extends DefaultComponent { diff --git a/components/camel-oaipmh/src/main/java/org/apache/camel/oaipmh/component/OAIPMHConsumer.java b/components/camel-oaipmh/src/main/java/org/apache/camel/oaipmh/component/OAIPMHConsumer.java index ca48245..23b7b8f 100644 --- a/components/camel-oaipmh/src/main/java/org/apache/camel/oaipmh/component/OAIPMHConsumer.java +++ b/components/camel-oaipmh/src/main/java/org/apache/camel/oaipmh/component/OAIPMHConsumer.java @@ -42,7 +42,7 @@ public class OAIPMHConsumer extends DefaultScheduledPollConsumer { endpoint.getUntil(), endpoint.getFrom(), endpoint.getSet(), - endpoint.getIdentitier()); + endpoint.getIdentifier()); if (endpoint.isIgnoreSSLWarnings()) { this.harvester.getHttpClient().setIgnoreSSLWarnings(true); } 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 0c74c4c..52ffa07 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 @@ -32,12 +32,12 @@ import org.apache.http.client.utils.URIBuilder; import org.joda.time.format.ISODateTimeFormat; /** - * Represents a OAIPMH endpoint. Component for do OAI-PMH request + * Harvest metadata using OAI-PMH protocol */ -@UriEndpoint(firstVersion = "3.5.0", scheme = "oaipmh", title = "OAIPMH", syntax = "oaipmh:name", category = {Category.ENDPOINT, Category.WEBSERVICE, Category.BATCH}) +@UriEndpoint(firstVersion = "3.5.0", scheme = "oaipmh", title = "OAI-PMH", syntax = "oaipmh:name", category = {Category.ENDPOINT, Category.WEBSERVICE, Category.BATCH}) public class OAIPMHEndpoint extends DefaultPollingEndpoint { - @UriPath(description = "Base URL of the repository to which the request is made through the OAI-PMH protocol.", label = "advanced") + @UriPath(description = "Base URL of the repository to which the request is made through the OAI-PMH protocol") @Metadata(required = true) private URI url; @@ -50,7 +50,7 @@ public class OAIPMHEndpoint extends DefaultPollingEndpoint { @UriParam(description = "Specifies an upper bound for datestamp-based selective harvesting. UTC DateTime value.") private String until; - @UriParam(description = "Specifies membership as a criteria for set-based selective harvesting.") + @UriParam(description = "Specifies membership as a criteria for set-based selective harvesting") private String set; @UriParam(description = "Request name supported by OAI-PMh protocol", defaultValue = "ListRecords") @@ -59,22 +59,21 @@ public class OAIPMHEndpoint extends DefaultPollingEndpoint { @UriParam(description = "Specifies the metadataPrefix of the format that should be included in the metadata part of the returned records.", defaultValue = "oai_dc") private String metadataPrefix = "oai_dc"; - @UriParam(description = "Causes the defined url to make an https request", defaultValue = "false") + @UriParam(label = "security", description = "Causes the defined url to make an https request") private boolean ssl; - @UriParam(description = "Ignore SSL certificate warnings", defaultValue = "false") + @UriParam(label = "security", description = "Ignore SSL certificate warnings") private boolean ignoreSSLWarnings; - @UriParam(description = "Identifier of the requested resources. Applicable only with certain verbs ") - private String identitier; + @UriParam(description = "Identifier of the requested resources. Applicable only with certain verbs") + private String identifier; - @UriParam(description = "Returns the response of a single request. Otherwise it will make requests until there is no more data to return.", defaultValue = "False") + @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) { super(uri, component); if (this.getEndpointUrl() != null) { - //this.url = this.getEndpointUrl() == null ? null : URI.create(this.getEndpointUrl()); this.url = URI.create(this.getEndpointUrl()); } else { this.url = url.isEmpty() ? null : URI.create((this.isSsl() ? "https://" : "http://") + url); @@ -181,12 +180,12 @@ public class OAIPMHEndpoint extends DefaultPollingEndpoint { return this.url; } - public String getIdentitier() { - return identitier; + public String getIdentifier() { + return identifier; } - public void setIdentitier(String identitier) { - this.identitier = identitier; + public void setIdentifier(String identifier) { + this.identifier = identifier; } public boolean isOnlyFirst() { diff --git a/components/camel-oaipmh/src/main/java/org/apache/camel/oaipmh/component/OAIPMHProducer.java b/components/camel-oaipmh/src/main/java/org/apache/camel/oaipmh/component/OAIPMHProducer.java index 1ce48df..ed8ffb0 100644 --- a/components/camel-oaipmh/src/main/java/org/apache/camel/oaipmh/component/OAIPMHProducer.java +++ b/components/camel-oaipmh/src/main/java/org/apache/camel/oaipmh/component/OAIPMHProducer.java @@ -53,7 +53,7 @@ public class OAIPMHProducer extends DefaultProducer { endpoint.getUntil(), endpoint.getFrom(), endpoint.getSet(), - endpoint.getIdentitier()); + endpoint.getIdentifier()); overrideHarvesterConfigs(exchange.getIn(), harvester); if (endpoint.isIgnoreSSLWarnings()) { harvester.getHttpClient().setIgnoreSSLWarnings(true); diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java index 979b081..193d343 100644 --- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java +++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java @@ -2794,8 +2794,8 @@ public interface ComponentsBuilderFactory { return org.apache.camel.builder.component.dsl.NsqComponentBuilderFactory.nsq(); } /** - * OAIPMH (camel-oaipmh) - * Represents a OAIPMH endpoint. Component for do OAI-PMH request + * OAI-PMH (camel-oaipmh) + * Harvest metadata using OAI-PMH protocol * * Category: endpoint,webservice,batch * Since: 3.5 diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/OaipmhComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/OaipmhComponentBuilderFactory.java index 27401ee..b642b38 100644 --- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/OaipmhComponentBuilderFactory.java +++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/OaipmhComponentBuilderFactory.java @@ -23,7 +23,7 @@ import org.apache.camel.builder.component.ComponentBuilder; import org.apache.camel.oaipmh.component.OAIPMHComponent; /** - * Represents a OAIPMH endpoint. Component for do OAI-PMH request + * Harvest metadata using OAI-PMH protocol * * Generated by camel-package-maven-plugin - do not edit this file! */ @@ -31,8 +31,8 @@ import org.apache.camel.oaipmh.component.OAIPMHComponent; public interface OaipmhComponentBuilderFactory { /** - * OAIPMH (camel-oaipmh) - * Represents a OAIPMH endpoint. Component for do OAI-PMH request + * OAI-PMH (camel-oaipmh) + * Harvest metadata using OAI-PMH protocol * * Category: endpoint,webservice,batch * Since: 3.5 @@ -43,7 +43,7 @@ public interface OaipmhComponentBuilderFactory { } /** - * Builder for the OAIPMH component. + * Builder for the OAI-PMH component. */ interface OaipmhComponentBuilder extends diff --git a/core/camel-componentdsl/src/generated/resources/metadata.json b/core/camel-componentdsl/src/generated/resources/metadata.json index 3d1df9d..c197157 100644 --- a/core/camel-componentdsl/src/generated/resources/metadata.json +++ b/core/camel-componentdsl/src/generated/resources/metadata.json @@ -5195,8 +5195,8 @@ "OaipmhComponentBuilderFactory": { "kind": "component", "name": "oaipmh", - "title": "OAIPMH", - "description": "Represents a OAIPMH endpoint. Component for do OAI-PMH request", + "title": "OAI-PMH", + "description": "Harvest metadata using OAI-PMH protocol", "deprecated": false, "firstVersion": "3.5.0", "label": "endpoint,webservice,batch", 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 e82966f..af94fea 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 @@ -10821,8 +10821,8 @@ public class StaticEndpointBuilders { return org.apache.camel.builder.endpoint.dsl.NsqEndpointBuilderFactory.endpointBuilder(componentName, path); } /** - * OAIPMH (camel-oaipmh) - * Represents a OAIPMH endpoint. Component for do OAI-PMH request + * OAI-PMH (camel-oaipmh) + * Harvest metadata using OAI-PMH protocol * * Category: endpoint,webservice,batch * Since: 3.5 @@ -10832,7 +10832,7 @@ public class StaticEndpointBuilders { * * Path parameter: url (required) * Base URL of the repository to which the request is made through the - * OAI-PMH protocol. + * OAI-PMH protocol * * @param path name */ @@ -10841,8 +10841,8 @@ public class StaticEndpointBuilders { return org.apache.camel.builder.endpoint.dsl.OAIPMHEndpointBuilderFactory.endpointBuilder("oaipmh", path); } /** - * OAIPMH (camel-oaipmh) - * Represents a OAIPMH endpoint. Component for do OAI-PMH request + * OAI-PMH (camel-oaipmh) + * Harvest metadata using OAI-PMH protocol * * Category: endpoint,webservice,batch * Since: 3.5 @@ -10852,7 +10852,7 @@ public class StaticEndpointBuilders { * * Path parameter: url (required) * Base URL of the repository to which the request is made through the - * OAI-PMH protocol. + * OAI-PMH protocol * * @param componentName to use a custom component name for the endpoint * instead of the default name 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 7f35f38..87166e3 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 @@ -29,7 +29,7 @@ import org.apache.camel.spi.ExceptionHandler; import org.apache.camel.spi.PollingConsumerPollStrategy; /** - * Represents a OAIPMH endpoint. Component for do OAI-PMH request + * Harvest metadata using OAI-PMH protocol * * Generated by camel build tools - do NOT edit this file! */ @@ -38,7 +38,7 @@ public interface OAIPMHEndpointBuilderFactory { /** - * Builder for endpoint consumers for the OAIPMH component. + * Builder for endpoint consumers for the OAI-PMH component. */ public interface OAIPMHEndpointConsumerBuilder extends @@ -78,34 +78,8 @@ public interface OAIPMHEndpointBuilderFactory { * * Group: common */ - default OAIPMHEndpointConsumerBuilder identitier(String identitier) { - doSetProperty("identitier", identitier); - return this; - } - /** - * Ignore SSL certificate warnings. - * - * The option is a: <code>boolean</code> type. - * - * Default: false - * Group: common - */ - default OAIPMHEndpointConsumerBuilder ignoreSSLWarnings( - boolean ignoreSSLWarnings) { - doSetProperty("ignoreSSLWarnings", ignoreSSLWarnings); - return this; - } - /** - * Ignore SSL certificate warnings. - * - * The option will be converted to a <code>boolean</code> type. - * - * Default: false - * Group: common - */ - default OAIPMHEndpointConsumerBuilder ignoreSSLWarnings( - String ignoreSSLWarnings) { - doSetProperty("ignoreSSLWarnings", ignoreSSLWarnings); + default OAIPMHEndpointConsumerBuilder identifier(String identifier) { + doSetProperty("identifier", identifier); return this; } /** @@ -123,32 +97,6 @@ public interface OAIPMHEndpointBuilderFactory { return this; } /** - * Returns the response of a single request. Otherwise it will make - * requests until there is no more data to return. - * - * The option is a: <code>boolean</code> type. - * - * Default: False - * Group: common - */ - default OAIPMHEndpointConsumerBuilder onlyFirst(boolean onlyFirst) { - doSetProperty("onlyFirst", onlyFirst); - return this; - } - /** - * Returns the response of a single request. Otherwise it will make - * requests until there is no more data to return. - * - * The option will be converted to a <code>boolean</code> type. - * - * Default: False - * Group: common - */ - default OAIPMHEndpointConsumerBuilder onlyFirst(String onlyFirst) { - doSetProperty("onlyFirst", onlyFirst); - return this; - } - /** * Specifies membership as a criteria for set-based selective * harvesting. * @@ -161,30 +109,6 @@ public interface OAIPMHEndpointBuilderFactory { return this; } /** - * Causes the defined url to make an https request. - * - * The option is a: <code>boolean</code> type. - * - * Default: false - * Group: common - */ - default OAIPMHEndpointConsumerBuilder ssl(boolean ssl) { - doSetProperty("ssl", ssl); - return this; - } - /** - * Causes the defined url to make an https request. - * - * The option will be converted to a <code>boolean</code> type. - * - * Default: false - * Group: common - */ - default OAIPMHEndpointConsumerBuilder ssl(String ssl) { - doSetProperty("ssl", ssl); - return this; - } - /** * Specifies an upper bound for datestamp-based selective harvesting. * UTC DateTime value. * @@ -646,10 +570,60 @@ public interface OAIPMHEndpointBuilderFactory { doSetProperty("useFixedDelay", useFixedDelay); return this; } + /** + * Ignore SSL certificate warnings. + * + * The option is a: <code>boolean</code> type. + * + * Default: false + * Group: security + */ + default OAIPMHEndpointConsumerBuilder ignoreSSLWarnings( + boolean ignoreSSLWarnings) { + doSetProperty("ignoreSSLWarnings", ignoreSSLWarnings); + return this; + } + /** + * Ignore SSL certificate warnings. + * + * The option will be converted to a <code>boolean</code> type. + * + * Default: false + * Group: security + */ + default OAIPMHEndpointConsumerBuilder ignoreSSLWarnings( + String ignoreSSLWarnings) { + doSetProperty("ignoreSSLWarnings", ignoreSSLWarnings); + return this; + } + /** + * Causes the defined url to make an https request. + * + * The option is a: <code>boolean</code> type. + * + * Default: false + * Group: security + */ + default OAIPMHEndpointConsumerBuilder ssl(boolean ssl) { + doSetProperty("ssl", ssl); + return this; + } + /** + * Causes the defined url to make an https request. + * + * The option will be converted to a <code>boolean</code> type. + * + * Default: false + * Group: security + */ + default OAIPMHEndpointConsumerBuilder ssl(String ssl) { + doSetProperty("ssl", ssl); + return this; + } } /** - * Advanced builder for endpoint consumers for the OAIPMH component. + * Advanced builder for endpoint consumers for the OAI-PMH component. */ public interface AdvancedOAIPMHEndpointConsumerBuilder extends @@ -805,7 +779,7 @@ public interface OAIPMHEndpointBuilderFactory { } /** - * Builder for endpoint producers for the OAIPMH component. + * Builder for endpoint producers for the OAI-PMH component. */ public interface OAIPMHEndpointProducerBuilder extends @@ -845,34 +819,8 @@ public interface OAIPMHEndpointBuilderFactory { * * Group: common */ - default OAIPMHEndpointProducerBuilder identitier(String identitier) { - doSetProperty("identitier", identitier); - return this; - } - /** - * Ignore SSL certificate warnings. - * - * The option is a: <code>boolean</code> type. - * - * Default: false - * Group: common - */ - default OAIPMHEndpointProducerBuilder ignoreSSLWarnings( - boolean ignoreSSLWarnings) { - doSetProperty("ignoreSSLWarnings", ignoreSSLWarnings); - return this; - } - /** - * Ignore SSL certificate warnings. - * - * The option will be converted to a <code>boolean</code> type. - * - * Default: false - * Group: common - */ - default OAIPMHEndpointProducerBuilder ignoreSSLWarnings( - String ignoreSSLWarnings) { - doSetProperty("ignoreSSLWarnings", ignoreSSLWarnings); + default OAIPMHEndpointProducerBuilder identifier(String identifier) { + doSetProperty("identifier", identifier); return this; } /** @@ -890,32 +838,6 @@ public interface OAIPMHEndpointBuilderFactory { return this; } /** - * Returns the response of a single request. Otherwise it will make - * requests until there is no more data to return. - * - * The option is a: <code>boolean</code> type. - * - * Default: False - * Group: common - */ - default OAIPMHEndpointProducerBuilder onlyFirst(boolean onlyFirst) { - doSetProperty("onlyFirst", onlyFirst); - return this; - } - /** - * Returns the response of a single request. Otherwise it will make - * requests until there is no more data to return. - * - * The option will be converted to a <code>boolean</code> type. - * - * Default: False - * Group: common - */ - default OAIPMHEndpointProducerBuilder onlyFirst(String onlyFirst) { - doSetProperty("onlyFirst", onlyFirst); - return this; - } - /** * Specifies membership as a criteria for set-based selective * harvesting. * @@ -928,30 +850,6 @@ public interface OAIPMHEndpointBuilderFactory { return this; } /** - * Causes the defined url to make an https request. - * - * The option is a: <code>boolean</code> type. - * - * Default: false - * Group: common - */ - default OAIPMHEndpointProducerBuilder ssl(boolean ssl) { - doSetProperty("ssl", ssl); - return this; - } - /** - * Causes the defined url to make an https request. - * - * The option will be converted to a <code>boolean</code> type. - * - * Default: false - * Group: common - */ - default OAIPMHEndpointProducerBuilder ssl(String ssl) { - doSetProperty("ssl", ssl); - return this; - } - /** * Specifies an upper bound for datestamp-based selective harvesting. * UTC DateTime value. * @@ -1017,10 +915,86 @@ public interface OAIPMHEndpointBuilderFactory { doSetProperty("lazyStartProducer", lazyStartProducer); return this; } + /** + * Returns the response of a single request. Otherwise it will make + * requests until there is no more data to return. + * + * The option is a: <code>boolean</code> type. + * + * Default: false + * Group: producer + */ + default OAIPMHEndpointProducerBuilder onlyFirst(boolean onlyFirst) { + doSetProperty("onlyFirst", onlyFirst); + return this; + } + /** + * Returns the response of a single request. Otherwise it will make + * requests until there is no more data to return. + * + * The option will be converted to a <code>boolean</code> type. + * + * Default: false + * Group: producer + */ + default OAIPMHEndpointProducerBuilder onlyFirst(String onlyFirst) { + doSetProperty("onlyFirst", onlyFirst); + return this; + } + /** + * Ignore SSL certificate warnings. + * + * The option is a: <code>boolean</code> type. + * + * Default: false + * Group: security + */ + default OAIPMHEndpointProducerBuilder ignoreSSLWarnings( + boolean ignoreSSLWarnings) { + doSetProperty("ignoreSSLWarnings", ignoreSSLWarnings); + return this; + } + /** + * Ignore SSL certificate warnings. + * + * The option will be converted to a <code>boolean</code> type. + * + * Default: false + * Group: security + */ + default OAIPMHEndpointProducerBuilder ignoreSSLWarnings( + String ignoreSSLWarnings) { + doSetProperty("ignoreSSLWarnings", ignoreSSLWarnings); + return this; + } + /** + * Causes the defined url to make an https request. + * + * The option is a: <code>boolean</code> type. + * + * Default: false + * Group: security + */ + default OAIPMHEndpointProducerBuilder ssl(boolean ssl) { + doSetProperty("ssl", ssl); + return this; + } + /** + * Causes the defined url to make an https request. + * + * The option will be converted to a <code>boolean</code> type. + * + * Default: false + * Group: security + */ + default OAIPMHEndpointProducerBuilder ssl(String ssl) { + doSetProperty("ssl", ssl); + return this; + } } /** - * Advanced builder for endpoint producers for the OAIPMH component. + * Advanced builder for endpoint producers for the OAI-PMH component. */ public interface AdvancedOAIPMHEndpointProducerBuilder extends @@ -1087,7 +1061,7 @@ public interface OAIPMHEndpointBuilderFactory { } /** - * Builder for endpoint for the OAIPMH component. + * Builder for endpoint for the OAI-PMH component. */ public interface OAIPMHEndpointBuilder extends @@ -1128,33 +1102,8 @@ public interface OAIPMHEndpointBuilderFactory { * * Group: common */ - default OAIPMHEndpointBuilder identitier(String identitier) { - doSetProperty("identitier", identitier); - return this; - } - /** - * Ignore SSL certificate warnings. - * - * The option is a: <code>boolean</code> type. - * - * Default: false - * Group: common - */ - default OAIPMHEndpointBuilder ignoreSSLWarnings( - boolean ignoreSSLWarnings) { - doSetProperty("ignoreSSLWarnings", ignoreSSLWarnings); - return this; - } - /** - * Ignore SSL certificate warnings. - * - * The option will be converted to a <code>boolean</code> type. - * - * Default: false - * Group: common - */ - default OAIPMHEndpointBuilder ignoreSSLWarnings(String ignoreSSLWarnings) { - doSetProperty("ignoreSSLWarnings", ignoreSSLWarnings); + default OAIPMHEndpointBuilder identifier(String identifier) { + doSetProperty("identifier", identifier); return this; } /** @@ -1171,95 +1120,94 @@ public interface OAIPMHEndpointBuilderFactory { return this; } /** - * Returns the response of a single request. Otherwise it will make - * requests until there is no more data to return. + * Specifies membership as a criteria for set-based selective + * harvesting. * - * The option is a: <code>boolean</code> type. + * The option is a: <code>java.lang.String</code> type. * - * Default: False * Group: common */ - default OAIPMHEndpointBuilder onlyFirst(boolean onlyFirst) { - doSetProperty("onlyFirst", onlyFirst); + default OAIPMHEndpointBuilder set(String set) { + doSetProperty("set", set); return this; } /** - * Returns the response of a single request. Otherwise it will make - * requests until there is no more data to return. + * Specifies an upper bound for datestamp-based selective harvesting. + * UTC DateTime value. * - * The option will be converted to a <code>boolean</code> type. + * The option is a: <code>java.lang.String</code> type. * - * Default: False * Group: common */ - default OAIPMHEndpointBuilder onlyFirst(String onlyFirst) { - doSetProperty("onlyFirst", onlyFirst); + default OAIPMHEndpointBuilder until(String until) { + doSetProperty("until", until); return this; } /** - * Specifies membership as a criteria for set-based selective - * harvesting. + * Request name supported by OAI-PMh protocol. * * The option is a: <code>java.lang.String</code> type. * + * Default: ListRecords * Group: common */ - default OAIPMHEndpointBuilder set(String set) { - doSetProperty("set", set); + default OAIPMHEndpointBuilder verb(String verb) { + doSetProperty("verb", verb); return this; } /** - * Causes the defined url to make an https request. + * Ignore SSL certificate warnings. * * The option is a: <code>boolean</code> type. * * Default: false - * Group: common + * Group: security */ - default OAIPMHEndpointBuilder ssl(boolean ssl) { - doSetProperty("ssl", ssl); + default OAIPMHEndpointBuilder ignoreSSLWarnings( + boolean ignoreSSLWarnings) { + doSetProperty("ignoreSSLWarnings", ignoreSSLWarnings); return this; } /** - * Causes the defined url to make an https request. + * Ignore SSL certificate warnings. * * The option will be converted to a <code>boolean</code> type. * * Default: false - * Group: common + * Group: security */ - default OAIPMHEndpointBuilder ssl(String ssl) { - doSetProperty("ssl", ssl); + default OAIPMHEndpointBuilder ignoreSSLWarnings(String ignoreSSLWarnings) { + doSetProperty("ignoreSSLWarnings", ignoreSSLWarnings); return this; } /** - * Specifies an upper bound for datestamp-based selective harvesting. - * UTC DateTime value. + * Causes the defined url to make an https request. * - * The option is a: <code>java.lang.String</code> type. + * The option is a: <code>boolean</code> type. * - * Group: common + * Default: false + * Group: security */ - default OAIPMHEndpointBuilder until(String until) { - doSetProperty("until", until); + default OAIPMHEndpointBuilder ssl(boolean ssl) { + doSetProperty("ssl", ssl); return this; } /** - * Request name supported by OAI-PMh protocol. + * Causes the defined url to make an https request. * - * The option is a: <code>java.lang.String</code> type. + * The option will be converted to a <code>boolean</code> type. * - * Default: ListRecords - * Group: common + * Default: false + * Group: security */ - default OAIPMHEndpointBuilder verb(String verb) { - doSetProperty("verb", verb); + default OAIPMHEndpointBuilder ssl(String ssl) { + doSetProperty("ssl", ssl); return this; } } /** - * Advanced builder for endpoint for the OAIPMH component. + * Advanced builder for endpoint for the OAI-PMH component. */ public interface AdvancedOAIPMHEndpointBuilder extends @@ -1326,8 +1274,8 @@ public interface OAIPMHEndpointBuilderFactory { public interface OAIPMHBuilders { /** - * OAIPMH (camel-oaipmh) - * Represents a OAIPMH endpoint. Component for do OAI-PMH request + * OAI-PMH (camel-oaipmh) + * Harvest metadata using OAI-PMH protocol * * Category: endpoint,webservice,batch * Since: 3.5 @@ -1337,7 +1285,7 @@ public interface OAIPMHEndpointBuilderFactory { * * Path parameter: url (required) * Base URL of the repository to which the request is made through the - * OAI-PMH protocol. + * OAI-PMH protocol * * @param path name */ @@ -1345,8 +1293,8 @@ public interface OAIPMHEndpointBuilderFactory { return OAIPMHEndpointBuilderFactory.endpointBuilder("oaipmh", path); } /** - * OAIPMH (camel-oaipmh) - * Represents a OAIPMH endpoint. Component for do OAI-PMH request + * OAI-PMH (camel-oaipmh) + * Harvest metadata using OAI-PMH protocol * * Category: endpoint,webservice,batch * Since: 3.5 @@ -1356,7 +1304,7 @@ public interface OAIPMHEndpointBuilderFactory { * * Path parameter: url (required) * Base URL of the repository to which the request is made through the - * OAI-PMH protocol. + * OAI-PMH protocol * * @param componentName to use a custom component name for the endpoint * instead of the default name
