@Retention(value=RUNTIME) public @interface GeospatialPathIndexProperty
Use this annotation to specify that a Geospatial Path Index is needed for this pojo property. The value should follow the rules for any Geospatial Path Index in MarkLogic Server with coordinate system “wgs84” and point format “point”. Specifically, the value should be in “{latititude} {longitude}” point format where {latitude} and {longitude} are numeric geospatial wgs84 position values.
This annotation can be associated with a public field:
import com.marklogic.client.pojo.annotation.GeospatialPathIndexProperty; public class MyClass { @GeospatialPathIndexProperty public String myGeoProperty; }
or with a public getter method:
public class MyClass { private String myGeoProperty; @GeospatialPathIndexProperty public String getMyGeoProperty() { return myGeoProperty; } // … setter methods … }
or with a public setter method:
public class MyClass { private String myGeoProperty; // … getter methods … @GeospatialPathIndexProperty public void setMyGeoProperty(String myGeoProperty) { this.myGeoProperty = myGeoProperty; } } Run GenerateIndexConfig to generate a package that can be used by administrators to create the indexes in MarkLogic Server.Copyright © 2013-2017 MarkLogic Corporation.