User user = getUser(request);
Authorizations authorizations = getAuthorizations(request, user);
String workspaceId = getActiveWorkspaceId(request);
ClientApiVertexSearchResponse results = new ClientApiVertexSearchResponse();
for (OntologyProperty property : this.ontologyRepository.getProperties()) {
if (property.getDataType() != PropertyType.GEO_LOCATION) {
continue;
}
Iterable<Vertex> vertices = graph.query(authorizations).
has(property.getTitle(), GeoCompare.WITHIN, new GeoCircle(latitude, longitude, radius)).
vertices();
for (Vertex vertex : vertices) {
results.getVertices().add(ClientApiConverter.toClientApiVertex(vertex, workspaceId, authorizations));
}
}
respondWithClientApiObject(response, results);
}