com.nedap.archie.xml.adapters.TimeXmlAdapter 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.xml.adapters;
import com.nedap.archie.adlparser.treewalkers.TemporalConstraintParser;
import com.nedap.archie.datetime.DateTimeParsers;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import java.time.temporal.TemporalAccessor;
/**
* Created by pieter.bos on 24/06/16.
*/
public class TimeXmlAdapter extends XmlAdapter {
@Override
public TemporalAccessor unmarshal(String stringValue) {
return stringValue != null? DateTimeParsers.parseTimeValue(stringValue):null;
}
@Override
public String marshal(TemporalAccessor value) {
return value.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy