Hermes@Neo4j
Neo4jSpatiotemporal.TemporalGeometryEncoder Interface Reference
Inheritance diagram for Neo4jSpatiotemporal.TemporalGeometryEncoder:
Neo4jSpatiotemporal.Hybrid3DRTree.IndexEnvelopeDecoder Neo4jSpatiotemporal.AbstractTemporalGeometryEncoder Neo4jSpatiotemporal.Encoders.EpisodeEncoder Neo4jSpatiotemporal.Encoders.SemanticTrajectoryEncoder Neo4jSpatiotemporal.Encoders.TemporalPointEncoder Neo4jSpatiotemporal.WKBTemporalGeometryEncoder Neo4jSpatiotemporal.WKTTemporalGeometryEncoder

Public Member Functions

void init (LayerST layer)
 
void encodeGeometry (Geometry geometry, PropertyContainer container)
 
Geometry decodeGeometry (PropertyContainer container)
 
boolean hasAttribute (Node geomNode, String name)
 
Object getAttribute (Node geomNode, String name)
 
- Public Member Functions inherited from Neo4jSpatiotemporal.Hybrid3DRTree.IndexEnvelopeDecoder
IndexEnvelope decodeEnvelope (PropertyContainer container)
 

Detailed Description

Implementations of this interface define custom approaches to storing geometries in the database graph. There are two primary approaches:

In-node This approach makes use of properties of an individual node to store the geometry. The built-in WKT and WKB encoders use this approach, but a custom encoder that simply stored a float[] of coordinates for a LineString would also be classed here.

Sub-graph This approach makes use of a graph of nodes and relationships to describe a single geometry. This could be as simple as a chain of nodes representing a LineString or a complex nested graph like the OSM approach to MultiPolygons. Classes that implement this interface must have a public constructor taking no parameters, and should be able to interface to the Layer class using the init(Layer) method. When a new Layer is created, it is a single node that has a property containing the class name of the GeometryEncoder, and if the Layer needs to be read later, that node will be read, and a Layer created from it, and the Layer will create an instance of the required GeometryEncoder, which in turn should be capable of reading and writing all Geometries supported by that Layer.

Member Function Documentation

Geometry Neo4jSpatiotemporal.TemporalGeometryEncoder.decodeGeometry ( PropertyContainer  container)

This method is called on an individual container when we need to extract the geometry. If the container is a node, this could be the root of a sub-graph containing the geometry.

Parameters
container
Returns

Implemented in Neo4jSpatiotemporal.Encoders.SemanticTrajectoryEncoder, Neo4jSpatiotemporal.Encoders.EpisodeEncoder, Neo4jSpatiotemporal.Encoders.TemporalPointEncoder, Neo4jSpatiotemporal.WKBTemporalGeometryEncoder, and Neo4jSpatiotemporal.WKTTemporalGeometryEncoder.

void Neo4jSpatiotemporal.TemporalGeometryEncoder.encodeGeometry ( Geometry  geometry,
PropertyContainer  container 
)

This method is called to store a geometry object to the database. It should write it to the container supplied. If the container is a node, it can be the root of an entire sub-graph.

Parameters
geometry
container

Implemented in Neo4jSpatiotemporal.AbstractTemporalGeometryEncoder.

Object Neo4jSpatiotemporal.TemporalGeometryEncoder.getAttribute ( Node  geomNode,
String  name 
)

Each geometry might have a set of associated attributes, or properties. These are seen as a map of String to Object types, where the Objects should be primitives or Strings. This can be encoded as properties of the geometry node itself (default behaviour), or stored in the graph in some other way.

Parameters
geomNode
attributeto test
Returns

Implemented in Neo4jSpatiotemporal.AbstractTemporalGeometryEncoder.

boolean Neo4jSpatiotemporal.TemporalGeometryEncoder.hasAttribute ( Node  geomNode,
String  name 
)

Each geometry might have a set of associated attributes, or properties. These are seen as a map of String to Object types, where the Objects should be primitives or Strings. This can be encoded as properties of the geometry node itself (default behaviour), or stored in the graph in some other way.

Parameters
geomNode
attributeto test
Returns

Implemented in Neo4jSpatiotemporal.AbstractTemporalGeometryEncoder.

void Neo4jSpatiotemporal.TemporalGeometryEncoder.init ( LayerST  layer)

When accessing an existing layer, the Layer is constructed from a single node in the graph that represents a layer. This node is expected to have a property containing the class name of the GeometryEncoder for that layer, and it will be constructed and passed the layer using this method, allowing the Layer and the GeometryEncoder to interact.

Parameters
layerrecently created Layer class

Implemented in Neo4jSpatiotemporal.AbstractTemporalGeometryEncoder.


The documentation for this interface was generated from the following file: