Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apache Hop 2.x api updates (2.5.0-SNAPSHOT) #11

Merged
merged 3 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Apache Hop GIS Plugins

This project allows you to manage GIS data in Apache Hop, [Hop Orchestration Platform](https://hop.apache.org/). It is a counterpart of [Pentaho Data Integrator GIS Plugins](https://github.com/atolcd/pentaho-gis-plugins).

Tested with Apache Hop `0.99`, `1.1.0` and `2.0.0-SNAPSHOT`.
Tested with Apache Hop `2.7.0-SNAPSHOT`.


Building the plugins
Expand All @@ -15,7 +15,7 @@ git clone git://github.com/atolcd/hop-gis-plugins.git
cd hop-gis-plugins
```

Run the following commands from the base project directory (with `java 8+` and `maven` installed):
Run the following commands from the base project directory (with `java 11` and `maven` installed):
```sh
mvn clean package
```
Expand Down Expand Up @@ -46,7 +46,7 @@ Extract the content of `gis-plugin-assemblies-X.X.X.zip` in ${HOP_HOME}/plugins.
Examples of extraction from the root directory of the project :

```sh
GIS_PLUGINS_VERSION="1.0.0"
GIS_PLUGINS_VERSION="1.1.0"

# Use compiled version...
GIS_PLUGINS_ASSEMBLY="assemblies/target/gis-plugin-assemblies-${GIS_PLUGINS_VERSION}.zip"
Expand All @@ -66,7 +66,7 @@ To upgrade the plugins, delete files you added before and start a fresh installa

If you plan to connect to an Oracle database, add needed jars in lib folder of PDI :

- ${HOP_HOME}/lib/ojdbc6.jar
- ${HOP_HOME}/lib/ojdbc11.jar
- ${HOP_HOME}/lib/orai18n.jar

You can get them [here](http://www.oracle.com/technetwork/apps-tech/jdbc-112010-090769.html)
Expand Down
4 changes: 2 additions & 2 deletions assemblies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

<groupId>com.atolcd.hop</groupId>
<artifactId>gis-plugin-assemblies</artifactId>
<version>1.0.0</version>
<version>1.1.0</version>
<packaging>pom</packaging>

<name>HOP GIS Plugins assemblies</name>

<parent>
<groupId>com.atolcd.hop</groupId>
<artifactId>hop-gis-plugins-holder</artifactId>
<version>1.0.0</version>
<version>1.1.0</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion hop-gis-plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>hop-gis-plugins-holder</artifactId>
<groupId>com.atolcd.hop</groupId>
<version>1.0.0</version>
<version>1.1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.apache.hop.pipeline.Pipeline;
import org.apache.hop.pipeline.PipelineMeta;
import org.apache.hop.pipeline.transform.BaseTransform;
import org.apache.hop.pipeline.transform.ITransform;
import org.apache.hop.pipeline.transform.TransformMeta;
import org.cts.CRSFactory;
import org.cts.crs.CRSException;
Expand All @@ -49,8 +48,7 @@
import org.locationtech.jts.geom.Geometry;

public class GisCoordinateTransformation
extends BaseTransform<GisCoordinateTransformationMeta, GisCoordinateTransformationData>
implements ITransform<GisCoordinateTransformationMeta, GisCoordinateTransformationData> {
extends BaseTransform<GisCoordinateTransformationMeta, GisCoordinateTransformationData> {

private static final Class<?> PKG = GisCoordinateTransformation.class;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@
import org.apache.hop.core.variables.IVariables;
import org.apache.hop.metadata.api.HopMetadataProperty;
import org.apache.hop.metadata.api.IHopMetadataProvider;
import org.apache.hop.pipeline.Pipeline;
import org.apache.hop.pipeline.PipelineMeta;
import org.apache.hop.pipeline.transform.BaseTransformMeta;
import org.apache.hop.pipeline.transform.ITransform;
import org.apache.hop.pipeline.transform.ITransformDialog;
import org.apache.hop.pipeline.transform.ITransformMeta;
import org.apache.hop.pipeline.transform.TransformMeta;
Expand All @@ -49,8 +47,8 @@
categoryDescription = "i18n::GisCoordinateTransformation.Shell.CategoryDescription",
documentationUrl = "",
keywords = "i18n::GisCoordinateTransformation.keywords")
public class GisCoordinateTransformationMeta extends BaseTransformMeta
implements ITransformMeta<GisCoordinateTransformation, GisCoordinateTransformationData> {
public class GisCoordinateTransformationMeta
extends BaseTransformMeta<GisCoordinateTransformation, GisCoordinateTransformationData> {

private static final Class<?> PKG = GisCoordinateTransformationMeta.class; // Needed by Translator

Expand Down Expand Up @@ -201,19 +199,4 @@ public ITransformDialog getDialog(
Shell shell, IVariables variables, ITransformMeta meta, PipelineMeta transMeta, String name) {
return new GisCoordinateTransformationDialog(shell, variables, meta, transMeta, name);
}

@Override
public ITransform createTransform(
TransformMeta transformMeta,
GisCoordinateTransformationData data,
int cnr,
PipelineMeta pipelineMeta,
Pipeline pipeline) {
return new GisCoordinateTransformation(transformMeta, this, data, cnr, pipelineMeta, pipeline);
}

@Override
public GisCoordinateTransformationData getTransformData() {
return new GisCoordinateTransformationData();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@
import org.apache.hop.pipeline.Pipeline;
import org.apache.hop.pipeline.PipelineMeta;
import org.apache.hop.pipeline.transform.BaseTransform;
import org.apache.hop.pipeline.transform.ITransform;
import org.apache.hop.pipeline.transform.TransformMeta;

public class GisFileInput extends BaseTransform<GisFileInputMeta, GisFileInputData>
implements ITransform<GisFileInputMeta, GisFileInputData> {
public class GisFileInput extends BaseTransform<GisFileInputMeta, GisFileInputData> {
private static Class<?> PKG = GisFileInput.class;

private AbstractFileReader fileReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@
import org.apache.hop.core.xml.XmlHandler;
import org.apache.hop.metadata.api.HopMetadataProperty;
import org.apache.hop.metadata.api.IHopMetadataProvider;
import org.apache.hop.pipeline.Pipeline;
import org.apache.hop.pipeline.PipelineMeta;
import org.apache.hop.pipeline.transform.BaseTransformMeta;
import org.apache.hop.pipeline.transform.ITransform;
import org.apache.hop.pipeline.transform.ITransformDialog;
import org.apache.hop.pipeline.transform.ITransformMeta;
import org.apache.hop.pipeline.transform.TransformMeta;
Expand All @@ -67,8 +65,7 @@
categoryDescription = "i18n::GisFileInput.Shell.CategoryDescription",
documentationUrl = "",
keywords = "i18n::GisFileInput.keywords")
public class GisFileInputMeta extends BaseTransformMeta
implements ITransformMeta<GisFileInput, GisFileInputData> {
public class GisFileInputMeta extends BaseTransformMeta<GisFileInput, GisFileInputData> {

private static Class<?> PKG = GisFileInputMeta.class;

Expand Down Expand Up @@ -463,19 +460,4 @@ public ITransformDialog getDialog(
Shell shell, IVariables variables, ITransformMeta meta, PipelineMeta transMeta, String name) {
return new GisFileInputDialog(shell, variables, meta, transMeta, name);
}

@Override
public ITransform createTransform(
TransformMeta stepMeta,
GisFileInputData data,
int cnr,
PipelineMeta pipelineMeta,
Pipeline pipeline) {
return new GisFileInput(stepMeta, this, data, cnr, pipelineMeta, pipeline);
}

@Override
public GisFileInputData getTransformData() {
return new GisFileInputData();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,9 @@
import org.apache.hop.pipeline.Pipeline;
import org.apache.hop.pipeline.PipelineMeta;
import org.apache.hop.pipeline.transform.BaseTransform;
import org.apache.hop.pipeline.transform.ITransform;
import org.apache.hop.pipeline.transform.TransformMeta;

public class GisFileOutput extends BaseTransform<GisFileOutputMeta, GisFileOutputData>
implements ITransform<GisFileOutputMeta, GisFileOutputData> {
public class GisFileOutput extends BaseTransform<GisFileOutputMeta, GisFileOutputData> {

private List<Feature> gisFeatures = new ArrayList<Feature>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@
import org.apache.hop.core.variables.IVariables;
import org.apache.hop.core.xml.XmlHandler;
import org.apache.hop.metadata.api.IHopMetadataProvider;
import org.apache.hop.pipeline.Pipeline;
import org.apache.hop.pipeline.PipelineMeta;
import org.apache.hop.pipeline.transform.BaseTransformMeta;
import org.apache.hop.pipeline.transform.ITransform;
import org.apache.hop.pipeline.transform.ITransformDialog;
import org.apache.hop.pipeline.transform.ITransformMeta;
import org.apache.hop.pipeline.transform.TransformMeta;
Expand All @@ -55,8 +53,7 @@
categoryDescription = "i18n::GisFileOutput.Shell.CategoryDescription",
documentationUrl = "",
keywords = "i18n::GisFileOutput.keywords")
public class GisFileOutputMeta extends BaseTransformMeta
implements ITransformMeta<GisFileOutput, GisFileOutputData> {
public class GisFileOutputMeta extends BaseTransformMeta<GisFileOutput, GisFileOutputData> {

private HashMap<String, GisOutputFormatDef> outputFormatDefs;
private String outputFormat;
Expand Down Expand Up @@ -525,21 +522,4 @@ public ITransformDialog getDialog(
String name) {
return new GisFileOutputDialog(shell, variables, meta, PipelineMeta, name);
}

@Override
public ITransform createTransform(
TransformMeta transformMeta,
GisFileOutputData data,
int cnr,
PipelineMeta pipelineMeta,
Pipeline pipeline) {
// TODO Auto-generated method stub
return new GisFileOutput(transformMeta, this, data, cnr, pipelineMeta, pipeline);
}

@Override
public GisFileOutputData getTransformData() {
// TODO Auto-generated method stub
return new GisFileOutputData();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,10 @@
import org.apache.hop.pipeline.Pipeline;
import org.apache.hop.pipeline.PipelineMeta;
import org.apache.hop.pipeline.transform.BaseTransform;
import org.apache.hop.pipeline.transform.ITransform;
import org.apache.hop.pipeline.transform.TransformMeta;
import org.locationtech.jts.geom.Geometry;

public class GisGeometryInfo extends BaseTransform<GisGeometryInfoMeta, GisGeometryInfoData>
implements ITransform<GisGeometryInfoMeta, GisGeometryInfoData> {
public class GisGeometryInfo extends BaseTransform<GisGeometryInfoMeta, GisGeometryInfoData> {

private Integer geometryFieldIndex;
private LinkedHashMap<String, Integer> outputMap = new LinkedHashMap<String, Integer>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@
import org.apache.hop.core.variables.IVariables;
import org.apache.hop.core.xml.XmlHandler;
import org.apache.hop.metadata.api.IHopMetadataProvider;
import org.apache.hop.pipeline.Pipeline;
import org.apache.hop.pipeline.PipelineMeta;
import org.apache.hop.pipeline.transform.BaseTransformMeta;
import org.apache.hop.pipeline.transform.ITransform;
import org.apache.hop.pipeline.transform.ITransformDialog;
import org.apache.hop.pipeline.transform.ITransformMeta;
import org.apache.hop.pipeline.transform.TransformMeta;
Expand All @@ -57,8 +55,7 @@
categoryDescription = "i18n::GisGeometryInfo.Shell.CategoryDescription",
documentationUrl = "",
keywords = "i18n::GisGeometryInfo.keywords")
public class GisGeometryInfoMeta extends BaseTransformMeta
implements ITransformMeta<GisGeometryInfo, GisGeometryInfoData> {
public class GisGeometryInfoMeta extends BaseTransformMeta<GisGeometryInfo, GisGeometryInfoData> {

private HashMap<String, Integer> infosTypes;
private String geometryFieldName;
Expand Down Expand Up @@ -221,19 +218,4 @@ public ITransformDialog getDialog(
Shell shell, IVariables variables, ITransformMeta meta, PipelineMeta transMeta, String name) {
return new GisFileInputDialog(shell, variables, meta, transMeta, name);
}

@Override
public ITransform createTransform(
TransformMeta transformMeta,
GisGeometryInfoData data,
int cnr,
PipelineMeta pipelineMeta,
Pipeline pipeline) {
return new GisGeometryInfo(transformMeta, this, data, cnr, pipelineMeta, pipeline);
}

@Override
public GisGeometryInfoData getTransformData() {
return new GisGeometryInfoData();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
import org.apache.hop.pipeline.Pipeline;
import org.apache.hop.pipeline.PipelineMeta;
import org.apache.hop.pipeline.transform.BaseTransform;
import org.apache.hop.pipeline.transform.ITransform;
import org.apache.hop.pipeline.transform.TransformMeta;
import org.locationtech.jts.algorithm.MinimumBoundingCircle;
import org.locationtech.jts.densify.Densifier;
Expand Down Expand Up @@ -68,8 +67,7 @@
import org.locationtech.jts.simplify.VWSimplifier;
import org.opensphere.geometry.algorithm.ConcaveHull;

public class GisGeoprocessing extends BaseTransform<GisGeoprocessingMeta, GisGeoprocessingData>
implements ITransform<GisGeoprocessingMeta, GisGeoprocessingData> {
public class GisGeoprocessing extends BaseTransform<GisGeoprocessingMeta, GisGeoprocessingData> {

private static GeometryFactory geometryFactory = new GeometryFactory();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@
import org.apache.hop.core.variables.IVariables;
import org.apache.hop.core.xml.XmlHandler;
import org.apache.hop.metadata.api.IHopMetadataProvider;
import org.apache.hop.pipeline.Pipeline;
import org.apache.hop.pipeline.PipelineMeta;
import org.apache.hop.pipeline.transform.BaseTransformMeta;
import org.apache.hop.pipeline.transform.ITransform;
import org.apache.hop.pipeline.transform.ITransformDialog;
import org.apache.hop.pipeline.transform.ITransformMeta;
import org.apache.hop.pipeline.transform.TransformMeta;
Expand All @@ -52,8 +50,8 @@
categoryDescription = "i18n::GisGeoprocessing.Shell.CategoryDescription",
documentationUrl = "",
keywords = "i18n::GisGeoprocessing.keywords")
public class GisGeoprocessingMeta extends BaseTransformMeta
implements ITransformMeta<GisGeoprocessing, GisGeoprocessingData> {
public class GisGeoprocessingMeta
extends BaseTransformMeta<GisGeoprocessing, GisGeoprocessingData> {

private String operator;

Expand Down Expand Up @@ -390,21 +388,4 @@ public ITransformDialog getDialog(
Shell shell, IVariables variables, ITransformMeta meta, PipelineMeta transMeta, String name) {
return new GisCoordinateTransformationDialog(shell, variables, meta, transMeta, name);
}

@Override
public ITransform createTransform(
TransformMeta stepMeta,
GisGeoprocessingData data,
int cnr,
PipelineMeta pipelineMeta,
Pipeline pipeline) {
// TODO Auto-generated method stub
return new GisGeoprocessing(stepMeta, this, data, cnr, pipelineMeta, pipeline);
}

@Override
public GisGeoprocessingData getTransformData() {
// TODO Auto-generated method stub
return new GisGeoprocessingData();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
import org.apache.hop.pipeline.Pipeline;
import org.apache.hop.pipeline.PipelineMeta;
import org.apache.hop.pipeline.transform.BaseTransform;
import org.apache.hop.pipeline.transform.ITransform;
import org.apache.hop.pipeline.transform.TransformMeta;
import org.locationtech.jts.dissolve.LineDissolver;
import org.locationtech.jts.geom.Geometry;
Expand All @@ -65,8 +64,7 @@
* @author Matt
* @since 2-jun-2003
*/
public class GisGroupBy extends BaseTransform<GisGroupByMeta, GisGroupByData>
implements ITransform<GisGroupByMeta, GisGroupByData> {
public class GisGroupBy extends BaseTransform<GisGroupByMeta, GisGroupByData> {
private static Class<?> PKG = GisGroupByMeta.class; // for i18n purposes,
// needed by
// Translator2!!
Expand Down
Loading
Loading