Skip to content

Commit

Permalink
quarkus service integratio work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
sboeckelmann committed Jun 9, 2024
1 parent 936622b commit b8ea3ce
Show file tree
Hide file tree
Showing 94 changed files with 3,375 additions and 249 deletions.
228 changes: 228 additions & 0 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
<?xml version="1.0"?>
<!--
Copyright 2022-2024 benelog GmbH & Co. KG
Licensed 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.
-->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.openepcis</groupId>
<artifactId>openepcis-document-converter-parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>openepcis-document-converter</artifactId>
<name>openepcis-document-converter</name>
<description>Project to convert EPCIS events in XML format to JSON/JSON-LD and vice-versa. Also, supports the conversion of EPCIS 1.2 XML document to 2.0 XML document and vice
versa.</description>
<url>https://github.com/openepcis/openepcis-document-converter</url>

<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>

<developers>
<developer>
<name>Aravinda Baliga B</name>
<email>[email protected]</email>
<organization>benelog GmbH &amp; Co. KG</organization>
<organizationUrl>https://www.benelog.com</organizationUrl>
</developer>
<developer>
<name>Sven Boeckelmann</name>
<email>[email protected]</email>
<organization>benelog GmbH &amp; Co. KG</organization>
<organizationUrl>https://www.benelog.com</organizationUrl>
</developer>
</developers>

<scm>
<connection>scm:git:git://github.com/openepcis/openepcis-document-converter.git</connection>
<developerConnection>scm:git:ssh://github.com:openepcis/openepcis-document-converter.git</developerConnection>
<url>https://github.com/openepcis/openepcis-document-converter/tree/main</url>
</scm>

<dependencies>
<dependency>
<groupId>io.openepcis</groupId>
<artifactId>openepcis-model-rest</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>io.openepcis</groupId>
<artifactId>openepcis-model-epcis</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>io.openepcis</groupId>
<artifactId>openepcis-document-validation-service</artifactId>
<version>${project.parent.version}</version>
</dependency>
<dependency>
<groupId>io.openepcis</groupId>
<artifactId>openepcis-repository-common</artifactId>
</dependency>
<dependency>
<groupId>io.smallrye.reactive</groupId>
<artifactId>mutiny</artifactId>
</dependency>
<dependency>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>

<!-- JAXB Annotations Dependencies START -->
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.moxy</artifactId>
</dependency>
<!-- JAXB Annotations Dependencies END -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>

<!-- Add constants as dependencies -->
<dependency>
<groupId>io.openepcis</groupId>
<artifactId>openepcis-epcis-constants</artifactId>
<version>${project.parent.version}</version>
</dependency>

<!-- Add constants as dependencies -->
<dependency>
<groupId>io.openepcis</groupId>
<artifactId>openepcis-test-resources</artifactId>
<version>${project.parent.version}</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>

</dependencies>


<build>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
</plugin>
</plugins>
</build>


<profiles>
<profile>
<id>coverage</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>report</id>
<goals>
<goal>report</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<repositories>
<!-- sonatype releases -->
<repository>
<id>sonatype-releases</id>
<url>https://s01.oss.sonatype.org/content/repositories/releases</url>
</repository>
<!-- sonatype snapshots -->
<repository>
<id>sonatype-staging</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.openepcis.convert;
package io.openepcis.converter;

import java.io.BufferedInputStream;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.openepcis.convert;
package io.openepcis.converter;

import io.openepcis.constants.EPCISFormat;
import io.openepcis.constants.EPCISVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.openepcis.convert;
package io.openepcis.converter;

import io.openepcis.convert.collector.EPCISEventCollector;
import io.openepcis.convert.collector.EventHandler;
import io.openepcis.converter.collector.EPCISEventCollector;
import io.openepcis.converter.collector.EventHandler;
import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.JAXBException;
import java.io.IOException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,23 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.openepcis.convert;
package io.openepcis.converter;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.openepcis.constants.EPCIS;
import io.openepcis.constants.EPCISFormat;
import io.openepcis.constants.EPCISVersion;
import io.openepcis.convert.collector.EventHandler;
import io.openepcis.convert.collector.JsonEPCISEventCollector;
import io.openepcis.convert.collector.XmlEPCISEventCollector;
import io.openepcis.convert.exception.FormatConverterException;
import io.openepcis.convert.json.JSONEventValueTransformer;
import io.openepcis.convert.json.JsonToXmlConverter;
import io.openepcis.convert.util.ChannelUtil;
import io.openepcis.convert.xml.ProblemResponseBodyMarshaller;
import io.openepcis.convert.xml.XMLEventValueTransformer;
import io.openepcis.convert.xml.XmlToJsonConverter;
import io.openepcis.convert.xml.XmlVersionTransformer;
import io.openepcis.converter.collector.EventHandler;
import io.openepcis.converter.collector.JsonEPCISEventCollector;
import io.openepcis.converter.collector.XmlEPCISEventCollector;
import io.openepcis.converter.exception.FormatConverterException;
import io.openepcis.converter.json.JSONEventValueTransformer;
import io.openepcis.converter.json.JsonToXmlConverter;
import io.openepcis.converter.util.ChannelUtil;
import io.openepcis.converter.xml.ProblemResponseBodyMarshaller;
import io.openepcis.converter.xml.XMLEventValueTransformer;
import io.openepcis.converter.xml.XmlToJsonConverter;
import io.openepcis.converter.xml.XmlVersionTransformer;
import io.openepcis.model.rest.ProblemResponseBody;
import jakarta.xml.bind.JAXBContext;
import jakarta.xml.bind.JAXBException;
Expand All @@ -55,6 +54,19 @@ public class VersionTransformer {
.setSerializationInclusion(JsonInclude.Include.NON_EMPTY);

private final ExecutorService executorService;

public XmlVersionTransformer getXmlVersionTransformer() {
return xmlVersionTransformer;
}

public XmlToJsonConverter getXmlToJsonConverter() {
return xmlToJsonConverter;
}

public JsonToXmlConverter getJsonToXmlConverter() {
return jsonToXmlConverter;
}

private final XmlVersionTransformer xmlVersionTransformer;
private final XmlToJsonConverter xmlToJsonConverter;
private final JsonToXmlConverter jsonToXmlConverter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.openepcis.convert;
package io.openepcis.converter;

import java.util.Collections;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.openepcis.convert.collector;
package io.openepcis.converter.collector;

import java.util.Map;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.openepcis.convert.collector;
package io.openepcis.converter.collector;

import io.openepcis.converter.exception.FormatConverterException;
import io.openepcis.converter.validator.EPCISEventValidator;

import io.openepcis.convert.exception.FormatConverterException;
import io.openepcis.convert.validator.EPCISEventValidator;
import java.util.Map;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.openepcis.convert.collector;
package io.openepcis.converter.collector;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,19 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.openepcis.convert.collector;
package io.openepcis.converter.collector;

import static io.openepcis.constants.EPCIS.*;

import com.fasterxml.jackson.core.JsonFactory;
import com.fasterxml.jackson.core.JsonGenerator;
import io.openepcis.constants.EPCISVersion;
import io.openepcis.convert.exception.FormatConverterException;
import io.openepcis.converter.exception.FormatConverterException;
import io.openepcis.model.epcis.util.DefaultJsonSchemaNamespaceURIResolver;
import java.io.IOException;
import java.io.OutputStream;
import java.util.Map;
import lombok.Getter;
import lombok.Setter;

import org.apache.commons.lang3.StringUtils;

/**
Expand Down
Loading

0 comments on commit b8ea3ce

Please sign in to comment.