Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
sinattieng committed Apr 9, 2024
1 parent 7d9ab65 commit 41a863a
Show file tree
Hide file tree
Showing 24 changed files with 2,802 additions and 2 deletions.
41 changes: 41 additions & 0 deletions .classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="target/generated-sources/jaxb"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
7 changes: 7 additions & 0 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Maven Compile
on: push
jobs:
compile:
uses: RegioneER/parer-github-template/.github/workflows/compile.yml@v1
with:
java: '8'
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Maven Release
on:
workflow_dispatch:
inputs:
version:
description: "Version number"
required: true
type: string
jobs:
release:
uses: RegioneER/parer-github-template/.github/workflows/release.yml@v1
with:
version: ${{ inputs.version }}
java: '8'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target/
/nbproject/
661 changes: 661 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions README.md

This file was deleted.

217 changes: 217 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,217 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>it.eng.parer</groupId>
<artifactId>parer-pom</artifactId>
<version>4.1.0</version>
</parent>
<groupId>it.eng.parer</groupId>
<artifactId>preingest-xml</artifactId>
<version>3.0.17-SNAPSHOT</version>
<name>preingest-xml</name>
<description>Progetto PREINGEST-XML</description>

<distributionManagement>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/RegioneER/parer-ping-xml</url>
</repository>
</distributionManagement>

<repositories>
<repository>
<id>github</id>
<url>https://maven.pkg.github.com/RegioneER/parer-framework-parerpom</url>
</repository>
</repositories>


<scm>
<developerConnection>scm:git:https://github.com/RegioneER/parer-ping-xml.git</developerConnection>
<tag>HEAD</tag>
</scm>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sonar.projectVersion>${project.version}</sonar.projectVersion>
<!-- Skiptests by default : esecuzione su CI -->
<skipTests>true</skipTests>
</properties>

<dependencies>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.5.redhat-9</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>datispecdicom</id>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}/src/main/resources/xsd/it/eng/sacerasi/ws/xml/datiSpecDicom/WSMetadatiSpecificiDICOM.xsd</source>
</sources>
<packageName>it.eng.sacerasi.ws.xml.datiSpecDicom</packageName>
</configuration>
</execution>
<!-- dati spec filtri -->
<execution>
<id>datiSpecFiltri</id>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}/src/main/resources/xsd/it/eng/sacerasi/ws/xml/datiSpecFiltri/WSDatiSpecificiDiarioFiltri.xsd</source>
</sources>
<packageName>it.eng.sacerasi.ws.xml.datiSpecFiltri</packageName>
</configuration>
</execution>
<execution>
<id>datispecOrder</id>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}/src/main/resources/xsd/it/eng/sacerasi/ws/xml/datiSpecOrder/WSDatiSpecificiDiarioOrder.xsd</source>
</sources>
<packageName>it.eng.sacerasi.ws.xml.datiSpecOrder</packageName>
</configuration>
</execution>
<execution>
<id>datispecOut</id>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}/src/main/resources/xsd/it/eng/sacerasi/ws/xml/datiSpecOut/WSDatiSpecificiDiarioOut.xsd</source>
</sources>
<packageName>it.eng.sacerasi.ws.xml.datiSpecOut</packageName>
</configuration>
</execution>
<execution>
<id>datispecResult</id>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}/src/main/resources/xsd/it/eng/sacerasi/ws/xml/datiSpecResult/WSDatiSpecificiDiarioResult.xsd</source>
</sources>
<packageName>it.eng.sacerasi.ws.xml.datiSpecResult</packageName>
</configuration>
</execution>
<execution>
<id>invioasync</id>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}/src/main/resources/xsd/it/eng/sacerasi/ws/xml/invioAsync/WSInvioAsync.xsd</source>
</sources>
<packageName>it.eng.sacerasi.ws.xml.invioAsync</packageName>
</configuration>
</execution>
<execution>
<id>invioDaTrasf</id>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}/src/main/resources/xsd/it/eng/sacerasi/ws/xml/invioDaTrasf/WSInvioDaTrasf.xsd</source>
</sources>
<packageName>it.eng.sacerasi.ws.xml.invioDaTrasf</packageName>
</configuration>
</execution>
<execution>
<id>invioSU</id>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}/src/main/resources/xsd/it/eng/sacerasi/su/xml/invioSU/InvioSU.xsd</source>
</sources>
<packageName>it.eng.sacerasi.su.xml.invioSU</packageName>
</configuration>
</execution>
<execution>
<id>invioSisma</id>
<goals>
<goal>xjc</goal>
</goals>
<configuration>
<sources>
<source>${project.basedir}/src/main/resources/xsd/it/eng/sacerasi/sisma/xml/invioSisma/InvioSisma.xsd</source>
</sources>
<packageName>it.eng.sacerasi.sisma.xml.invioSisma</packageName>
</configuration>
</execution>
</executions>

<configuration>
<xjbSources>
<xjbSource>${project.basedir}/src/main/xjb/conf.xjb</xjbSource>
</xjbSources>
<removeOldOutput>false</removeOldOutput>
<clearOutputDir>false</clearOutputDir>
<forceRegenerate>true</forceRegenerate>
</configuration>
</plugin>

<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
<!-- Sovrascrive il padre, necessario per rilasciare su git -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<!-- Esclusione dai javadoc delle classi generate da xmlbeans -->
<excludePackageNames>it.eng.sacerasi.*</excludePackageNames>
</configuration>
</plugin>
</plugins>
</build>

<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<!-- Esclusione dai javadoc delle classi generate da xmlbeans -->
<excludePackageNames>it.eng.sacerasi.*</excludePackageNames>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
44 changes: 44 additions & 0 deletions src/main/java/it/eng/sacerasixml/xsd/FileXSD.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Engineering Ingegneria Informatica S.p.A.
*
* Copyright (C) 2023 Regione Emilia-Romagna
* <p/>
* This program is free software: you can redistribute it and/or modify it under the terms of
* the GNU Affero General Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
* <p/>
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Affero General Public License for more details.
* <p/>
* You should have received a copy of the GNU Affero General Public License along with this program.
* If not, see <https://www.gnu.org/licenses/>.
*/

package it.eng.sacerasixml.xsd;

/**
*
* @author Moretti_Lu, Iacolucci_Ma
*/
public enum FileXSD {
INVIO_ASYNC_XSD("/xsd/it/eng/sacerasi/ws/xml/invioAsync/WSInvioAsync.xsd"),
DATI_SPEC_DICOM_XSD("/xsd/it/eng/sacerasi/ws/xml/datiSpecDicom/WSMetadatiSpecificiDICOM.xsd"),
DATI_SPEC_RESULT_XSD("/xsd/it/eng/sacerasi/ws/xml/datiSpecResult/WSDatiSpecificiDiarioResult.xsd"),
DATI_SPEC_OUT_XSD("/xsd/it/eng/sacerasi/ws/xml/datiSpecOut/WSDatiSpecificiDiarioOut.xsd"),
DATI_SPEC_ORDER_XSD("/xsd/it/eng/sacerasi/ws/xml/datiSpecOrder/WSDatiSpecificiDiarioOrder.xsd"),
DATI_SPEC_FILTRI_XSD("/xsd/it/eng/sacerasi/ws/xml/datiSpecFiltri/WSDatiSpecificiDiarioFiltri.xsd"),
INVIO_DA_TRASF_XSD("/xsd/it/eng/sacerasi/ws/xml/invioDaTrasf/WSInvioDaTrasf.xsd"),
INVIO_SU_XSD("/xsd/it/eng/sacerasi/su/xml/invioSU/InvioSU.xsd"),
INVIO_SISMA_XSD("/xsd/it/eng/sacerasi/sisma/xml/invioSisma/InvioSisma.xsd");

private final String filename;

FileXSD(String filename) {
this.filename = filename;
}

String getFilename() {
return filename;
}
}
47 changes: 47 additions & 0 deletions src/main/java/it/eng/sacerasixml/xsd/FileXSDUtil.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Engineering Ingegneria Informatica S.p.A.
*
* Copyright (C) 2023 Regione Emilia-Romagna
* <p/>
* This program is free software: you can redistribute it and/or modify it under the terms of
* the GNU Affero General Public License as published by the Free Software Foundation,
* either version 3 of the License, or (at your option) any later version.
* <p/>
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Affero General Public License for more details.
* <p/>
* You should have received a copy of the GNU Affero General Public License along with this program.
* If not, see <https://www.gnu.org/licenses/>.
*/

package it.eng.sacerasixml.xsd;

import java.net.URL;

/**
* Classe che restituisce i nomi dei file XSD
*
* In questo modo gli utilizzatori della libreria non devono conoscere i path dei file
*
* @author Moretti_Lum, Iacolucci_Ma
*/
public class FileXSDUtil {

private URL getResource(String fileName) {
URL result = null;
ClassLoader classLoader = getClass().getClassLoader();
result = classLoader.getResource(fileName);
return result;
}

public static URL getURLFileXSD(FileXSD file) {
URL result = null;

if (file != null) {
result = new FileXSDUtil().getResource(file.getFilename());
}

return result;
}
}
Loading

0 comments on commit 41a863a

Please sign in to comment.