@Retention(value=RUNTIME)
public @interface GeospatialLongitude
GeospatialLatitude
on a
sibling property to specify that a Geospatial Element Pair Index is needed
for these pojo properties. The value should follow the rules
for any Geospatial Element Pair Index in MarkLogic Server with coordinate
system "wgs84".
This annotation can be associated with a public field:
import com.marklogic.client.pojo.annotation.GeospatialLatitude; import com.marklogic.client.pojo.annotation.GeospatialLongitude; public class MyClass { @GeospatialLatitude public String latitude; @GeospatialLongitude public String longitude; }or with a public getter method:
public class MyClass { private String latitude; private String longitude; @GeospatialLatitude public String getLatitude() { return latitude; } @GeospatialLongitude public String getLongitude() { return longitude; } // ... setter methods ... }or with a public setter method:
public class MyClass { private String latitude; private String longitude; // ... getter methods ... @GeospatialLatitude public void setLatitude(String latitude) { this.latitude = latitude; } @GeospatialLongitude public void setLongitude(String longitude) { this.longitude = longitude; } }Run
GenerateIndexConfig
to generate
a package that can be used by administrators to create the indexes in
MarkLogic Server.Copyright © 2013-2020 MarkLogic Corporation.