Package com.documents4j.ws

Source Code of com.documents4j.ws.DocumentTypeAdapter

package com.documents4j.ws;

import com.documents4j.api.DocumentType;

import javax.xml.bind.annotation.adapters.XmlAdapter;

public class DocumentTypeAdapter extends XmlAdapter<AdaptedDocumentType, DocumentType> {

    @Override
    public DocumentType unmarshal(AdaptedDocumentType adapted) throws Exception {
        return new DocumentType(adapted.getType(), adapted.getSubtype());
    }

    @Override
    public AdaptedDocumentType marshal(DocumentType original) throws Exception {
        return new AdaptedDocumentType(original);
    }
}
TOP

Related Classes of com.documents4j.ws.DocumentTypeAdapter

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.