Package nz.org.riskscape.engine.output
Class StructFlattener
java.lang.Object
nz.org.riskscape.engine.output.StructFlattener
Flattens nested Struct
s to allow them to be written to data sources that don't support nested data
structures.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Namer that produces a name that is taken fromStruct.StructMember.getKey()
for each segment and separated by a '.'.static class
AStructFlattener.Namer
that will use theStruct.StructMember.getKey()
from the last segment as the name.static interface
A Namer can provide a name for the given segments.static class
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionflatten
(nz.org.riskscape.engine.types.Struct struct) flatten
(nz.org.riskscape.engine.types.Struct struct, StructFlattener.Namer namer) void
shortenIfNecessary
(List<StructFlattener.StructMapping> mappings, int maxLength) Deprecated.
-
Field Details
-
SEPARATOR
- See Also:
-
-
Constructor Details
-
StructFlattener
public StructFlattener()
-
-
Method Details
-
flatten
-
flatten
public List<StructFlattener.StructMapping> flatten(nz.org.riskscape.engine.types.Struct struct, StructFlattener.Namer namer) -
shortenIfNecessary
@Deprecated public void shortenIfNecessary(List<StructFlattener.StructMapping> mappings, int maxLength) Deprecated.Ideally use aStructFlattener.Namer
that does this itself. This method is only retained for use by ShapefileWriter V1.Shorten
StructFlattener.StructMapping.key
if it is longer than maxLength.
-
StructFlattener.Namer
that does this itself.