polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [2/3] zest-qi4j git commit: Moving things around to keep the Core API as small as possible. Also considering if it is possible to make the Query Fluent API extensible, so that these kind of things would actually only be an Extension and not require addit
Date Wed, 03 Jun 2015 16:22:13 GMT
http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/geometry/internal/TGeometry.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/geometry/internal/TGeometry.java b/core/api/src/main/java/org/qi4j/api/geometry/internal/TGeometry.java
deleted file mode 100644
index 533ee14..0000000
--- a/core/api/src/main/java/org/qi4j/api/geometry/internal/TGeometry.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Copyright (c) 2014, Jiri Jetmar. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.qi4j.api.geometry.internal;
-
-import org.qi4j.api.common.Optional;
-import org.qi4j.api.common.UseDefaults;
-import org.qi4j.api.geometry.*;
-import org.qi4j.api.injection.scope.Structure;
-import org.qi4j.api.injection.scope.This;
-import org.qi4j.api.mixin.Mixins;
-import org.qi4j.api.property.Property;
-import org.qi4j.api.structure.Module;
-import org.qi4j.api.value.ValueComposite;
-
-@Mixins(TGeometry.Mixin.class)
-public interface TGeometry extends ValueComposite
-{
-    enum TGEOMETRY_TYPE
-    {
-        POINT, MULTIPOINT, LINESTRING, MULTILINESTRING, POLYGON, MULTIPOLYGON, FEATURE, FEATURECOLLECTION, INVALID
-    }
-
-    Property<TGEOMETRY_TYPE> geometryType();
-
-    @Optional
-    @UseDefaults
-    Property<String> CRS();
-    String getCRS();
-    void setCRS(String crs);
-
-    abstract Coordinate[] getCoordinates();
-
-    abstract int getNumPoints();
-
-    abstract boolean isEmpty();
-
-    TGEOMETRY_TYPE getType();
-
-    boolean isPoint();
-    boolean isPoint(TGeometry tGeometry);
-
-    boolean isMultiPoint();
-    boolean isMultiPoint(TGeometry tGeometry);
-
-    boolean isLineString();
-    boolean isLineString(TGeometry tGeometry);
-
-    boolean isMultiLineString();
-    boolean isMultiLineString(TGeometry tGeometry);
-
-    boolean isPolygon();
-    boolean isPolygon(TGeometry tGeometry);
-
-    boolean isMultiPolygon();
-    boolean isMultiPolygon(TGeometry tGeometry);
-
-    boolean isFeature();
-    boolean isFeature(TGeometry tGeometry);
-
-    boolean isFeatureCollection();
-    boolean isFeatureCollection(TGeometry tGeometry);
-
-    boolean isGeometry();
-    boolean isGeometry(Object tGeometry);
-
-
-
-    public abstract class Mixin implements TGeometry
-    {
-
-        @Structure
-        Module module;
-
-        @This
-        TGeometry self;
-
-        public String getCRS()
-        {
-            return self.CRS().get();
-        }
-
-        public void setCRS(String crs)
-        {
-            self.CRS().set(crs);
-        }
-
-
-        public int getNumPoints()
-        {
-            return 0;
-        }
-
-        public Coordinate[] getCoordinates()
-        {
-            throw new RuntimeException("Should never be called");
-        }
-
-        public boolean isEmpty()
-        {
-            throw new RuntimeException("Should never be called");
-        }
-
-        public TGEOMETRY_TYPE getType()
-        {
-            // "strong typing" - type & instanceOf must match
-            switch (self.geometryType().get())
-            {
-                case POINT:
-                    return self.isPoint() == false ? TGEOMETRY_TYPE.INVALID : TGEOMETRY_TYPE.POINT;
-                case MULTIPOINT:
-                    return self.isMultiPoint() == false ? TGEOMETRY_TYPE.INVALID : TGEOMETRY_TYPE.MULTIPOINT;
-                case LINESTRING:
-                    return self.isLineString() == false ? TGEOMETRY_TYPE.INVALID : TGEOMETRY_TYPE.LINESTRING;
-                case MULTILINESTRING:
-                    return self.isMultiLineString() == false ? TGEOMETRY_TYPE.INVALID : TGEOMETRY_TYPE.MULTILINESTRING;
-                case POLYGON:
-                    return self.isPolygon() == false ? TGEOMETRY_TYPE.INVALID : TGEOMETRY_TYPE.POLYGON;
-                case MULTIPOLYGON:
-                    return self.isMultiPolygon() == false ? TGEOMETRY_TYPE.INVALID : TGEOMETRY_TYPE.MULTIPOLYGON;
-                case FEATURE:
-                    return self.isFeature() == false ? TGEOMETRY_TYPE.INVALID : TGEOMETRY_TYPE.FEATURE;
-                case FEATURECOLLECTION:
-                    return self.isFeatureCollection() == false ? TGEOMETRY_TYPE.INVALID : TGEOMETRY_TYPE.FEATURECOLLECTION;
-                default:
-                    return TGEOMETRY_TYPE.INVALID;
-            }
-        }
-
-        public boolean isPoint()
-        {
-            return self instanceof TPoint ? true : false;
-        }
-        public boolean isPoint(TGeometry tGeometry)
-        {
-            return tGeometry instanceof TPoint ? true : false;
-        }
-
-        public boolean isMultiPoint()
-        {
-            return self instanceof TMultiPoint ? true : false;
-        }
-        public boolean isMultiPoint(TGeometry tGeometry)
-        {
-            return tGeometry instanceof TMultiPoint ? true : false;
-        }
-
-        public boolean isLineString()
-        {
-            return self instanceof TLineString ? true : false;
-        }
-        public boolean isLineString(TGeometry tGeometry)
-        {
-            return tGeometry instanceof TLineString ? true : false;
-        }
-
-        public boolean isMultiLineString()
-        {
-            return self instanceof TMultiLineString ? true : false;
-        }
-        public boolean isMultiLineString(TGeometry tGeometry)
-        {
-            return tGeometry instanceof TMultiLineString ? true : false;
-        }
-
-        public boolean isPolygon()
-        {
-            return self instanceof TPolygon ? true : false;
-        }
-        public boolean isPolygon(TGeometry tGeometry)
-        {
-            return tGeometry instanceof TPolygon ? true : false;
-        }
-
-        public boolean isMultiPolygon()
-        {
-            return self instanceof TMultiPolygon ? true : false;
-        }
-        public boolean isMultiPolygon(TGeometry tGeometry)
-        {
-            return tGeometry instanceof TMultiPolygon ? true : false;
-        }
-
-        public boolean isFeature()
-        {
-            return self instanceof TFeature ? true : false;
-        }
-        public boolean isFeature(TGeometry tGeometry)
-        {
-            return tGeometry instanceof TFeature ? true : false;
-        }
-
-        public boolean isFeatureCollection()
-        {
-            return self instanceof TFeatureCollection ? true : false;
-        }
-        public boolean isFeatureCollection(TGeometry tGeometry)
-        {
-            return tGeometry instanceof TFeatureCollection ? true : false;
-        }
-
-        public boolean isGeometry()
-        {
-            return self instanceof TGeometry ? true : false;
-        }
-        public boolean isGeometry(Object tGeometry)
-        {
-            return tGeometry instanceof TGeometry ? true : false;
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/geometry/internal/TLinearRing.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/geometry/internal/TLinearRing.java b/core/api/src/main/java/org/qi4j/api/geometry/internal/TLinearRing.java
deleted file mode 100644
index 2b99f9a..0000000
--- a/core/api/src/main/java/org/qi4j/api/geometry/internal/TLinearRing.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2014, Jiri Jetmar. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.qi4j.api.geometry.internal;
-
-import org.qi4j.api.geometry.TLineString;
-import org.qi4j.api.injection.scope.This;
-import org.qi4j.api.mixin.Mixins;
-
-@Mixins(TLinearRing.Mixin.class)
-public interface TLinearRing extends TLineString
-{
-
-    boolean isValid();
-
-    public abstract class Mixin extends TLineString.Mixin implements TLinearRing //, TLineString
-    {
-        @This
-        TLinearRing self;
-
-        @Override
-        public boolean isValid()
-        {
-            if (self.getStartPoint() == null || self.getEndPoint() == null) return false;
-            return self.getStartPoint().compareTo(self.getEndPoint()) == 0 ? true : false;
-        }
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/geometry/internal/TShape.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/geometry/internal/TShape.java b/core/api/src/main/java/org/qi4j/api/geometry/internal/TShape.java
deleted file mode 100644
index d56eb71..0000000
--- a/core/api/src/main/java/org/qi4j/api/geometry/internal/TShape.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Copyright (c) 2014, Jiri Jetmar. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.qi4j.api.geometry.internal;
-
-public interface TShape extends TGeometry
-{
-    // marking interface
-}

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TCRSBuilder.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TCRSBuilder.java b/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TCRSBuilder.java
deleted file mode 100644
index e089b5a..0000000
--- a/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TCRSBuilder.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2014, Jiri Jetmar. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.qi4j.api.geometry.internal.builders;
-
-import org.qi4j.api.geometry.TCRS;
-import org.qi4j.api.structure.Module;
-
-public class TCRSBuilder
-{
-
-    private Module module;
-    private TCRS geometry;
-
-
-    public TCRSBuilder(Module module)
-    {
-        this.module = module;
-        geometry = module.newValueBuilder(TCRS.class).prototype();
-    }
-
-    public TCRS crs(String crs)
-    {
-        return geometry.of(crs);
-    }
-
-
-}

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TFeatureBuilder.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TFeatureBuilder.java b/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TFeatureBuilder.java
deleted file mode 100644
index 7cce0bd..0000000
--- a/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TFeatureBuilder.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2014, Jiri Jetmar. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.qi4j.api.geometry.internal.builders;
-
-import org.qi4j.api.geometry.TFeature;
-import org.qi4j.api.geometry.internal.TGeometry;
-import org.qi4j.api.structure.Module;
-
-
-public class TFeatureBuilder
-{
-
-    private Module module;
-    private TFeature geometry;
-
-
-    public TFeatureBuilder(Module module)
-    {
-        this.module = module;
-        geometry = module.newValueBuilder(TFeature.class).prototype();
-    }
-
-
-    public TFeatureBuilder of(TGeometry feature)
-    {
-        geometry.of(feature);
-        return this;
-    }
-
-    public TFeatureBuilder addProperty(String name, String value)
-    {
-        geometry.addProperty(name, value);
-        return this;
-    }
-
-    public TFeature geometry()
-    {
-        return geometry;
-    }
-
-    public TFeature geometry(int srid)
-    {
-        return geometry();
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TFeatureCollectionBuilder.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TFeatureCollectionBuilder.java b/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TFeatureCollectionBuilder.java
deleted file mode 100644
index fd27562..0000000
--- a/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TFeatureCollectionBuilder.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2014, Jiri Jetmar. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.qi4j.api.geometry.internal.builders;
-
-import org.qi4j.api.geometry.TFeature;
-import org.qi4j.api.geometry.TFeatureCollection;
-import org.qi4j.api.structure.Module;
-
-import java.util.List;
-
-public class TFeatureCollectionBuilder
-{
-
-    private Module module;
-    private TFeatureCollection geometry;
-
-
-    public TFeatureCollectionBuilder(Module module)
-    {
-        this.module = module;
-        geometry = module.newValueBuilder(TFeatureCollection.class).prototype();
-    }
-
-    public TFeatureCollectionBuilder of(List<TFeature> features)
-    {
-        geometry.of(features);
-        return this;
-    }
-
-    public TFeatureCollectionBuilder of(TFeature... features)
-    {
-        geometry.of(features);
-        return this;
-    }
-
-    public TFeatureCollection geometry()
-    {
-        return geometry;
-    }
-
-    public TFeatureCollection geometry(int srid)
-    {
-        return geometry();
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TLineStringBuilder.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TLineStringBuilder.java b/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TLineStringBuilder.java
deleted file mode 100644
index 21b6f6d..0000000
--- a/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TLineStringBuilder.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2014, Jiri Jetmar. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.qi4j.api.geometry.internal.builders;
-
-import org.qi4j.api.geometry.TLineString;
-import org.qi4j.api.geometry.TPoint;
-import org.qi4j.api.structure.Module;
-
-
-public class TLineStringBuilder
-{
-
-    private Module module;
-    private TLineString geometry;
-
-
-    public TLineStringBuilder(Module module)
-    {
-        this.module = module;
-        geometry = module.newValueBuilder(TLineString.class).prototype();
-    }
-
-
-    public TLineStringBuilder points(double[][] points)
-    {
-        for (double yx[] : points)
-        {
-            if (yx.length < 2) return null;
-            geometry.yx(yx[0], yx[1]);
-        }
-        return this;
-    }
-
-    public TLineStringBuilder of(TPoint... points)
-    {
-        geometry().of(points);
-        return this;
-    }
-
-    public TLineStringBuilder of()
-    {
-        geometry().of();
-        return this;
-    }
-
-
-    public TLineString geometry()
-    {
-        return geometry;
-    }
-
-    public TLineString geometry(int srid)
-    {
-        return geometry();
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TLinearRingBuilder.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TLinearRingBuilder.java b/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TLinearRingBuilder.java
deleted file mode 100644
index b057cbb..0000000
--- a/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TLinearRingBuilder.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2014, Jiri Jetmar. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.qi4j.api.geometry.internal.builders;
-
-import org.qi4j.api.geometry.TPoint;
-import org.qi4j.api.geometry.internal.TLinearRing;
-import org.qi4j.api.structure.Module;
-
-
-public class TLinearRingBuilder
-{
-
-    private Module module;
-    private TLinearRing geometry;
-
-
-    public TLinearRingBuilder(Module module)
-    {
-        this.module = module;
-        geometry = module.newValueBuilder(TLinearRing.class).prototype();
-    }
-
-
-    public TLinearRingBuilder ring(double[][] ring)
-    {
-        for (double xy[] : ring)
-        {
-            if (xy.length < 2) return null;
-            geometry.yx(xy[0], xy[1]);
-        }
-        return this;
-    }
-
-    public TLinearRingBuilder of(TPoint... points)
-    {
-        geometry().of(points);
-        return this;
-    }
-
-    public TLinearRing geometry()
-    {
-
-        return geometry;
-    }
-
-    public TLinearRing geometry(int srid)
-    {
-        return geometry();
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TMultiLineStringBuilder.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TMultiLineStringBuilder.java b/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TMultiLineStringBuilder.java
deleted file mode 100644
index c852d3a..0000000
--- a/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TMultiLineStringBuilder.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2014, Jiri Jetmar. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.qi4j.api.geometry.internal.builders;
-
-import org.qi4j.api.geometry.TLineString;
-import org.qi4j.api.geometry.TMultiLineString;
-import org.qi4j.api.structure.Module;
-
-import java.util.List;
-
-public class TMultiLineStringBuilder
-{
-
-    private Module module;
-    private TMultiLineString geometry;
-
-
-    public TMultiLineStringBuilder(Module module)
-    {
-        this.module = module;
-        geometry = module.newValueBuilder(TMultiLineString.class).prototype();
-    }
-
-
-    public TMultiLineStringBuilder points(double[][][] points)
-    {
-        for (double xy[][] : points)
-        {
-            if (xy.length < 2) return null;
-        }
-        return this;
-    }
-
-    public TMultiLineStringBuilder of(List<TLineString> lines)
-    {
-        geometry.of(lines);
-        return this;
-    }
-
-    public TMultiLineStringBuilder of(TLineString... lines)
-    {
-        geometry.of(lines);
-        return this;
-    }
-
-
-    public TMultiLineString geometry()
-    {
-        return geometry;
-    }
-
-    public TMultiLineString geometry(int srid)
-    {
-        return geometry();
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TMultiPointBuilder.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TMultiPointBuilder.java b/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TMultiPointBuilder.java
deleted file mode 100644
index 0fe8ad1..0000000
--- a/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TMultiPointBuilder.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2014, Jiri Jetmar. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.qi4j.api.geometry.internal.builders;
-
-import org.qi4j.api.geometry.TMultiPoint;
-import org.qi4j.api.geometry.TPoint;
-import org.qi4j.api.structure.Module;
-
-/**
- * Created by jj on 26.11.14.
- */
-public class TMultiPointBuilder
-{
-
-    private Module module;
-    private TMultiPoint geometry;
-
-
-    public TMultiPointBuilder(Module module)
-    {
-        this.module = module;
-        geometry = module.newValueBuilder(TMultiPoint.class).prototype();
-    }
-
-    // Format { lat, lon }
-    public TMultiPointBuilder points(double[][] points)
-    {
-        for (double yx[] : points)
-        {
-            if (yx.length < 2) return null;
-            geometry.yx(yx[0], yx[1]);
-        }
-        return this;
-    }
-
-    public TMultiPointBuilder of(TPoint... points)
-    {
-        geometry().of(points);
-        return this;
-    }
-
-    public TMultiPoint geometry()
-    {
-        return geometry;
-    }
-
-    public TMultiPoint geometry(String CRS)
-    {
-        geometry().setCRS(CRS);
-        return geometry();
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TMultiPolygonsBuilder.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TMultiPolygonsBuilder.java b/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TMultiPolygonsBuilder.java
deleted file mode 100644
index c57bb16..0000000
--- a/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TMultiPolygonsBuilder.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2014, Jiri Jetmar. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.qi4j.api.geometry.internal.builders;
-
-import org.qi4j.api.geometry.TMultiPolygon;
-import org.qi4j.api.geometry.TPolygon;
-import org.qi4j.api.structure.Module;
-
-import java.util.List;
-
-
-public class TMultiPolygonsBuilder
-{
-
-    private Module module;
-    private TMultiPolygon geometry;
-
-
-    public TMultiPolygonsBuilder(Module module)
-    {
-        this.module = module;
-        geometry = module.newValueBuilder(TMultiPolygon.class).prototype();
-    }
-
-
-    public TMultiPolygonsBuilder points(double[][][] points)
-    {
-        for (double xy[][] : points)
-        {
-            if (xy.length < 2) return null;
-        }
-        return this;
-    }
-
-    public TMultiPolygonsBuilder of(List<TPolygon> polygons)
-    {
-        geometry.of(polygons);
-        return this;
-    }
-
-    public TMultiPolygonsBuilder of(TPolygon... polygons)
-    {
-        geometry.of(polygons);
-        return this;
-    }
-
-
-    public TMultiPolygon geometry()
-    {
-        return geometry;
-    }
-
-    public TMultiPolygon geometry(int srid)
-    {
-        return geometry();
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TPointBuilder.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TPointBuilder.java b/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TPointBuilder.java
deleted file mode 100644
index d632459..0000000
--- a/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TPointBuilder.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2014, Jiri Jetmar. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.qi4j.api.geometry.internal.builders;
-
-import org.qi4j.api.geometry.TPoint;
-import org.qi4j.api.geometry.internal.TGeometry;
-import org.qi4j.api.structure.Module;
-
-
-public class TPointBuilder
-{
-
-    private Module module;
-    private TPoint geometry;
-
-
-    public TPointBuilder(Module module)
-    {
-        this.module = module;
-        geometry = module.newValueBuilder(TPoint.class).prototype();
-    }
-
-    public TPointBuilder x(double x)
-    {
-        geometry.x(x);
-        return this;
-    }
-
-    public TPointBuilder y(double y)
-    {
-        geometry.y(y);
-        return this;
-    }
-
-    public TPointBuilder z(double u)
-    {
-        geometry.z(u);
-        return this;
-    }
-
-
-    public TPointBuilder lat(double lat)
-    {
-        geometry.y(lat);
-        return this;
-    }
-
-    public TPointBuilder lon(double lon)
-    {
-        geometry.x(lon);
-        return this;
-    }
-
-    public TPointBuilder alt(double alt)
-    {
-        geometry.z(alt);
-        return this;
-    }
-
-
-    public boolean isPoint(TGeometry tGeometry)
-    {
-        return tGeometry instanceof TPoint ? true : false;
-    }
-
-    public TPoint geometry()
-    {
-        return geometry;
-    }
-
-    public TPoint geometry(String CRS)
-    {
-        geometry().setCRS(CRS);
-        return geometry();
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TPolygonBuilder.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TPolygonBuilder.java b/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TPolygonBuilder.java
deleted file mode 100644
index d3f6b72..0000000
--- a/core/api/src/main/java/org/qi4j/api/geometry/internal/builders/TPolygonBuilder.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2014, Jiri Jetmar. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.qi4j.api.geometry.internal.builders;
-
-import org.qi4j.api.geometry.TPolygon;
-import org.qi4j.api.geometry.internal.TLinearRing;
-import org.qi4j.api.structure.Module;
-
-
-public class TPolygonBuilder
-{
-
-    private Module module;
-    private TPolygon geometry;
-
-
-    public TPolygonBuilder(Module module)
-    {
-        this.module = module;
-        geometry = module.newValueBuilder(TPolygon.class).prototype();
-    }
-
-    public TPolygonBuilder shell(TLinearRing shell)
-    {
-        geometry.of(shell);
-        return this;
-    }
-
-    public TPolygonBuilder shell(double[][] shell)
-    {
-        geometry.of(new TLinearRingBuilder(module).ring(shell).geometry());
-        return this;
-    }
-
-    public TPolygonBuilder withHoles(TLinearRing... holes)
-    {
-        geometry.withHoles(holes);
-        return this;
-    }
-
-
-    public TPolygon geometry()
-    {
-        return geometry;
-    }
-
-    public TPolygon geometry(String CRS)
-    {
-        geometry().setCRS(CRS);
-        return geometry();
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/SpatialQueryExpressions.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/SpatialQueryExpressions.java b/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/SpatialQueryExpressions.java
index e1bdb34..48b673f 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/SpatialQueryExpressions.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/SpatialQueryExpressions.java
@@ -2,8 +2,8 @@ package org.qi4j.api.query.grammar.extensions.spatial;
 
 import org.qi4j.api.geometry.TPoint;
 import org.qi4j.api.geometry.TUnit;
-import org.qi4j.api.geometry.internal.TGeometry;
-import org.qi4j.api.geometry.internal.TShape;
+import org.qi4j.api.geometry.TGeometry;
+import org.qi4j.api.geometry.TShape;
 import org.qi4j.api.property.Property;
 import org.qi4j.api.query.QueryExpressions;
 import org.qi4j.api.query.grammar.extensions.spatial.convert.ST_GeomFromTextSpecification;
@@ -13,74 +13,100 @@ import org.qi4j.api.query.grammar.extensions.spatial.predicate.ST_IntersectsSpec
 import org.qi4j.api.query.grammar.extensions.spatial.predicate.ST_WithinSpecification;
 import org.qi4j.functional.Specification;
 
-
 public final class SpatialQueryExpressions extends QueryExpressions
 {
 
     // ST_Within
-    public static <T extends TGeometry> ST_WithinSpecification<TGeometry> ST_Within(Property<T> geometry, TPoint param, double distance, TUnit unit)
+    public static <T extends TGeometry> ST_WithinSpecification<T> ST_Within( Property<T> geometry,
+                                                                             TPoint param,
+                                                                             double distance,
+                                                                             TUnit unit
+    )
     {
-        return new ST_WithinSpecification(property(geometry), param, distance, unit);
+        return new ST_WithinSpecification<>( property( geometry ), param, distance, unit );
     }
 
-    public static <T extends TGeometry> ST_WithinSpecification<TGeometry> ST_Within(Property<T> geometry, TShape param)
+    public static <T extends TGeometry> ST_WithinSpecification<T> ST_Within( Property<T> geometry,
+                                                                             TShape param
+    )
     {
-        return new ST_WithinSpecification(property(geometry), param);
+        return new ST_WithinSpecification<>( property( geometry ), param );
     }
 
-    public static <T extends TGeometry> ST_WithinSpecification<TGeometry> ST_Within(Property<T> geometry, Specification<SpatialConvertSpecification> operator, double distance, TUnit unit)
+    public static <T extends TGeometry> ST_WithinSpecification<T> ST_Within( Property<T> geometry,
+                                                                             Specification<SpatialConvertSpecification> operator,
+                                                                             double distance,
+                                                                             TUnit unit
+    )
     {
-        return new ST_WithinSpecification(property(geometry), operator, distance, unit);
+        return new ST_WithinSpecification<>( property( geometry ), operator, distance, unit );
     }
 
-    public static <T extends TGeometry> ST_WithinSpecification<TGeometry> ST_Within(Property<T> geometry, Specification<SpatialConvertSpecification> operator)
+    public static <T extends TGeometry> ST_WithinSpecification<T> ST_Within( Property<T> geometry,
+                                                                             Specification<SpatialConvertSpecification> operator
+    )
     {
-        return new ST_WithinSpecification(property(geometry), operator);
+        return new ST_WithinSpecification<>( property( geometry ), operator );
     }
 
     // ST_Disjoint
-    public static <T extends TGeometry> ST_DisjointSpecification<TGeometry> ST_Disjoint(Property<T> geometry, Specification<SpatialConvertSpecification> operator, long distance)
+    public static <T extends TGeometry> ST_DisjointSpecification<T> ST_Disjoint( Property<T> geometry,
+                                                                                 Specification<SpatialConvertSpecification> operator,
+                                                                                 long distance
+    )
     {
-        return new ST_DisjointSpecification(property(geometry), operator, distance);
+        return new ST_DisjointSpecification<>( property( geometry ), operator, distance );
     }
 
-    public static <T extends TGeometry> ST_DisjointSpecification<TGeometry> ST_Disjoint(Property<T> geometry, TPoint param, double distance, TUnit unit)
+    public static <T extends TGeometry> ST_DisjointSpecification<T> ST_Disjoint( Property<T> geometry,
+                                                                                 TPoint param,
+                                                                                 double distance,
+                                                                                 TUnit unit
+    )
     {
-        return new ST_DisjointSpecification(property(geometry), param, distance, unit);
+        return new ST_DisjointSpecification<>( property( geometry ), param, distance, unit );
     }
 
-    public static <T extends TGeometry> ST_DisjointSpecification<TGeometry> ST_Disjoint(Property<T> geometry, TShape param)
+    public static <T extends TGeometry> ST_DisjointSpecification<T> ST_Disjoint( Property<T> geometry,
+                                                                                 TShape param
+    )
     {
-        return new ST_DisjointSpecification(property(geometry), param);
+        return new ST_DisjointSpecification<>( property( geometry ), param );
     }
 
-
     // ST_Intersects
-    public static <T extends TGeometry> ST_IntersectsSpecification<TGeometry> ST_Intersects(Property<T> geometry, Specification<SpatialConvertSpecification> operator, long distance)
+    public static <T extends TGeometry> ST_IntersectsSpecification<T> ST_Intersects( Property<T> geometry,
+                                                                                     Specification<SpatialConvertSpecification> operator,
+                                                                                     long distance
+    )
     {
-        return new ST_IntersectsSpecification(property(geometry), operator, distance);
+        return new ST_IntersectsSpecification<>( property( geometry ), operator, distance );
     }
 
-    public static <T extends TGeometry> ST_IntersectsSpecification<TGeometry> ST_Intersects(Property<T> geometry, TPoint value, double distance, TUnit unit)
+    public static <T extends TGeometry> ST_IntersectsSpecification<T> ST_Intersects( Property<T> geometry,
+                                                                                     TPoint value,
+                                                                                     double distance,
+                                                                                     TUnit unit
+    )
     {
-        return new ST_IntersectsSpecification(property(geometry), value, distance, unit);
+        return new ST_IntersectsSpecification<>( property( geometry ), value, distance, unit );
     }
 
-    public static <T extends TGeometry> ST_IntersectsSpecification<TGeometry> ST_Intersects(Property<T> geometry, TShape param)
+    public static <T extends TGeometry> ST_IntersectsSpecification<T> ST_Intersects( Property<T> geometry,
+                                                                                     TShape param
+    )
     {
-        return new ST_IntersectsSpecification(property(geometry), param);
+        return new ST_IntersectsSpecification<>( property( geometry ), param );
     }
 
-
     // ST_GeometryFromText
-    public static Specification<SpatialConvertSpecification> ST_GeometryFromText(String WKT)
+    public static Specification<SpatialConvertSpecification> ST_GeometryFromText( String WKT )
     {
-        return ST_GeometryFromText(WKT, null);
+        return ST_GeometryFromText( WKT, null );
     }
 
-    public static Specification<SpatialConvertSpecification> ST_GeometryFromText(String WKT, String crs)
+    public static Specification<SpatialConvertSpecification> ST_GeometryFromText( String WKT, String crs )
     {
-        return new ST_GeomFromTextSpecification(WKT, crs);
+        return new ST_GeomFromTextSpecification( WKT, crs );
     }
-
 }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/convert/ST_GeomFromTextSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/convert/ST_GeomFromTextSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/convert/ST_GeomFromTextSpecification.java
index b7e76a5..eca8444 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/convert/ST_GeomFromTextSpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/convert/ST_GeomFromTextSpecification.java
@@ -1,19 +1,18 @@
 package org.qi4j.api.query.grammar.extensions.spatial.convert;
 
-import org.qi4j.api.geometry.internal.TGeometry;
-
+import org.qi4j.api.geometry.TGeometry;
 
 public class ST_GeomFromTextSpecification<T extends TGeometry>
-        extends SpatialConvertSpecification<T>
+    extends SpatialConvertSpecification
 {
-    public ST_GeomFromTextSpecification(String WKT, String crs)
+    public ST_GeomFromTextSpecification( String WKT, String crs )
     {
-        super(WKT, crs);
+        super( WKT, crs );
     }
 
     @Override
     public String toString()
     {
-        return "CONVERTING ( " +  geometryAsWKT + " )";
+        return "CONVERTING ( " + geometryAsWKT + " )";
     }
 }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/convert/SpatialConvertSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/convert/SpatialConvertSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/convert/SpatialConvertSpecification.java
index 7e4f13b..aa2e6d9 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/convert/SpatialConvertSpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/convert/SpatialConvertSpecification.java
@@ -1,25 +1,22 @@
 package org.qi4j.api.query.grammar.extensions.spatial.convert;
 
 import org.qi4j.api.composite.Composite;
-import org.qi4j.api.geometry.internal.TGeometry;
+import org.qi4j.api.geometry.TGeometry;
 import org.qi4j.api.query.grammar.ExpressionSpecification;
 
-
-public abstract class SpatialConvertSpecification<T>
-        extends ExpressionSpecification
+public abstract class SpatialConvertSpecification
+    extends ExpressionSpecification
 {
     protected String geometryAsWKT;
     protected TGeometry geometry;
     protected String crs;
 
-
-    public SpatialConvertSpecification(String wkt, String crs)
+    public SpatialConvertSpecification( String wkt, String crs )
     {
         this.geometryAsWKT = wkt;
         this.crs = crs;
     }
 
-
     public String property()
     {
         return geometryAsWKT;
@@ -30,15 +27,14 @@ public abstract class SpatialConvertSpecification<T>
         return this.geometry;
     }
 
-    public void setGeometry(TGeometry geometry)
+    public void setGeometry( TGeometry geometry )
     {
         this.geometry = geometry;
     }
 
     @Override
-    public final boolean satisfiedBy(Composite item)
+    public final boolean satisfiedBy( Composite item )
     {
         return true;
     }
-
 }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/predicate/ST_DisjointSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/predicate/ST_DisjointSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/predicate/ST_DisjointSpecification.java
index 703e955..29549d8 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/predicate/ST_DisjointSpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/predicate/ST_DisjointSpecification.java
@@ -2,37 +2,39 @@ package org.qi4j.api.query.grammar.extensions.spatial.predicate;
 
 import org.qi4j.api.geometry.TPoint;
 import org.qi4j.api.geometry.TUnit;
-import org.qi4j.api.geometry.internal.TGeometry;
+import org.qi4j.api.geometry.TGeometry;
 import org.qi4j.api.query.grammar.PropertyFunction;
 import org.qi4j.api.query.grammar.extensions.spatial.convert.SpatialConvertSpecification;
 import org.qi4j.functional.Specification;
 
-
 public class ST_DisjointSpecification<T extends TGeometry>
-        extends SpatialPredicatesSpecification<T>
+    extends SpatialPredicatesSpecification<T>
 {
 
     private double distance;
     private TUnit unit;
 
-    public ST_DisjointSpecification(PropertyFunction<T> property, TGeometry param)
+    public ST_DisjointSpecification( PropertyFunction<T> property, TGeometry param )
     {
-        super(property, param);
+        super( property, param );
     }
 
-    public ST_DisjointSpecification(PropertyFunction<T> property, Specification<SpatialConvertSpecification> operator, long distance)
+    // TODO: [niclas] 'distance' is not used...??? Missing tests?
+    public ST_DisjointSpecification( PropertyFunction<T> property,
+                                     Specification<SpatialConvertSpecification> operator,
+                                     long distance
+    )
     {
-        super(property, operator);
+        super( property, operator );
     }
 
-    public ST_DisjointSpecification(PropertyFunction<T> property, TPoint value, double distance, TUnit unit)
+    public ST_DisjointSpecification( PropertyFunction<T> property, TPoint value, double distance, TUnit unit )
     {
-        super(property, value);
+        super( property, value );
         this.distance = distance;
         this.unit = unit;
     }
 
-
     public double getDistance()
     {
         return distance;
@@ -43,26 +45,31 @@ public class ST_DisjointSpecification<T extends TGeometry>
         return unit;
     }
 
-
     @Override
-    protected boolean compare(TGeometry param)
+    protected boolean compare( TGeometry param )
     {
-        return param.equals(this.param);
+        return param.equals( this.param );
     }
 
     @Override
     public String toString()
     {
-        StringBuffer spec = new StringBuffer();
-        spec.append("ST_DISJOINT").append("( ").append(property.toString()).append(" IS NOT WITHIN ");
-        spec.append(param.toString());
+        StringBuilder spec = new StringBuilder();
+        spec.append( "ST_DISJOINT" );
+        spec.append( "( " );
+        spec.append( property.toString() );
+        spec.append( " IS NOT WITHIN " );
+        spec.append( param.toString() );
 
-        if (distance > 0)
+        if( distance > 0 )
         {
-            spec.append(" WITH RADIUS ").append(distance).append(" ").append(unit);
+            spec.append( " WITH RADIUS " );
+            spec.append( distance );
+            spec.append( " " );
+            spec.append( unit );
         }
 
-        spec.append(" ) ");
+        spec.append( " ) " );
         return spec.toString();
     }
 }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/predicate/ST_IntersectsSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/predicate/ST_IntersectsSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/predicate/ST_IntersectsSpecification.java
index 6fda01f..93705fa 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/predicate/ST_IntersectsSpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/predicate/ST_IntersectsSpecification.java
@@ -2,37 +2,37 @@ package org.qi4j.api.query.grammar.extensions.spatial.predicate;
 
 import org.qi4j.api.geometry.TPoint;
 import org.qi4j.api.geometry.TUnit;
-import org.qi4j.api.geometry.internal.TGeometry;
+import org.qi4j.api.geometry.TGeometry;
 import org.qi4j.api.query.grammar.PropertyFunction;
 import org.qi4j.api.query.grammar.extensions.spatial.convert.SpatialConvertSpecification;
 import org.qi4j.functional.Specification;
 
-
 public class ST_IntersectsSpecification<T extends TGeometry>
-        extends SpatialPredicatesSpecification<T>
+    extends SpatialPredicatesSpecification<T>
 {
-
     private double distance;
     private TUnit unit;
 
-    public ST_IntersectsSpecification(PropertyFunction<T> property, TGeometry param)
+    public ST_IntersectsSpecification( PropertyFunction<T> property, TGeometry param )
     {
-        super(property, param);
+        super( property, param );
     }
 
-    public ST_IntersectsSpecification(PropertyFunction<T> property, Specification<SpatialConvertSpecification> operator, long distance)
+    public ST_IntersectsSpecification( PropertyFunction<T> property,
+                                       Specification<SpatialConvertSpecification> operator,
+                                       long distance
+    )
     {
-        super(property, operator);
+        super( property, operator );
     }
 
-    public ST_IntersectsSpecification(PropertyFunction<T> property, TPoint param, double distance, TUnit unit)
+    public ST_IntersectsSpecification( PropertyFunction<T> property, TPoint param, double distance, TUnit unit )
     {
-        super(property, param);
+        super( property, param );
         this.distance = distance;
         this.unit = unit;
     }
 
-
     public double getDistance()
     {
         return distance;
@@ -43,26 +43,31 @@ public class ST_IntersectsSpecification<T extends TGeometry>
         return unit;
     }
 
-
     @Override
-    protected boolean compare(TGeometry param)
+    protected boolean compare( TGeometry param )
     {
-        return param.equals(this.param);
+        return param.equals( this.param );
     }
 
     @Override
     public String toString()
     {
-        StringBuffer spec = new StringBuffer();
-        spec.append("ST_INTERSECTS").append("( ").append(property.toString()).append(" INTERSECTS ");
-        spec.append(param.toString());
+        StringBuilder spec = new StringBuilder();
+        spec.append( "ST_INTERSECTS" );
+        spec.append( "( " );
+        spec.append( property.toString() );
+        spec.append( " INTERSECTS " );
+        spec.append( param.toString() );
 
-        if (distance > 0)
+        if( distance > 0 )
         {
-            spec.append(" WITH RADIUS ").append(distance).append(" ").append(unit);
+            spec.append( " WITH RADIUS " );
+            spec.append( distance );
+            spec.append( " " );
+            spec.append( unit );
         }
 
-        spec.append(" ) ");
+        spec.append( " ) " );
         return spec.toString();
     }
 }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/predicate/ST_WithinSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/predicate/ST_WithinSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/predicate/ST_WithinSpecification.java
index 4483fa6..85522f8 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/predicate/ST_WithinSpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/predicate/ST_WithinSpecification.java
@@ -2,42 +2,44 @@ package org.qi4j.api.query.grammar.extensions.spatial.predicate;
 
 import org.qi4j.api.geometry.TPoint;
 import org.qi4j.api.geometry.TUnit;
-import org.qi4j.api.geometry.internal.TGeometry;
+import org.qi4j.api.geometry.TGeometry;
 import org.qi4j.api.query.grammar.PropertyFunction;
 import org.qi4j.api.query.grammar.extensions.spatial.convert.SpatialConvertSpecification;
 import org.qi4j.functional.Specification;
 
-
 public class ST_WithinSpecification<T extends TGeometry>
-        extends SpatialPredicatesSpecification<T>
+    extends SpatialPredicatesSpecification<T>
 {
 
     private double distance;
     private TUnit unit;
 
-    public ST_WithinSpecification(PropertyFunction<T> property, TGeometry param)
+    public ST_WithinSpecification( PropertyFunction<T> property, TGeometry param )
     {
-        super(property, param);
+        super( property, param );
     }
 
-    public ST_WithinSpecification(PropertyFunction<T> property, TPoint param, double distance, TUnit unit)
+    public ST_WithinSpecification( PropertyFunction<T> property, TPoint param, double distance, TUnit unit )
     {
-        super(property, param);
+        super( property, param );
         this.distance = distance;
         this.unit = unit;
     }
 
-    public ST_WithinSpecification(PropertyFunction<T> property, Specification<SpatialConvertSpecification> operator, double distance, TUnit unit)
+    public ST_WithinSpecification( PropertyFunction<T> property,
+                                   Specification<SpatialConvertSpecification> operator,
+                                   double distance,
+                                   TUnit unit
+    )
     {
-        super(property, operator);
+        super( property, operator );
         this.distance = distance;
         this.unit = unit;
     }
 
-
-    public ST_WithinSpecification(PropertyFunction<T> property, Specification<SpatialConvertSpecification> operator)
+    public ST_WithinSpecification( PropertyFunction<T> property, Specification<SpatialConvertSpecification> operator )
     {
-        super(property, operator);
+        super( property, operator );
     }
 
     public double getDistance()
@@ -50,26 +52,31 @@ public class ST_WithinSpecification<T extends TGeometry>
         return unit;
     }
 
-
     @Override
-    protected boolean compare(TGeometry param)
+    protected boolean compare( TGeometry param )
     {
-        return param.equals(this.param);
+        return param.equals( this.param );
     }
 
     @Override
     public String toString()
     {
-        StringBuffer spec = new StringBuffer();
-        spec.append("ST_WITHIN").append("( ").append(property.toString()).append(" IS WITHIN ");
-        spec.append(param.toString());
-
-        if (distance > 0)
+        StringBuilder spec = new StringBuilder();
+        spec.append( "ST_WITHIN" );
+        spec.append( "( " );
+        spec.append( property.toString() );
+        spec.append( " IS WITHIN " );
+        spec.append( param.toString() );
+
+        if( distance > 0 )
         {
-            spec.append(" WITH RADIUS ").append(distance).append(" ").append(unit);
+            spec.append( " WITH RADIUS " );
+            spec.append( distance );
+            spec.append( " " );
+            spec.append( unit );
         }
 
-        spec.append(" ) ");
+        spec.append( " ) " );
         return spec.toString();
     }
 }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/predicate/SpatialPredicatesSpecification.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/predicate/SpatialPredicatesSpecification.java b/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/predicate/SpatialPredicatesSpecification.java
index bd793fb..5bde3e2 100644
--- a/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/predicate/SpatialPredicatesSpecification.java
+++ b/core/api/src/main/java/org/qi4j/api/query/grammar/extensions/spatial/predicate/SpatialPredicatesSpecification.java
@@ -1,29 +1,30 @@
 package org.qi4j.api.query.grammar.extensions.spatial.predicate;
 
 import org.qi4j.api.composite.Composite;
-import org.qi4j.api.geometry.internal.TGeometry;
+import org.qi4j.api.geometry.TGeometry;
 import org.qi4j.api.property.Property;
 import org.qi4j.api.query.grammar.ExpressionSpecification;
 import org.qi4j.api.query.grammar.PropertyFunction;
 import org.qi4j.api.query.grammar.extensions.spatial.convert.SpatialConvertSpecification;
 import org.qi4j.functional.Specification;
 
-
 public abstract class SpatialPredicatesSpecification<T extends TGeometry>
-        extends ExpressionSpecification
+    extends ExpressionSpecification
 {
     protected final PropertyFunction<T> property;
     protected final TGeometry param;
     protected final Specification<SpatialConvertSpecification> operator;
 
-    public SpatialPredicatesSpecification(PropertyFunction<T> property, TGeometry param)
+    public SpatialPredicatesSpecification( PropertyFunction<T> property, TGeometry param )
     {
         this.property = property;
         this.param = param;
         this.operator = null;
     }
 
-    public SpatialPredicatesSpecification(PropertyFunction<T> property, Specification<SpatialConvertSpecification> operator)
+    public SpatialPredicatesSpecification( PropertyFunction<T> property,
+                                           Specification<SpatialConvertSpecification> operator
+    )
     {
         this.property = property;
         this.operator = operator;
@@ -36,31 +37,32 @@ public abstract class SpatialPredicatesSpecification<T extends TGeometry>
     }
 
     @Override
-    public final boolean satisfiedBy(Composite item)
+    public final boolean satisfiedBy( Composite item )
     {
         try
         {
-            Property<T> prop = property.map(item);
+            Property<T> prop = property.map( item );
 
-            if (prop == null)
+            if( prop == null )
             {
                 return false;
             }
 
             TGeometry propValue = prop.get();
-            if (propValue == null)
+            if( propValue == null )
             {
                 return false;
             }
 
-            return compare(propValue);
-        } catch (IllegalArgumentException e)
+            return compare( propValue );
+        }
+        catch( IllegalArgumentException e )
         {
             return false;
         }
     }
 
-    protected abstract boolean compare(TGeometry value);
+    protected abstract boolean compare( TGeometry value );
 
     public TGeometry param()
     {

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/main/java/org/qi4j/api/type/ValueType.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/qi4j/api/type/ValueType.java b/core/api/src/main/java/org/qi4j/api/type/ValueType.java
index 8c74442..98c5d01 100644
--- a/core/api/src/main/java/org/qi4j/api/type/ValueType.java
+++ b/core/api/src/main/java/org/qi4j/api/type/ValueType.java
@@ -16,7 +16,7 @@ package org.qi4j.api.type;
 
 import java.util.Collections;
 
-import org.qi4j.api.geometry.internal.TGeometry;
+import org.qi4j.api.geometry.TGeometry;
 import org.qi4j.api.util.NullArgumentException;
 import org.qi4j.functional.Function;
 import org.qi4j.functional.Iterables;

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/test/java/org/qi4j/api/geometry/TGeometryFactoryTest.java
----------------------------------------------------------------------
diff --git a/core/api/src/test/java/org/qi4j/api/geometry/TGeometryFactoryTest.java b/core/api/src/test/java/org/qi4j/api/geometry/TGeometryFactoryTest.java
index 1871807..4dc3b76 100644
--- a/core/api/src/test/java/org/qi4j/api/geometry/TGeometryFactoryTest.java
+++ b/core/api/src/test/java/org/qi4j/api/geometry/TGeometryFactoryTest.java
@@ -15,9 +15,6 @@
 package org.qi4j.api.geometry;
 
 import org.junit.Test;
-import org.qi4j.api.geometry.internal.Coordinate;
-import org.qi4j.api.geometry.internal.TGeometry;
-import org.qi4j.api.geometry.internal.TLinearRing;
 import org.qi4j.bootstrap.AssemblyException;
 import org.qi4j.bootstrap.ModuleAssembly;
 import org.qi4j.test.AbstractQi4jTest;

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/api/src/test/java/org/qi4j/api/geometry/TGeometryTest.java
----------------------------------------------------------------------
diff --git a/core/api/src/test/java/org/qi4j/api/geometry/TGeometryTest.java b/core/api/src/test/java/org/qi4j/api/geometry/TGeometryTest.java
index 99f0493..f4a56b0 100644
--- a/core/api/src/test/java/org/qi4j/api/geometry/TGeometryTest.java
+++ b/core/api/src/test/java/org/qi4j/api/geometry/TGeometryTest.java
@@ -15,10 +15,6 @@
 package org.qi4j.api.geometry;
 
 import org.junit.Test;
-import org.qi4j.api.geometry.internal.Coordinate;
-import org.qi4j.api.geometry.internal.TCircle;
-import org.qi4j.api.geometry.internal.TGeometry;
-import org.qi4j.api.geometry.internal.TLinearRing;
 import org.qi4j.api.value.ValueBuilder;
 import org.qi4j.bootstrap.AssemblyException;
 import org.qi4j.bootstrap.ModuleAssembly;

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/testsupport/src/main/java/org/qi4j/test/indexing/AbstractAnyQueryTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/qi4j/test/indexing/AbstractAnyQueryTest.java b/core/testsupport/src/main/java/org/qi4j/test/indexing/AbstractAnyQueryTest.java
index 1c5ba2e..1e5f226 100644
--- a/core/testsupport/src/main/java/org/qi4j/test/indexing/AbstractAnyQueryTest.java
+++ b/core/testsupport/src/main/java/org/qi4j/test/indexing/AbstractAnyQueryTest.java
@@ -18,9 +18,9 @@
 package org.qi4j.test.indexing;
 
 import org.qi4j.api.geometry.*;
-import org.qi4j.api.geometry.internal.Coordinate;
-import org.qi4j.api.geometry.internal.TGeometry;
-import org.qi4j.api.geometry.internal.TLinearRing;
+import org.qi4j.api.geometry.Coordinate;
+import org.qi4j.api.geometry.TGeometry;
+import org.qi4j.api.geometry.TLinearRing;
 import org.qi4j.api.unitofwork.UnitOfWork;
 import org.qi4j.bootstrap.AssemblyException;
 import org.qi4j.bootstrap.ModuleAssembly;

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/testsupport/src/main/java/org/qi4j/test/indexing/AbstractQueryTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/qi4j/test/indexing/AbstractQueryTest.java b/core/testsupport/src/main/java/org/qi4j/test/indexing/AbstractQueryTest.java
index 40ceb08..9f39e8a 100644
--- a/core/testsupport/src/main/java/org/qi4j/test/indexing/AbstractQueryTest.java
+++ b/core/testsupport/src/main/java/org/qi4j/test/indexing/AbstractQueryTest.java
@@ -148,11 +148,8 @@ public abstract class AbstractQueryTest
     {
         QueryBuilder<Person> qb = this.module.newQueryBuilder( Person.class );
         Person person = templateFor( Person.class );
-        Query<Person> query = unitOfWork.newQuery( qb.where( eq( person.mother()
-            .get()
-            .placeOfBirth()
-            .get()
-            .name(), "Kuala Lumpur" ) )
+        Query<Person> query = unitOfWork.newQuery(
+            qb.where( eq( person.mother().get().placeOfBirth().get().name(), "Kuala Lumpur" ) )
         );
         System.out.println( "*** script05: " + query );
         verifyUnorderedResults( query, "Joe Doe" );

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/core/testsupport/src/main/java/org/qi4j/test/indexing/AbstractSpatialQueryTest.java
----------------------------------------------------------------------
diff --git a/core/testsupport/src/main/java/org/qi4j/test/indexing/AbstractSpatialQueryTest.java b/core/testsupport/src/main/java/org/qi4j/test/indexing/AbstractSpatialQueryTest.java
index 7bcc39d..50e0fea 100644
--- a/core/testsupport/src/main/java/org/qi4j/test/indexing/AbstractSpatialQueryTest.java
+++ b/core/testsupport/src/main/java/org/qi4j/test/indexing/AbstractSpatialQueryTest.java
@@ -1,13 +1,21 @@
 package org.qi4j.test.indexing;
 
-import org.junit.Test;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
 import org.qi4j.api.common.Optional;
 import org.qi4j.api.entity.EntityComposite;
-import org.qi4j.api.geometry.*;
-import org.qi4j.api.geometry.internal.Coordinate;
-import org.qi4j.api.geometry.internal.TGeometry;
-import org.qi4j.api.geometry.internal.TLinearRing;
-import org.qi4j.api.injection.scope.Service;
+import org.qi4j.api.geometry.TFeature;
+import org.qi4j.api.geometry.TFeatureCollection;
+import org.qi4j.api.geometry.TLineString;
+import org.qi4j.api.geometry.TMultiPoint;
+import org.qi4j.api.geometry.TMultiPolygon;
+import org.qi4j.api.geometry.TPoint;
+import org.qi4j.api.geometry.TPolygon;
+import org.qi4j.api.geometry.TUnit;
+import org.qi4j.api.geometry.Coordinate;
+import org.qi4j.api.geometry.TGeometry;
+import org.qi4j.api.geometry.TLinearRing;
 import org.qi4j.api.property.Property;
 import org.qi4j.api.query.Query;
 import org.qi4j.api.query.QueryBuilder;
@@ -16,10 +24,6 @@ import org.qi4j.bootstrap.AssemblyException;
 import org.qi4j.bootstrap.ModuleAssembly;
 import org.qi4j.test.indexing.model.City;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
 import static org.qi4j.api.query.QueryExpressions.eq;
 import static org.qi4j.api.query.QueryExpressions.templateFor;
 import static org.qi4j.api.query.grammar.extensions.spatial.SpatialQueryExpressions.ST_GeometryFromText;
@@ -29,7 +33,7 @@ import static org.qi4j.api.query.grammar.extensions.spatial.SpatialQueryExpressi
  * Created by jakes on 2/8/14.
  */
 public class AbstractSpatialQueryTest
-                extends AbstractAnyQueryTest
+    extends AbstractAnyQueryTest
 {
 
     private final String CRS_EPSG_4326 = "EPSG:4326";
@@ -38,71 +42,59 @@ public class AbstractSpatialQueryTest
 
     {
 
-
         @Optional
         Property<Map<String, Object>> properties();
 
         // @Optional
         Property<TGeometry> geometry1();
-
     }
 
-
     public interface MapFeatureEntity
-            extends MapFeature, EntityComposite
+        extends MapFeature, EntityComposite
     {
     }
 
-
     @Override
     public void assemble( ModuleAssembly module )
-            throws AssemblyException
+        throws AssemblyException
     {
         super.assemble( module );
-        module.entities(MapFeatureEntity.class);
+        module.entities( MapFeatureEntity.class );
 
         // internal values
-        module.values(Coordinate.class, TLinearRing.class, TGeometry.class);
+        module.values( Coordinate.class, TLinearRing.class, TGeometry.class );
 
         // API values
-        module.values(TPoint.class, TMultiPoint.class, TLineString.class, TPolygon.class, TMultiPolygon.class, TFeature.class, TFeatureCollection.class);
-        TGeometry tGeometry = module.forMixin(TGeometry.class).declareDefaults();
-        tGeometry.CRS().set(CRS_EPSG_4326);
-
+        module.values( TPoint.class, TMultiPoint.class, TLineString.class, TPolygon.class, TMultiPolygon.class, TFeature.class, TFeatureCollection.class );
+        TGeometry tGeometry = module.forMixin( TGeometry.class ).declareDefaults();
+        tGeometry.CRS().set( CRS_EPSG_4326 );
     }
 
-
-
     // @Test
-    public void whenQueryUseConversion() throws Exception
+    public void whenQueryUseConversion()
+        throws Exception
     {
         // lat, long
-        ST_GeometryFromText("POINT(49.550881 10.712809)");
-
+        ST_GeometryFromText( "POINT(49.550881 10.712809)" );
 
+        QueryBuilder<City> qb = this.module.newQueryBuilder( City.class );
 
-        QueryBuilder<City> qb = this.module.newQueryBuilder(City.class);
-
+        Property<TPoint> cityLocation = templateFor( City.class ).location();
         Query<City> query = unitOfWork.newQuery(
-                qb
-                        .where(
-                                ST_Within
-                                        (
-                                                templateFor(City.class).location(),
-                                                ST_GeometryFromText("POINT(49.550881 10.712809)"),
-                                                100,
-                                                TUnit.METER
-                                        )
-                        ));
-
+            qb.where(
+                ST_Within(
+                    cityLocation,
+                    ST_GeometryFromText( "POINT(49.550881 10.712809)" ),
+                    100,
+                    TUnit.METER
+                )
+            )
+        );
 
         // System.out.println( "*** script01: " + query );
         query.find();
 
-
-
-        System.out.println("Found Cities " + query.count());
-
+        System.out.println( "Found Cities " + query.count() );
 
 //        QueryBuilder<Person> qb = this.module.newQueryBuilder( Person.class );
 //        Person personTemplate = templateFor( Person.class );
@@ -112,8 +104,6 @@ public class AbstractSpatialQueryTest
 //       //  verifyUnorderedResults( query, "Joe Doe", "Ann Doe" );
     }
 
-
-
     // @Test
     public void script11()
     {
@@ -123,53 +113,44 @@ public class AbstractSpatialQueryTest
 //
 //        verifyUnorderedResults( query, "Joe Doe" );
 
-
         QueryBuilder<City> qb = this.module.newQueryBuilder( City.class );
         City cityTemplate = templateFor( City.class );
         //  Query<City> query = unitOfWork.newQuery( qb.where( eq( cityTemplate.location(), "Kuala Lumpur" ) ) );
 
-        ValueBuilder<TPolygon> builder = module.newValueBuilder(TPolygon.class);
+        ValueBuilder<TPolygon> builder = module.newValueBuilder( TPolygon.class );
         TPolygon proto = builder.prototype();
 
         List<List<List<Double>>> coordinates = new ArrayList<List<List<Double>>>();
 
         List<List<Double>> a = new ArrayList<List<Double>>();
-        a.add(new ArrayList<Double>());
-        a.add(new ArrayList<Double>());
-        a.add(new ArrayList<Double>());
-        coordinates.add(a);
+        a.add( new ArrayList<Double>() );
+        a.add( new ArrayList<Double>() );
+        a.add( new ArrayList<Double>() );
+        coordinates.add( a );
 
         List<List<Double>> b = new ArrayList<List<Double>>();
-        b.add(new ArrayList<Double>());
-        b.add(new ArrayList<Double>());
-        a.add(new ArrayList<Double>());
-        coordinates.add(b);
+        b.add( new ArrayList<Double>() );
+        b.add( new ArrayList<Double>() );
+        a.add( new ArrayList<Double>() );
+        coordinates.add( b );
 
         // new ArrayList<List<Double>>().add(new ArrayList<Double>());
 
+        coordinates.get( 0 ).get( 0 ).add( 0.0 );
+        coordinates.get( 0 ).get( 1 ).add( 0.1 );
+        coordinates.get( 0 ).get( 2 ).add( 0.2 );
+        coordinates.get( 0 ).get( 3 ).add( 0.3 );
 
+        coordinates.get( 1 ).get( 1 ).add( 1.1 );
 
-        coordinates.get(0).get(0).add(0.0);
-        coordinates.get(0).get(1).add(0.1);
-        coordinates.get(0).get(2).add(0.2);
-        coordinates.get(0).get(3).add(0.3);
-
-        coordinates.get(1).get(1).add(1.1);
-
-
-       // proto.coordinates().set(coordinates);
-
+        // proto.coordinates().set(coordinates);
 
         //Double lat =  3.138722;  // 3.138722;// Double.parseDouble(query.nextToken());
         //Double lon =  101.386849; // Double.parseDouble(query.nextToken());
 
-
         // coordinates.add(3.138722);
         // coordinates.add(101.386849);
 
-
-
-
 //        proto.coordinates().set(coordinates);
 //
 //        Query<City> query = unitOfWork.newQuery(
@@ -183,7 +164,6 @@ public class AbstractSpatialQueryTest
 //
 //        System.out.println(query.count());
 
-
 //        QueryBuilder<Person> qb = this.module.newQueryBuilder( Person.class );
 //        Person personTemplate = templateFor( Person.class );
 //        City placeOfBirth = personTemplate.placeOfBirth().get();
@@ -201,7 +181,6 @@ public class AbstractSpatialQueryTest
 //
 //        verifyUnorderedResults( query, "Joe Doe" );
 
-
 //        QueryBuilder<City> qb = this.module.newQueryBuilder( City.class );
 //        City cityTemplate = templateFor( City.class );
 //        //  Query<City> query = unitOfWork.newQuery( qb.where( eq( cityTemplate.location(), "Kuala Lumpur" ) ) );
@@ -243,7 +222,6 @@ public class AbstractSpatialQueryTest
 ////       //  verifyUnorderedResults( query, "Joe Doe", "Ann Doe" );
     }
 
-
     // @Test
     public void script3()
     {
@@ -253,20 +231,17 @@ public class AbstractSpatialQueryTest
 //
 //        verifyUnorderedResults( query, "Joe Doe" );
 
-
         QueryBuilder<City> qb = this.module.newQueryBuilder( City.class );
         City cityTemplate = templateFor( City.class );
         Query<City> query = unitOfWork.newQuery( qb.where( eq( cityTemplate.name(), "Kuala Lumpur" ) ) );
 
-
         System.out.println( "*** script02: " + query );
         query.find();
 
-        System.out.println(query.count());
+        System.out.println( query.count() );
 
 //         System.out.println(query.find().locationABC());
 
-
 //        QueryBuilder<Person> qb = this.module.newQueryBuilder( Person.class );
 //        Person personTemplate = templateFor( Person.class );
 //        City placeOfBirth = personTemplate.placeOfBirth().get();
@@ -276,12 +251,13 @@ public class AbstractSpatialQueryTest
     }
 
     //@Test
-    public void script4() throws Exception
+    public void script4()
+        throws Exception
     {
 
-        System.out.println("Script4");
+        System.out.println( "Script4" );
 
-        QueryBuilder<City> qb = this.module.newQueryBuilder(City.class);
+        QueryBuilder<City> qb = this.module.newQueryBuilder( City.class );
         // City cityTemplate = templateFor(City.class);
 
 //        Query<City> query = unitOfWork.newQuery(
@@ -293,7 +269,7 @@ public class AbstractSpatialQueryTest
 //
 //                        ));
 
- //       query.find();
+        //       query.find();
 
     }
 }

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/ElasticSearchFinder.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/ElasticSearchFinder.java b/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/ElasticSearchFinder.java
index 3b59443..12b0f83 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/ElasticSearchFinder.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/ElasticSearchFinder.java
@@ -21,43 +21,36 @@ import org.elasticsearch.action.count.CountRequestBuilder;
 import org.elasticsearch.action.count.CountResponse;
 import org.elasticsearch.action.search.SearchRequestBuilder;
 import org.elasticsearch.action.search.SearchResponse;
-import org.elasticsearch.common.geo.GeoDistance;
 import org.elasticsearch.index.query.AndFilterBuilder;
 import org.elasticsearch.index.query.FilterBuilder;
 import org.elasticsearch.index.query.OrFilterBuilder;
 import org.elasticsearch.index.query.QueryBuilder;
 import org.elasticsearch.search.SearchHit;
-import org.elasticsearch.search.sort.GeoDistanceSortBuilder;
 import org.elasticsearch.search.sort.SortOrder;
 import org.qi4j.api.composite.Composite;
 import org.qi4j.api.entity.EntityReference;
 import org.qi4j.api.geometry.*;
-import org.qi4j.api.geometry.internal.TGeometry;
-import org.qi4j.api.geometry.internal.TLinearRing;
+import org.qi4j.api.geometry.TGeometry;
+import org.qi4j.api.geometry.TLinearRing;
 import org.qi4j.api.injection.scope.Structure;
 import org.qi4j.api.injection.scope.This;
 import org.qi4j.api.mixin.Mixins;
-import org.qi4j.api.property.GenericPropertyInfo;
 import org.qi4j.api.query.grammar.*;
 import org.qi4j.api.query.grammar.extensions.spatial.convert.SpatialConvertSpecification;
 import org.qi4j.api.query.grammar.extensions.spatial.predicate.SpatialPredicatesSpecification;
 import org.qi4j.api.structure.Module;
-import org.qi4j.api.util.Classes;
 import org.qi4j.api.value.ValueComposite;
 import org.qi4j.functional.Function;
 import org.qi4j.functional.Iterables;
 import org.qi4j.functional.Specification;
 import org.qi4j.index.elasticsearch.ElasticSearchFinderSupport.*;
 import org.qi4j.index.elasticsearch.extensions.spatial.ElasticSearchSpatialFinder;
-import org.qi4j.index.elasticsearch.extensions.spatial.functions.convert.ConvertFinderSupport;
-import org.qi4j.index.elasticsearch.extensions.spatial.functions.predicates.PredicateFinderSupport;
 import org.qi4j.index.elasticsearch.extensions.spatial.internal.InternalUtils;
 import org.qi4j.spi.query.EntityFinder;
 import org.qi4j.spi.query.EntityFinderException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.lang.reflect.Type;
 import java.util.HashMap;
 import java.util.Map;
 

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/ElasticSearchIndexer.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/ElasticSearchIndexer.java b/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/ElasticSearchIndexer.java
index dee2e26..3981f1a 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/ElasticSearchIndexer.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/ElasticSearchIndexer.java
@@ -25,7 +25,7 @@ import org.json.JSONObject;
 import org.qi4j.api.association.AssociationDescriptor;
 import org.qi4j.api.entity.EntityDescriptor;
 import org.qi4j.api.entity.EntityReference;
-import org.qi4j.api.geometry.internal.TGeometry;
+import org.qi4j.api.geometry.TGeometry;
 import org.qi4j.api.injection.scope.Service;
 import org.qi4j.api.injection.scope.Structure;
 import org.qi4j.api.injection.scope.This;

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/ElasticSearchSpatialIndexer.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/ElasticSearchSpatialIndexer.java b/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/ElasticSearchSpatialIndexer.java
index c51f31d..2b79993 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/ElasticSearchSpatialIndexer.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/ElasticSearchSpatialIndexer.java
@@ -22,7 +22,7 @@ import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
 import org.qi4j.api.geometry.*;
-import org.qi4j.api.geometry.internal.TGeometry;
+import org.qi4j.api.geometry.TGeometry;
 import org.qi4j.api.structure.Module;
 import org.qi4j.index.elasticsearch.ElasticSearchIndexException;
 import org.qi4j.index.elasticsearch.ElasticSearchSupport;

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/configuration/SpatialFunctionsSupportMatrix.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/configuration/SpatialFunctionsSupportMatrix.java b/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/configuration/SpatialFunctionsSupportMatrix.java
index 90810f3..1d9f7cb 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/configuration/SpatialFunctionsSupportMatrix.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/configuration/SpatialFunctionsSupportMatrix.java
@@ -18,7 +18,7 @@ import com.google.common.collect.HashBasedTable;
 import com.google.common.collect.Table;
 import org.qi4j.api.geometry.TPoint;
 import org.qi4j.api.geometry.TPolygon;
-import org.qi4j.api.geometry.internal.TGeometry;
+import org.qi4j.api.geometry.TGeometry;
 import org.qi4j.api.query.grammar.extensions.spatial.predicate.ST_DisjointSpecification;
 import org.qi4j.api.query.grammar.extensions.spatial.predicate.ST_IntersectsSpecification;
 import org.qi4j.api.query.grammar.extensions.spatial.predicate.ST_WithinSpecification;

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/functions/predicates/ST_Disjoint.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/functions/predicates/ST_Disjoint.java b/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/functions/predicates/ST_Disjoint.java
index 5603bb5..5b3ab50 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/functions/predicates/ST_Disjoint.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/functions/predicates/ST_Disjoint.java
@@ -20,7 +20,7 @@ import org.elasticsearch.index.query.FilterBuilders;
 import org.elasticsearch.index.query.GeoPolygonFilterBuilder;
 import org.qi4j.api.geometry.TPoint;
 import org.qi4j.api.geometry.TPolygon;
-import org.qi4j.api.geometry.internal.TGeometry;
+import org.qi4j.api.geometry.TGeometry;
 import org.qi4j.api.query.grammar.extensions.spatial.predicate.ST_DisjointSpecification;
 import org.qi4j.api.query.grammar.extensions.spatial.predicate.SpatialPredicatesSpecification;
 import org.qi4j.api.structure.Module;

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/functions/predicates/ST_Intersects.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/functions/predicates/ST_Intersects.java b/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/functions/predicates/ST_Intersects.java
index a13f1b4..a150ce8 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/functions/predicates/ST_Intersects.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/functions/predicates/ST_Intersects.java
@@ -20,7 +20,7 @@ import org.elasticsearch.index.query.FilterBuilders;
 import org.elasticsearch.index.query.GeoPolygonFilterBuilder;
 import org.qi4j.api.geometry.TPoint;
 import org.qi4j.api.geometry.TPolygon;
-import org.qi4j.api.geometry.internal.TGeometry;
+import org.qi4j.api.geometry.TGeometry;
 import org.qi4j.api.query.grammar.extensions.spatial.predicate.ST_DisjointSpecification;
 import org.qi4j.api.query.grammar.extensions.spatial.predicate.ST_IntersectsSpecification;
 import org.qi4j.api.query.grammar.extensions.spatial.predicate.SpatialPredicatesSpecification;

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/functions/predicates/ST_Within.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/functions/predicates/ST_Within.java b/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/functions/predicates/ST_Within.java
index 1516038..903a0ac 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/functions/predicates/ST_Within.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/functions/predicates/ST_Within.java
@@ -20,7 +20,7 @@ import org.elasticsearch.index.query.FilterBuilders;
 import org.elasticsearch.index.query.GeoPolygonFilterBuilder;
 import org.qi4j.api.geometry.TPoint;
 import org.qi4j.api.geometry.TPolygon;
-import org.qi4j.api.geometry.internal.TGeometry;
+import org.qi4j.api.geometry.TGeometry;
 import org.qi4j.api.query.grammar.extensions.spatial.predicate.ST_WithinSpecification;
 import org.qi4j.api.query.grammar.extensions.spatial.predicate.SpatialPredicatesSpecification;
 import org.qi4j.api.structure.Module;

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/internal/AbstractElasticSearchSpatialFunction.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/internal/AbstractElasticSearchSpatialFunction.java b/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/internal/AbstractElasticSearchSpatialFunction.java
index efcb425..16c61a9 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/internal/AbstractElasticSearchSpatialFunction.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/internal/AbstractElasticSearchSpatialFunction.java
@@ -25,8 +25,8 @@ import org.qi4j.api.composite.Composite;
 import org.qi4j.api.geometry.TPoint;
 import org.qi4j.api.geometry.TPolygon;
 import org.qi4j.api.geometry.TUnit;
-import org.qi4j.api.geometry.internal.TCircle;
-import org.qi4j.api.geometry.internal.TGeometry;
+import org.qi4j.api.geometry.TCircle;
+import org.qi4j.api.geometry.TGeometry;
 import org.qi4j.api.property.GenericPropertyInfo;
 import org.qi4j.api.query.grammar.PropertyFunction;
 import org.qi4j.api.query.grammar.extensions.spatial.convert.SpatialConvertSpecification;

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/c1d327e2/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/internal/InternalUtils.java
----------------------------------------------------------------------
diff --git a/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/internal/InternalUtils.java b/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/internal/InternalUtils.java
index 8b2aa0e..42f2eda 100644
--- a/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/internal/InternalUtils.java
+++ b/extensions/indexing-elasticsearch/src/main/java/org/qi4j/index/elasticsearch/extensions/spatial/internal/InternalUtils.java
@@ -15,7 +15,7 @@
 package org.qi4j.index.elasticsearch.extensions.spatial.internal;
 
 import org.qi4j.api.geometry.*;
-import org.qi4j.api.geometry.internal.TGeometry;
+import org.qi4j.api.geometry.TGeometry;
 import org.qi4j.api.property.GenericPropertyInfo;
 import org.qi4j.api.query.grammar.PropertyFunction;
 import org.qi4j.api.util.Classes;


Mime
View raw message