Search in sources :

Example 1 with TemporalPosition

use of org.opengis.temporal.TemporalPosition in project geotoolkit by Geomatys.

the class DefaultTemporalFactory method createInstant.

/**
 * {@inheritDoc }
 */
@Override
public Instant createInstant(final Date instant) {
    final Map<String, Object> prop = new HashMap<>();
    prop.put(IdentifiedObject.NAME_KEY, "instant" + instantCount++);
    if (instant != null) {
        return new DefaultInstant(prop, instant);
    } else {
        final TemporalPosition position = new DefaultTemporalPosition(IndeterminateValue.UNKNOWN);
        return new DefaultInstant(prop, position);
    }
}
Also used : HashMap(java.util.HashMap) DefaultTemporalPosition(org.geotoolkit.temporal.object.DefaultTemporalPosition) TemporalPosition(org.opengis.temporal.TemporalPosition) DefaultInstant(org.geotoolkit.temporal.object.DefaultInstant) IdentifiedObject(org.opengis.referencing.IdentifiedObject) InternationalString(org.opengis.util.InternationalString) DefaultTemporalPosition(org.geotoolkit.temporal.object.DefaultTemporalPosition)

Aggregations

HashMap (java.util.HashMap)1 DefaultInstant (org.geotoolkit.temporal.object.DefaultInstant)1 DefaultTemporalPosition (org.geotoolkit.temporal.object.DefaultTemporalPosition)1 IdentifiedObject (org.opengis.referencing.IdentifiedObject)1 TemporalPosition (org.opengis.temporal.TemporalPosition)1 InternationalString (org.opengis.util.InternationalString)1