This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 7f872eb6d313750f2a92fb0aa440c0286d6bae39
Author: Andrea Cosentino <[email protected]>
AuthorDate: Fri Jan 27 07:53:45 2023 +0100

    CAMEL-18970 - Camel-Any23: Remove component
    
    Signed-off-by: Andrea Cosentino <[email protected]>
---
 .../camel/model/dataformat/Any23DataFormat.java    | 232 ---------------------
 1 file changed, 232 deletions(-)

diff --git 
a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/Any23DataFormat.java
 
b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/Any23DataFormat.java
deleted file mode 100644
index 0d820df9cfc..00000000000
--- 
a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/Any23DataFormat.java
+++ /dev/null
@@ -1,232 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.model.dataformat;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import jakarta.xml.bind.annotation.XmlAccessType;
-import jakarta.xml.bind.annotation.XmlAccessorType;
-import jakarta.xml.bind.annotation.XmlAttribute;
-import jakarta.xml.bind.annotation.XmlElement;
-import jakarta.xml.bind.annotation.XmlRootElement;
-import jakarta.xml.bind.annotation.XmlTransient;
-
-import org.apache.camel.builder.DataFormatBuilder;
-import org.apache.camel.model.DataFormatDefinition;
-import org.apache.camel.model.PropertyDefinition;
-import org.apache.camel.spi.Metadata;
-
-/**
- * Extract RDF data from HTML documents.
- */
-@Metadata(firstVersion = "3.0.0", label = "dataformat,transformation", title = 
"Any23")
-@XmlRootElement(name = "any23")
-@XmlAccessorType(XmlAccessType.FIELD)
-public class Any23DataFormat extends DataFormatDefinition {
-
-    @XmlAttribute
-    @Metadata(defaultValue = "RDF4JMODEL", enums = 
"NTRIPLES,TURTLE,NQUADS,RDFXML,JSONLD,RDFJSON,RDF4JMODEL",
-              javaType = "org.apache.camel.dataformat.any23.Any23OutputFormat")
-    private String outputFormat;
-    @XmlAttribute
-    private String baseUri;
-    @XmlElement(name = "configuration")
-    private List<PropertyDefinition> configuration;
-    @XmlTransient
-    private Map<String, String> configurations;
-    @XmlElement
-    private List<String> extractors;
-
-    public Any23DataFormat() {
-        super("any23");
-    }
-
-    public Any23DataFormat(String baseuri) {
-        this();
-        this.baseUri = baseuri;
-    }
-
-    public Any23DataFormat(String baseuri, Any23Type outputFormat) {
-        this(baseuri);
-        this.outputFormat = outputFormat.name();
-    }
-
-    public Any23DataFormat(String baseuri, Any23Type outputFormat, Map<String, 
String> configurations) {
-        this(baseuri, outputFormat);
-        this.outputFormat = outputFormat.name();
-        this.configurations = configurations;
-    }
-
-    public Any23DataFormat(String baseuri, Any23Type outputFormat, Map<String, 
String> configurations,
-                           List<String> extractors) {
-        this(baseuri, outputFormat, configurations);
-        this.outputFormat = outputFormat.name();
-        this.configurations = configurations;
-        this.extractors = extractors;
-    }
-
-    private Any23DataFormat(Builder builder) {
-        this(builder.baseUri);
-        this.outputFormat = builder.outputFormat;
-        this.configuration = builder.configuration;
-        this.configurations = builder.configurations;
-        this.extractors = builder.extractors;
-    }
-
-    public String getOutputFormat() {
-        return outputFormat;
-    }
-
-    /**
-     * What RDF syntax to unmarshal as, can be: NTRIPLES, TURTLE, NQUADS, 
RDFXML, JSONLD, RDFJSON, RDF4JMODEL. It is by
-     * default: RDF4JMODEL.
-     */
-    public void setOutputFormat(String outputFormat) {
-        this.outputFormat = outputFormat;
-    }
-
-    public Map<String, String> getConfigurationAsMap() {
-        if (configurations == null && configuration != null) {
-            configurations = new HashMap<>();
-        }
-        if (configuration != null) {
-            for (PropertyDefinition def : configuration) {
-                configurations.put(def.getKey(), def.getValue());
-            }
-        }
-        return configurations;
-    }
-
-    public List<PropertyDefinition> getConfiguration() {
-        return configuration;
-    }
-
-    /**
-     * Configurations for Apache Any23 as key-value pairs in order to 
customize the extraction process. The list of
-     * supported parameters can be found <a href=
-     * 
"https://github.com/apache/any23/blob/master/api/src/main/resources/default-configuration.properties";>here</a>.
-     * If not provided, a default configuration is used.
-     */
-    public void setConfiguration(List<PropertyDefinition> configuration) {
-        this.configuration = configuration;
-    }
-
-    /**
-     * Configurations for Apache Any23 as key-value pairs in order to 
customize the extraction process. The list of
-     * supported parameters can be found <a href=
-     * 
"https://github.com/apache/any23/blob/master/api/src/main/resources/default-configuration.properties";>here</a>.
-     * If not provided, a default configuration is used.
-     */
-    public void setConfiguration(Map<String, String> configuration) {
-        this.configuration = new ArrayList<>();
-        configuration.forEach((k, v) -> this.configuration.add(new 
PropertyDefinition(k, v)));
-    }
-
-    public List<String> getExtractors() {
-        return extractors;
-    }
-
-    /**
-     * List of Any23 extractors to be used in the unmarshal operation. A list 
of the available extractors can be found
-     * here <a href="https://any23.apache.org/getting-started.html";>here</a>. 
If not provided, all the available
-     * extractors are used.
-     */
-    public void setExtractors(List<String> extractors) {
-        this.extractors = extractors;
-    }
-
-    public String getBaseUri() {
-        return baseUri;
-    }
-
-    /**
-     * The URI to use as base for building RDF entities if only relative paths 
are provided.
-     */
-    public void setBaseUri(String baseUri) {
-        this.baseUri = baseUri;
-    }
-
-    /**
-     * {@code Builder} is a specific builder for {@link Any23DataFormat}.
-     */
-    @XmlTransient
-    public static class Builder implements DataFormatBuilder<Any23DataFormat> {
-
-        private String outputFormat;
-        private String baseUri;
-        private List<PropertyDefinition> configuration;
-        private Map<String, String> configurations;
-        private List<String> extractors;
-
-        /**
-         * What RDF syntax to unmarshal as, can be: NTRIPLES, TURTLE, NQUADS, 
RDFXML, JSONLD, RDFJSON, RDF4JMODEL. It is
-         * by default: RDF4JMODEL.
-         */
-        public Builder outputFormat(String outputFormat) {
-            this.outputFormat = outputFormat;
-            return this;
-        }
-
-        /**
-         * Configurations for Apache Any23 as key-value pairs in order to 
customize the extraction process. The list of
-         * supported parameters can be found <a href=
-         * 
"https://github.com/apache/any23/blob/master/api/src/main/resources/default-configuration.properties";>here</a>.
-         * If not provided, a default configuration is used.
-         */
-        public Builder configuration(List<PropertyDefinition> configuration) {
-            this.configuration = configuration;
-            return this;
-        }
-
-        /**
-         * Configurations for Apache Any23 as key-value pairs in order to 
customize the extraction process. The list of
-         * supported parameters can be found <a href=
-         * 
"https://github.com/apache/any23/blob/master/api/src/main/resources/default-configuration.properties";>here</a>.
-         * If not provided, a default configuration is used.
-         */
-        public Builder configuration(Map<String, String> configurations) {
-            this.configurations = configurations;
-            return this;
-        }
-
-        /**
-         * The URI to use as base for building RDF entities if only relative 
paths are provided.
-         */
-        public Builder baseUri(String baseUri) {
-            this.baseUri = baseUri;
-            return this;
-        }
-
-        /**
-         * List of Any23 extractors to be used in the unmarshal operation. A 
list of the available extractors can be
-         * found here <a 
href="https://any23.apache.org/getting-started.html";>here</a>. If not provided, 
all the
-         * available extractors are used.
-         */
-        public Builder extractors(List<String> extractors) {
-            this.extractors = extractors;
-            return this;
-        }
-
-        @Override
-        public Any23DataFormat end() {
-            return new Any23DataFormat(this);
-        }
-    }
-}

Reply via email to