All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nedap.archie.serializer.adl.constraints.CDurationSerializer Maven / Gradle / Ivy

There is a newer version: 3.12.0
Show newest version
package com.nedap.archie.serializer.adl.constraints;


import com.nedap.archie.aom.primitives.CDuration;
import com.nedap.archie.datetime.DateTimeSerializerFormatters;
import com.nedap.archie.serializer.adl.ADLDefinitionSerializer;

import java.time.temporal.TemporalAmount;

/**
 * @author Marko Pipan
 */
public class CDurationSerializer extends CTemporalSerializer {
    public CDurationSerializer(ADLDefinitionSerializer serializer) {
        super(serializer);
    }

    @Override
    protected String serializeConstraintValue(Object value) {
        // value is always a TemporalAmount
        return DateTimeSerializerFormatters.serializeDuration((TemporalAmount) value);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy