Package nz.org.riskscape.engine.relation
Class EmptyRelation
java.lang.Object
nz.org.riskscape.engine.relation.EmptyRelation
- All Implemented Interfaces:
AutoCloseable
,SelfDescribingScalarData
,Realized
,Relation
A relation that has no values, just a type. Mostly useful for testing.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
getLimit()
long
getType()
boolean
iterator()
limitAndOffset
(long newLimit, long newOffset) Returns a new relation that yields a subset of tuples this relation would normally return.project
(Projection projection) restrict
(Restriction restriction) size()
Get a rough count of the untransformed tuples in the relation.skipInvalid
(ProblemSink sendProblemsTo) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface nz.org.riskscape.engine.relation.Relation
calculateBounds, getScalarDataType, getSpatialMetadata, limit, offset, stream
-
Constructor Details
-
EmptyRelation
-
-
Method Details
-
getType
-
iterator
-
project
-
restrict
-
skipInvalid
- Specified by:
skipInvalid
in interfaceRelation
- Returns:
- a new relation that skips rows that are invalid for some reason TODO consider whether we need some sort of 'cloneWithOptions' method, that returns a new relation if the options are supported
-
getSourceInformation
- Specified by:
getSourceInformation
in interfaceRelation
-
limitAndOffset
Description copied from interface:Relation
Returns a new relation that yields a subset of tuples this relation would normally return. This should apply after any filtering that's applied to the relation, even if those filters are applied after a limit and offset.
- Specified by:
limitAndOffset
in interfaceRelation
- Returns:
- a new Relation with the limit and offset applied
-
getLimit
public long getLimit() -
getOffset
public long getOffset() -
size
Description copied from interface:Relation
Get a rough count of the untransformed tuples in the relation. This may include tuples that are skipped because they are invalid or removed by a
filter
bookmark parameter. A rule of thumb is this should match the number of tuples produced byBaseRelation#rawIterator()
. -
hasSkipOnInvalid
public boolean hasSkipOnInvalid()- Specified by:
hasSkipOnInvalid
in interfaceRelation
- Returns:
- true if invalid rows will be skipped for this relation
-