Interface Projector
- All Superinterfaces:
AutoCloseable
,Function<Tuple,
,Tuple> Realized
Realized Projection
of one Struct
to another. Exists so that a Projection's projection function can
be associated with other metadata, such as the source and target Struct
and a possible mapping of attributes
from one to the other.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Map<List<Struct.StructMember>,
List<Struct.StructMember>> The exactStruct
object that is expected to be seen by theFunction.apply(java.lang.Object)
default Optional<Function<SpatialMetadata,
SpatialMetadata>> An optional function used for transforming spatial metadata from source to target.static Map<List<Struct.StructMember>,
List<Struct.StructMember>> identityMapping
(Struct struct) static String
join
(List<Struct.StructMember> members)
-
Method Details
-
join
-
identityMapping
-
getProjectedType
Struct getProjectedType() -
getSourceType
Struct getSourceType()The exact
Struct
object that is expected to be seen by theFunction.apply(java.lang.Object)
-
getDirectMapping
- Returns:
- a map that can be used to trace attributes from the target type (the key set) back to their source type (value set). Optional, as this is here to allow various optimisations to be applied to queries. Not implementing this method will prevent various optimisations for being possible.
-
getSpatialMetadataMapper
An optional function used for transforming spatial metadata from source to target. If left out, spatial metadata is lost during projection. A default, fairly sane implementation exists that copies the CRS and picks the single geometry member that was found at the top level of the projectors projected type.
-
getDirectMappingStrings
- Returns:
- a human-readable version of
getDirectMapping()
, useful for debug statements, test assertions etc
-