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 713efbd15b46c06353c4382de2d74838e3bab8db Author: Andrea Cosentino <[email protected]> AuthorDate: Fri Jan 27 07:57:45 2023 +0100 CAMEL-18970 - Camel-Any23: Remove component Signed-off-by: Andrea Cosentino <[email protected]> --- .../apache/camel/model/dataformat/Any23Type.java | 36 ---------------- .../model/dataformat/Any23DataFormatTest.java | 50 ---------------------- 2 files changed, 86 deletions(-) diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/Any23Type.java b/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/Any23Type.java deleted file mode 100644 index 8244852a358..00000000000 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/dataformat/Any23Type.java +++ /dev/null @@ -1,36 +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 jakarta.xml.bind.annotation.XmlEnum; -import jakarta.xml.bind.annotation.XmlType; - -/** - * Represents the different types of any23 data formats. - */ -@XmlType -@XmlEnum -public enum Any23Type { - - NTRIPLES, - TURTLE, - NQUADS, - RDFXML, - JSONLD, - RDFJSON, - RDF4JMODEL -} diff --git a/core/camel-core/src/test/java/org/apache/camel/model/dataformat/Any23DataFormatTest.java b/core/camel-core/src/test/java/org/apache/camel/model/dataformat/Any23DataFormatTest.java deleted file mode 100644 index fccbdcbaf72..00000000000 --- a/core/camel-core/src/test/java/org/apache/camel/model/dataformat/Any23DataFormatTest.java +++ /dev/null @@ -1,50 +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.io.IOException; -import java.io.StringReader; - -import jakarta.xml.bind.JAXBContext; -import jakarta.xml.bind.JAXBException; -import jakarta.xml.bind.Unmarshaller; - -import org.junit.jupiter.api.Test; - -import static org.assertj.core.api.Assertions.assertThat; -import static org.assertj.core.api.Assertions.entry; - -public class Any23DataFormatTest { - - private final String xml = "<?xml version=\"1.0\"?>" - + "<any23 xmlns=\"http://camel.apache.org/schema/spring\">" - + "<configuration key=\"k1\" value=\"v1\" />" - + "<configuration key=\"k2\" value=\"v2\" />" - + "</any23>"; - - @Test - public void shouldDeserializeConfigurationPropertiesFromXml() throws JAXBException, IOException { - final JAXBContext context = JAXBContext.newInstance(Any23DataFormat.class); - - final Unmarshaller unmarshaller = context.createUnmarshaller(); - - final StringReader reader = new StringReader(xml); - final Any23DataFormat any23DataFormat = (Any23DataFormat) unmarshaller.unmarshal(reader); - - assertThat(any23DataFormat.getConfigurationAsMap()).containsOnly(entry("k1", "v1"), entry("k2", "v2")); - } -}
