# Interface DomainMapper

All Known Implementing Classes:
  `TimeMapper`

public interface DomainMapper
Marker interface for objects that can map input values to a particular common value domain. Abstract sub-types of this interface will reference a particular target `Domain` and provide abstract methods for conversions to that domain. A concrete implementation of one of those sub-types will provide the actual conversion methods for a particular type of input data.

Table input handlers can provide typed DomainMapper instances as part of the table metadata they construct (see the `ValueInfo.getDomainMappers()` method), as a way to communicate format-specific information about the intended semantics and conversion mechanisms of columns or parameters to users of the table.

Since:
  15 Aug 2013
Author:
  Mark Taylor
See Also:
  - `Domain`

## Method Summary

Modifier and Type
Method
Description
`Class<?>`
`getSourceClass()`
Returns the type of values from which this mapper instance can convert.
`String`
`getSourceDescription()`
Returns a description of the type of source values which this mapper can convert from.
`String`
`getSourceName()`
Returns a short name for the type of source values which this mapper can convert from.
`Domain<?>`
`getTargetDomain()`
Returns the target domain of this mapper.

## Method Details

### getTargetDomain

Domain<?> getTargetDomain()
Returns the target domain of this mapper. An abstract DomainMapper sub-type should normally implement this as a final method with a fixed return value.

Returns:
  domain identifier

### getSourceClass

Class<?> getSourceClass()
Returns the type of values from which this mapper instance can convert. This should be as specific as possible to cover all the possible options, but in some cases that may mean it has simply to return `Object.class`.

Returns:
  class of mappable source objects to which this mapper can be applied

### getSourceName

String getSourceName()
Returns a short name for the type of source values which this mapper can convert from.

Returns:
  mapper source type name

### getSourceDescription

String getSourceDescription()
Returns a description of the type of source values which this mapper can convert from.

Returns:
  mapper source type description