com.glookast.commons.timecode.xml.XmlAdapterTimecode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commons-timecode Show documentation
Show all versions of commons-timecode Show documentation
XML base schemas used for interfacing with Glookast Products
package com.glookast.commons.timecode.xml;
import com.glookast.commons.timecode.AbstractTimecode;
import com.glookast.commons.timecode.Timecode;
import javax.xml.bind.annotation.adapters.XmlAdapter;
public class XmlAdapterTimecode extends XmlAdapter
{
@Override
public Timecode unmarshal(String value) throws Exception
{
try {
return (Timecode.valueOf(value));
} catch (Exception ex) {
}
return null;
}
@Override
public String marshal(Timecode value) throws Exception
{
return (AbstractTimecode.toString(value, AbstractTimecode.StringType.STORAGE));
}
}