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

com.glookast.commons.timecode.xml.XmlAdapterTimecode Maven / Gradle / Ivy

There is a newer version: 2.0.3
Show newest version
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));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy