public abstract class AreaCoord<DG extends DataGeom> extends Object implements Coord
The serialisation to floating point array is in three parts:
getAreaDataGeom(DG)
method must be used.Modifier and Type | Field and Description |
---|---|
static AreaCoord<PlaneDataGeom> |
PLANE_COORD
Instance for use with Plane plot type.
|
static AreaCoord<SkyDataGeom> |
SKY_COORD
Instance for use with Sky plot type.
|
static AreaCoord<SphereDataGeom> |
SPHERE_COORD
Instance for use with Sphere plot type.
|
Modifier and Type | Method and Description |
---|---|
static AreaCoord<PlaneDataGeom> |
createPlaneCoord(InputMeta meta,
boolean isRequired)
Constructs a custom AreaCoord instance for use with Plane plot type.
|
static AreaCoord<SkyDataGeom> |
createSkyCoord(InputMeta meta,
boolean isRequired)
Constructs a custom AreaCoord instance for use with Sky plot type.
|
static AreaCoord<SphereDataGeom> |
createSphereCoord(InputMeta meta,
boolean isRequired)
Constructs a custom AreaCoord instance for use with Sphere plot type.
|
abstract DG |
getAreaDataGeom(DG baseGeom)
Returns a DataGeom that can be used to read position data from
objects serialized by this coordinate.
|
Input[] |
getInputs()
Returns specifications of the one or more input values the user
supplies to provide the data values for this coord.
|
StorageType |
getStorageType()
Returns a code indicating how the quantity defined by this
object is stored internally and presented to the plotting classes.
|
java.util.function.Function<Object[],double[]> |
inputStorage(ValueInfo[] infos,
DomainMapper[] dms)
Provides a function to turn a quantity in the user view to
a plotting view object.
|
boolean |
isRequired()
Indicates whether this item must have a non-blank value in order
for a plot to be possible.
|
Area |
readAreaCoord(Tuple tuple,
int icol)
Reads an Area value from an appropriate field in a given Tuple.
|
protected abstract void |
writeDataPos(Area area,
double[] dpos)
Writes the position in data coordinates of the characteristic
(typically central) point of a given area object into the start
of a supplied array.
|
public static final AreaCoord<PlaneDataGeom> PLANE_COORD
public static final AreaCoord<SkyDataGeom> SKY_COORD
public static final AreaCoord<SphereDataGeom> SPHERE_COORD
protected abstract void writeDataPos(Area area, double[] dpos)
area
- area objectdpos
- coordinate array into which characteristic position
data coords are writtenpublic abstract DG getAreaDataGeom(DG baseGeom)
baseGeom
- DataGeom instance providing context behaviourpublic Input[] getInputs()
Coord
public StorageType getStorageType()
Coord
getStorageType
in interface Coord
public boolean isRequired()
Coord
isRequired
in interface Coord
public java.util.function.Function<Object[],double[]> inputStorage(ValueInfo[] infos, DomainMapper[] dms)
Coord
The supplied infos
and domainMappers
arrays correspond to
(have the same length as) this object's Inputs array,
and may influence the return values. However, Coord instances
that always behave the same way (for instance whose Input Domains
have fixed DomainMappers) are free to ignore these arguments.
The returned function converts an array of per-input user values
to a storable object of the type corresponding to the result of
Coord.getStorageType()
; the return value of the returned function
is never null.
inputStorage
in interface Coord
infos
- per-input array of column input metadatadms
- per-input array of input value->domain value
mapperspublic Area readAreaCoord(Tuple tuple, int icol)
tuple
- tuplepublic static AreaCoord<PlaneDataGeom> createPlaneCoord(InputMeta meta, boolean isRequired)
meta
- user coordinate metadataisRequired
- true iff this coordinate is required for plotpublic static AreaCoord<SkyDataGeom> createSkyCoord(InputMeta meta, boolean isRequired)
meta
- user coordinate metadataisRequired
- true iff this coordinate is required for plotpublic static AreaCoord<SphereDataGeom> createSphereCoord(InputMeta meta, boolean isRequired)
meta
- user coordinate metadataisRequired
- true iff this coordinate is required for plotCopyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.