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
Modifier and TypeFieldDescriptionstatic final org.apache.commons.io.ByteOrderMark[]
static final String
Name of magic line number struct member that is included inTuple
s when aCsvRelation
is constructed with includeLineNumbers.Fields inherited from class nz.org.riskscape.engine.relation.BaseRelation
skipOnInvalid, transformers
-
Method Summary
Modifier and TypeMethodDescriptionprotected CsvRelation
clone
(nz.org.riskscape.engine.relation.BaseRelation.Fields baseFields) static CsvRelation
fromBytes
(byte[] bytes) static CsvRelation
fromBytes
(byte[] bytes, boolean includeLineNumbers) Construct a newCsvRelation
from the given bytes, assumed to be in the platform default character set.static CsvRelation
static CsvRelation
Construct a newCsvRelation
from the given urlstatic nz.org.riskscape.engine.types.Struct
nz.org.riskscape.engine.relation.TupleIterator
size()
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, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface nz.org.riskscape.engine.pipeline.Realized
close
Methods 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
Tuple
s when aCsvRelation
is constructed with includeLineNumbers.- See Also:
-
ACCEPTED_BOMS
public static final org.apache.commons.io.ByteOrderMark[] ACCEPTED_BOMS
-
-
Method Details
-
fromUrl
-
fromUrl
Construct a new
CsvRelation
from the given url -
fromBytes
-
fromBytes
Construct a new
CsvRelation
from 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:
rawIterator
in classnz.org.riskscape.engine.relation.BaseRelation
-
getSourceInformation
-
clone
- Specified by:
clone
in classnz.org.riskscape.engine.relation.BaseRelation
-
size
-
getSourceDescription
-