-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9831d71
Showing
43 changed files
with
2,504 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# This workflow will build a Java project with Maven | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | ||
|
||
name: Java CI with Maven | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
- name: Build with Maven | ||
run: mvn -B package --file pom.xml | ||
- name: Cache Maven packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/target/ | ||
/.settings | ||
.classpath | ||
.project | ||
/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[![](https://jitpack.io/v/GeOxygene/geoxygene-filter.svg)](https://jitpack.io/#GeOxygene/geoxygene-filter) | ||
|
||
# geoxygene-filter | ||
|
||
_geoxygene-filter_, a module from [Geoxygene](https://github.com/IGNF/geoxygene), hosted as a standalone artifact/repository. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>geoxygene-filter</artifactId> | ||
<packaging>jar</packaging> | ||
<name>geoxygene-filter</name> | ||
<groupId>fr.ign.cogit</groupId> | ||
<version>1.9</version> | ||
|
||
<properties> | ||
<jaxb.version>2.4.0-b180830.0359</jaxb.version> | ||
<jaxb.runtime.version>2.4.0-b180830.0438</jaxb.runtime.version> | ||
</properties> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.8.1</version> | ||
<configuration> | ||
<source>8</source> | ||
<target>8</target> | ||
<encoding>UTF-8</encoding> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>3.2.1</version> | ||
<executions> | ||
<execution> | ||
<id>attach-sources</id> | ||
<phase>deploy</phase> | ||
<goals> | ||
<goal>jar-no-fork</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<version>3.3.0</version> | ||
<executions> | ||
<execution> | ||
<id>attach-javadocs</id> | ||
<phase>deploy</phase> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.apache.logging.log4j</groupId> | ||
<artifactId>log4j-core</artifactId> | ||
<version>2.13.3</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.github.GeOxygene</groupId> | ||
<artifactId>geoxygene-api</artifactId> | ||
<version>1.9</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.github.GeOxygene</groupId> | ||
<artifactId>geoxygene-spatial</artifactId> | ||
<version>1.9</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.13.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.xml.bind</groupId> | ||
<artifactId>jaxb-api</artifactId> | ||
<version>${jaxb.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.glassfish.jaxb</groupId> | ||
<artifactId>jaxb-runtime</artifactId> | ||
<version>${jaxb.runtime.version}</version> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<!-- <dependency> --> | ||
<!-- <groupId>com.sun.xml.bind</groupId> --> | ||
<!-- <artifactId>jaxb-core</artifactId> --> | ||
<!-- <version>${jaxb.version}</version> --> | ||
<!-- </dependency> --> | ||
<!-- <dependency> --> | ||
<!-- <groupId>com.sun.xml.bind</groupId> --> | ||
<!-- <artifactId>jaxb-impl</artifactId> --> | ||
<!-- <version>${jaxb.version}</version> --> | ||
<!-- </dependency> --> | ||
<dependency> | ||
<groupId>javax.activation</groupId> | ||
<artifactId>activation</artifactId> | ||
<version>1.1.1</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<repositories> | ||
<repository> | ||
<id>jitpack.io</id> | ||
<url>https://jitpack.io</url> | ||
</repository> | ||
</repositories> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* This file is part of the GeOxygene project source files. | ||
* | ||
* GeOxygene aims at providing an open framework which implements OGC/ISO | ||
* specifications for the development and deployment of geographic (GIS) | ||
* applications. It is a open source contribution of the COGIT laboratory at the | ||
* Institut Géographique National (the French National Mapping Agency). | ||
* | ||
* See: http://oxygene-project.sourceforge.net | ||
* | ||
* Copyright (C) 2005 Institut Géographique National | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU Lesser General Public License as published by the Free | ||
* Software Foundation; either version 2.1 of the License, or any later version. | ||
* | ||
* This library 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 Lesser General Public License for more | ||
* details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with this library (see file LICENSE if present); if not, write to the | ||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
* 02111-1307 USA | ||
*/ | ||
|
||
package fr.ign.cogit.geoxygene.filter; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
|
||
/** | ||
* @author Julien Perret | ||
* | ||
*/ | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
@XmlRootElement(name = "And") | ||
public class And extends BinaryLogicOpsType { | ||
|
||
@Override | ||
public boolean evaluate(Object object) { | ||
for (Filter filter : this.getOps()) { | ||
if (!filter.evaluate(object)) { | ||
return false; | ||
} | ||
} | ||
return true; | ||
} | ||
|
||
} |
50 changes: 50 additions & 0 deletions
50
src/main/java/fr/ign/cogit/geoxygene/filter/BinaryComparisonOpsType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* This file is part of the GeOxygene project source files. GeOxygene aims at | ||
* providing an open framework which implements OGC/ISO specifications for the | ||
* development and deployment of geographic (GIS) applications. It is a open | ||
* source contribution of the COGIT laboratory at the Institut Géographique | ||
* National (the French National Mapping Agency). See: | ||
* http://oxygene-project.sourceforge.net Copyright (C) 2005 Institut | ||
* Géographique National This library is free software; you can redistribute it | ||
* and/or modify it under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of the License, | ||
* or any later version. This library 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 Lesser | ||
* General Public License for more details. You should have received a copy of | ||
* the GNU Lesser General Public License along with this library (see file | ||
* LICENSE if present); if not, write to the Free Software Foundation, Inc., 59 | ||
* Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
*/ | ||
|
||
package fr.ign.cogit.geoxygene.filter; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlAttribute; | ||
|
||
/** | ||
* @author Julien Perret | ||
*/ | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
public abstract class BinaryComparisonOpsType extends ComparisonOpsType { | ||
|
||
@XmlAttribute(required = false) | ||
private boolean matchCase = true; | ||
|
||
/** | ||
* Affecte la valeur de l'attribut matchCase. | ||
* @param matchCase l'attribut matchCase à affecter | ||
*/ | ||
public void setMatchCase(boolean matchCase) { | ||
this.matchCase = matchCase; | ||
} | ||
|
||
/** | ||
* Renvoie la valeur de l'attribut matchCase. | ||
* @return la valeur de l'attribut matchCase | ||
*/ | ||
public boolean isMatchCase() { | ||
return this.matchCase; | ||
} | ||
} |
86 changes: 86 additions & 0 deletions
86
src/main/java/fr/ign/cogit/geoxygene/filter/BinaryLogicOpsType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
/* | ||
* This file is part of the GeOxygene project source files. GeOxygene aims at | ||
* providing an open framework which implements OGC/ISO specifications for the | ||
* development and deployment of geographic (GIS) applications. It is a open | ||
* source contribution of the COGIT laboratory at the Institut Géographique | ||
* National (the French National Mapping Agency). See: | ||
* http://oxygene-project.sourceforge.net Copyright (C) 2005 Institut | ||
* Géographique National This library is free software; you can redistribute it | ||
* and/or modify it under the terms of the GNU Lesser General Public License as | ||
* published by the Free Software Foundation; either version 2.1 of the License, | ||
* or any later version. This library 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 Lesser | ||
* General Public License for more details. You should have received a copy of | ||
* the GNU Lesser General Public License along with this library (see file | ||
* LICENSE if present); if not, write to the Free Software Foundation, Inc., 59 | ||
* Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
*/ | ||
|
||
package fr.ign.cogit.geoxygene.filter; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
import javax.xml.bind.annotation.XmlAccessType; | ||
import javax.xml.bind.annotation.XmlAccessorType; | ||
import javax.xml.bind.annotation.XmlElement; | ||
import javax.xml.bind.annotation.XmlElements; | ||
import javax.xml.bind.annotation.XmlRootElement; | ||
import javax.xml.bind.annotation.XmlSeeAlso; | ||
|
||
/** | ||
* @author Julien Perret | ||
* | ||
*/ | ||
@XmlAccessorType(XmlAccessType.FIELD) | ||
@XmlSeeAlso({ PropertyIsEqualTo.class, PropertyIsGreaterThan.class, | ||
PropertyIsGreaterThanOrEqualTo.class, PropertyIsLessThan.class, | ||
PropertyIsLessThanOrEqualTo.class, PropertyIsNotEqualTo.class, And.class, | ||
Or.class, Not.class }) | ||
@XmlRootElement | ||
public abstract class BinaryLogicOpsType extends LogicOpsType { | ||
|
||
@XmlElements({ | ||
@XmlElement(name = "PropertyIsEqualTo", type = PropertyIsEqualTo.class), | ||
@XmlElement(name = "PropertyIsGreaterThan", type = PropertyIsGreaterThan.class), | ||
@XmlElement(name = "PropertyIsGreaterThanOrEqualTo", type = PropertyIsGreaterThanOrEqualTo.class), | ||
@XmlElement(name = "PropertyIsLessThan", type = PropertyIsLessThan.class), | ||
@XmlElement(name = "PropertyIsLessThanOrEqualTo", type = PropertyIsLessThanOrEqualTo.class), | ||
@XmlElement(name = "PropertyIsNotEqualTo", type = PropertyIsNotEqualTo.class), | ||
@XmlElement(name = "And", type = And.class), | ||
@XmlElement(name = "Or", type = Or.class), | ||
@XmlElement(name = "Not", type = Not.class) }) | ||
List<Filter> ops = new ArrayList<Filter>(); | ||
|
||
/** | ||
* Renvoie la valeur de l'attribut ops. | ||
* @return la valeur de l'attribut ops | ||
*/ | ||
public List<Filter> getOps() { | ||
return this.ops; | ||
} | ||
|
||
/** | ||
* Affecte la valeur de l'attribut ops. | ||
* @param ops l'attribut ops à affecter | ||
*/ | ||
public void setOps(List<Filter> ops) { | ||
this.ops = ops; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return this.ops.get(0).toString() + this.getClass().getSimpleName() | ||
+ this.ops.get(1).toString(); | ||
} | ||
@Override | ||
public boolean equals(Object o) { | ||
if (! BinaryLogicOpsType.class.isAssignableFrom(o.getClass())) { | ||
return false; | ||
} | ||
BinaryLogicOpsType f = (BinaryLogicOpsType) o; | ||
return f.getClass().equals(this.getClass()) | ||
&& f.getOps().equals(this.getOps()); | ||
} | ||
} |
Oops, something went wrong.