Package nz.org.riskscape.engine.relation
Class CsvRelation
java.lang.Object
nz.org.riskscape.engine.relation.BaseRelation
nz.org.riskscape.engine.relation.CsvRelation
- All Implemented Interfaces:
AutoCloseable,nz.org.riskscape.engine.data.SelfDescribingScalarData,nz.org.riskscape.engine.pipeline.Realized,nz.org.riskscape.engine.relation.Relation
public class CsvRelation
extends nz.org.riskscape.engine.relation.BaseRelation
Native CSV support for a relation. Mostly here to allow CSV files without geometry to be used in queries in support of the table model template - https://bugs.riskscape.org.nz/issues/192
-
Nested Class Summary
Nested classes/interfaces inherited from class nz.org.riskscape.engine.relation.BaseRelation
nz.org.riskscape.engine.relation.BaseRelation.Fields, nz.org.riskscape.engine.relation.BaseRelation.Transformer -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.commons.io.ByteOrderMark[]static final StringName of magic line number struct member that is included inTuples when aCsvRelationis constructed with includeLineNumbers.Fields inherited from class nz.org.riskscape.engine.relation.BaseRelation
skipOnInvalid, transformers -
Method Summary
Modifier and TypeMethodDescriptionprotected CsvRelationclone(nz.org.riskscape.engine.relation.BaseRelation.Fields baseFields) static CsvRelationfromBytes(byte[] bytes) static CsvRelationfromBytes(byte[] bytes, boolean includeLineNumbers) Construct a newCsvRelationfrom the given bytes, assumed to be in the platform default character set.static CsvRelationstatic CsvRelationConstruct a newCsvRelationfrom the given urlstatic nz.org.riskscape.engine.types.Structnz.org.riskscape.engine.relation.TupleIteratorsize()Methods inherited from class nz.org.riskscape.engine.relation.BaseRelation
cloneWithProjectionIfSupported, cloneWithRestrictionIfSupported, cloneWithTransformer, getLimit, getOffset, getProducedType, getRawType, getSpatialMetadata, hasSkipOnInvalid, iterator, limitAndOffset, project, restrict, skipInvalid, skipOrThrow, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface nz.org.riskscape.engine.pipeline.Realized
closeMethods inherited from interface nz.org.riskscape.engine.relation.Relation
calculateBounds, getScalarDataType, getType, limit, offset, stream, toTupleInput
-
Field Details
-
LINE_NUM_KEY
Name of magic line number struct member that is included in
Tuples when aCsvRelationis constructed with includeLineNumbers.- See Also:
-
ACCEPTED_BOMS
public static final org.apache.commons.io.ByteOrderMark[] ACCEPTED_BOMS
-
-
Method Details
-
fromUrl
-
fromUrl
Construct a new
CsvRelationfrom the given url -
fromBytes
-
fromBytes
Construct a new
CsvRelationfrom the given bytes, assumed to be in the platform default character set. relation. -
inferType
-
rawIterator
public nz.org.riskscape.engine.relation.TupleIterator rawIterator()- Specified by:
rawIteratorin classnz.org.riskscape.engine.relation.BaseRelation
-
getSourceInformation
-
clone
- Specified by:
clonein classnz.org.riskscape.engine.relation.BaseRelation
-
size
-
getSourceDescription
-