diff --git a/distribution/pom.xml b/distribution/pom.xml new file mode 100644 index 0000000..b590c88 --- /dev/null +++ b/distribution/pom.xml @@ -0,0 +1,190 @@ + + + + + + + 4.0.0 + + + com.orientechnologies + orientdb-parent + 2.2.24-SNAPSHOT + ../ + + + orientdb-community-spatial + + OrientDB Community Distribution with Spatial support + + + ${project.version} + ${implementation.build}; ${maven.build.timestamp} + UTF-8 + + + + + + com.orientechnologies + orientdb-tools + ${project.parent.version} + + + com.orientechnologies + orientdb-lucene + ${project.parent.version} + + + com.orientechnologies + orientdb-spatial + ${project.parent.version} + dist + + + com.orientechnologies + orientdb-community + ${project.parent.version} + test-jar + test + + + com.orientechnologies + orientdb-test-commons + ${project.parent.version} + test + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + 2.8 + + + unzip-community + generate-sources + + unpack + + + ${project.build.directory} + true + + + com.orientechnologies + orientdb-community + ${project.parent.version} + true + zip + + + + + + + + + + org.apache.maven.plugins + maven-assembly-plugin + + + distribution-package + package + + single + + + false + + src/main/assembly/archive.xml + + + + + false + gnu + + + + + + + + + + + qa + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + + integration-test + verify + + + + + + + maven-antrun-plugin + 1.8 + + + start-orient + pre-integration-test + + run + + + + + + + + + + + + stop-orient + post-integration-test + + run + + + + + + + + + + + + + + + + + + + diff --git a/distribution/src/main/assembly/archive.xml b/distribution/src/main/assembly/archive.xml new file mode 100755 index 0000000..03dce65 --- /dev/null +++ b/distribution/src/main/assembly/archive.xml @@ -0,0 +1,34 @@ + + + + distribution + + + dir + tar.gz + zip + + + + + + ${project.build.directory}/orientdb-community-${project.version} + + + + + + + lib + + *:jar:* + + + + + + diff --git a/src/main/java/com/orientechnologies/spatial/engine/OLuceneGeoSpatialIndexEngine.java b/src/main/java/com/orientechnologies/spatial/engine/OLuceneGeoSpatialIndexEngine.java index 54ba03d..de8d2ee 100644 --- a/src/main/java/com/orientechnologies/spatial/engine/OLuceneGeoSpatialIndexEngine.java +++ b/src/main/java/com/orientechnologies/spatial/engine/OLuceneGeoSpatialIndexEngine.java @@ -65,6 +65,9 @@ public Object get(Object key) { @Override public Object getInTx(Object key, OLuceneTxChanges changes) { + openIfClosed(); + updateLastAccess(); + try { if (key instanceof Map) { return newGeoSearch((Map) key, changes); @@ -90,6 +93,7 @@ private Object newGeoSearch(Map key, OLuceneTxChanges changes) t public void put(Object key, Object value) { if (key instanceof OIdentifiable) { + openIfClosed(); ODocument location = ((OIdentifiable) key).getRecord(); Collection container = (Collection) value; diff --git a/src/main/java/com/orientechnologies/spatial/functions/OSpatialFunctionsFactory.java b/src/main/java/com/orientechnologies/spatial/functions/OSpatialFunctionsFactory.java index 4c2f4e3..8c57e89 100644 --- a/src/main/java/com/orientechnologies/spatial/functions/OSpatialFunctionsFactory.java +++ b/src/main/java/com/orientechnologies/spatial/functions/OSpatialFunctionsFactory.java @@ -23,6 +23,7 @@ import com.orientechnologies.orient.core.sql.functions.OSQLFunctionFactory; import java.util.HashMap; +import java.util.Locale; import java.util.Map; import java.util.Set; @@ -48,7 +49,7 @@ public class OSpatialFunctionsFactory implements OSQLFunctionFactory { } public static void register(final String iName, final Object iImplementation) { - FUNCTIONS.put(iName.toLowerCase(), iImplementation); + FUNCTIONS.put(iName.toLowerCase(Locale.ENGLISH), iImplementation); } @Override