Package nz.org.riskscape.engine.output
Class StructFlattener
java.lang.Object
nz.org.riskscape.engine.output.StructFlattener
Flattens nested Structs to allow them to be written to data sources that don't support nested data
structures.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNamer that produces a name that is taken fromStruct.StructMember.getKey()for each segment and separated by a '.'.static classAStructFlattener.Namerthat will use theStruct.StructMember.getKey()from the last segment as the name.static interfaceA Namer can provide a name for the given segments.static class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionflatten(nz.org.riskscape.engine.types.Struct struct) flatten(nz.org.riskscape.engine.types.Struct struct, StructFlattener.Namer namer) voidshortenIfNecessary(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.Namerthat does this itself. This method is only retained for use by ShapefileWriter V1.Shorten
StructFlattener.StructMapping.keyif it is longer than maxLength.
-
StructFlattener.Namerthat does this itself.