Skip to content

Commit

Permalink
Initial revision (migrate from g2-sdk-java)
Browse files Browse the repository at this point in the history
  • Loading branch information
barrycaceres committed Jul 11, 2024
1 parent 7d7b123 commit 67b04bf
Show file tree
Hide file tree
Showing 95 changed files with 35,774 additions and 0 deletions.
255 changes: 255 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,255 @@
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.senzing</groupId>
<artifactId>sz-sdk</artifactId>
<packaging>jar</packaging>
<version>4.0.0</version>
<name>Senzing G2 Java SDK</name>
<description>The Java SDK for the Senzing G2 Engine. This calls through to the native Senzing SDK via JNI.</description>
<url>http://github.com/senzing-garage/g2-sdk-java</url>
<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<developers>
<developer>
<name>Jae Adams</name>
<email>[email protected]</email>
<organization>Senzing</organization>
<organizationUrl>http://www.senzing.com</organizationUrl>
</developer>
<developer>
<name>Jeff Adair</name>
<email>[email protected]</email>
<organization>Senzing</organization>
<organizationUrl>http://www.senzing.com</organizationUrl>
</developer>
<developer>
<name>Brian Macy</name>
<email>[email protected]</email>
<organization>Senzing</organization>
<organizationUrl>http://www.senzing.com</organizationUrl>
</developer>
<developer>
<name>Barry M. Caceres</name>
<email>[email protected]</email>
<organization>Senzing</organization>
<organizationUrl>http://www.senzing.com</organizationUrl>
</developer>
<developer>
<name>Oskar Thorbjornsson</name>
<email>[email protected]</email>
<organization>Senzing</organization>
<organizationUrl>http://www.senzing.com</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/senzing-garage/g2-sdk-java.git</connection>
<developerConnection>scm:git:ssh://github.com:senzing-garage/g2-sdk-java.git</developerConnection>
<url>http://github.com/senzing-garage/g2-sdk-java/tree/main</url>
</scm>
<dependencies>

<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.1.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.10.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
<version>74.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.googlecode.juniversalchardet</groupId>
<artifactId>juniversalchardet</artifactId>
<version>1.0.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-configuration2</artifactId>
<version>2.10.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.10.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.42.0.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<gpg.skip>true</gpg.skip> <!-- skip GPG unless release profile -->
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
<configuration>
<compilerArgs>
<arg>-Xlint:unchecked</arg>
<arg>-Xlint:deprecation</arg>
</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>process-test-classes</phase>
<configuration>

<target>
<property name="maven.classpath" refid="maven.compile.classpath"></property>
<property environment="env"/>
<condition property="senzing.install.dir"
value="${env.SENZING_DIR}"
else="">
<isset property="env.SENZING_DIR"/>
</condition>
<condition property="senzing.dev.lib.path"
value="${env.SENZING_DEV_LIBRARY_PATH}"
else="">
<isset property="env.SENZING_DEV_LIBRARY_PATH"/>
</condition>
<java classname="com.senzing.test.GenerateTestJVMScript">
<classpath>
<pathelement path="${maven.classpath}"></pathelement>
<pathelement location="${project.build.directory}/test-classes/"/>
<pathelement location="${project.build.directory}/classes/"/>
</classpath>
<sysproperty key="senzing.dev.lib.path"
value="${senzing.dev.lib.path}"/>
<sysproperty key="senzing.install.dir"
value="${senzing.install.dir}"/>
<arg value="${project.build.directory}/java-wrapper/bin/java-wrapper.bat"/>
</java>
</target>

</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
<configuration>
<jvm>${project.build.directory}/java-wrapper/bin/java-wrapper.bat</jvm>
<systemPropertyVariables>
<project.build.directory>${project.build.directory}</project.build.directory>
</systemPropertyVariables>
<properties>
<configurationParameters>
junit.jupiter.execution.parallel.enabled = true
junit.jupiter.execution.parallel.mode.default = same_thread
junit.jupiter.execution.parallel.mode.classes.default = concurrent
junit.jupiter.execution.parallel.config.strategy = dynamic
junit.jupiter.execution.parallel.config.dynamic.factor = 1
</configurationParameters>
</properties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>release</id>
<properties>
<gpg.skip>false</gpg.skip>
</properties>
</profile>
</profiles>
</project>
73 changes: 73 additions & 0 deletions src/main/java/com/senzing/sdk/SzBadInputException.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
package com.senzing.sdk;

/**
* Defines an exceptional condition when an invalid input value is
* provided to a Senzing operation preventing the successful
* completion of that operation.
*/
public class SzBadInputException extends SzException {
/**
* Default constructor.
*/
public SzBadInputException() {
super();
}

/**
* Constructs with a message explaing the reason for the exception.
*
* @param message The message explaining the reason for the exception.
*/
public SzBadInputException(String message) {
super(message);
}

/**
* Constructs with a message explaing the reason for the exception.
*
* @param errorCode The underlying senzing error code.
*
* @param message The message explaining the reason for the exception.
*/
public SzBadInputException(int errorCode, String message) {
super(errorCode, message);
}

/**
* Constructs with the {@link Throwable} that is the underlying cause
* for the exception.
*
* @param cause The message The message explaining the reason for the exception.
*/
public SzBadInputException(Throwable cause) {
super(cause);
}

/**
* Constructs with a message explaing the reason for the exception
* and the {@link Throwable} that is the underlying cause for the
* exception.
*
* @param message The message explaining the reason for the exception.
*
* @param cause The message The message explaining the reason for the exception.
*/
public SzBadInputException(String message, Throwable cause) {
super(message, cause);
}

/**
* Constructs with the Senzing error code, the message explaing
* the reason for the exception and the {@link Throwable} that
* is the underlying cause for the exception.
*
* @param errorCode The underlying senzing error code.
*
* @param message The message explaining the reason for the exception.
*
* @param cause The message The message explaining the reason for the exception.
*/
public SzBadInputException(int errorCode, String message, Throwable cause) {
super(errorCode, message, cause);
}
}
Loading

0 comments on commit 67b04bf

Please sign in to comment.