com.nedap.archie.serializer.adl.constraints.CDurationSerializer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of aom Show documentation
Show all versions of aom Show documentation
An OpenEHR archetype object model implementation, plus parser
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