public interface Domain<M extends DomainMapper>
DomainMapper
interface, provided by the table input handler or the user,
to untangle different possible representations of physical values
in input data.
See the available instances of this interface such as
TimeDomain
for better understanding of how it works.
DomainMapper
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDomainName()
Returns the name of this domain.
|
M[] |
getMappers()
Returns a list of all mappers known to map values to this domain.
|
M |
getPossibleMapper(ValueInfo info)
Returns a typed DomainMapper that can be used
for data described by the given metadata object.
|
M |
getProbableMapper(ValueInfo info)
Returns a typed DomainMapper that is likely to be appropriate
for data described by the given metadata object.
|
java.lang.String getDomainName()
M[] getMappers()
M getProbableMapper(ValueInfo info)
In general, implementations of this method will first check the
ValueInfo.getDomainMappers()
method.
If it is doubtful how to map from the given info to this domain,
null should be returned.
info
- metadata describing data to be mappedM getPossibleMapper(ValueInfo info)
If the result of getProbableMapper(uk.ac.starlink.table.ValueInfo)
is non-null,
then this method must also return non-null, but this method
is not required to return the same value as
getProbableMapper
.
info
- metadata describing data to be mapped