Package com.documents4j.api

Examples of com.documents4j.api.DocumentType


            InputStream inputStream,
            @Suspended AsyncResponse asyncResponse,
            @HeaderParam(HttpHeaders.CONTENT_TYPE) String inputType,
            @HeaderParam(HttpHeaders.ACCEPT) String responseType,
            @DefaultValue("" + IConverter.JOB_PRIORITY_NORMAL) @HeaderParam(ConverterNetworkProtocol.HEADER_JOB_PRIORITY) int priority) {
        DocumentType targetType = new DocumentType(responseType);
        // The received input stream does not need to be closed since the underlying channel is automatically closed with responding.
        // If the stream was closed manually, this would in contrast lead to a NullPointerException since the channel was already detached.
        webConverterConfiguration.getConverter()
                .convert(inputStream, false).as(new DocumentType(inputType))
                .to(AsynchronousConversionResponse.to(asyncResponse, targetType, webConverterConfiguration.getTimeout())).as(targetType)
                .prioritizeWith(priority)
                .schedule();
    }
View Full Code Here


                : externalConverter.getClass().getAnnotation(ViableConversions.class).value();
        Map<ConversionPath, IExternalConverter> conversionMapping = new HashMap<ConversionPath, IExternalConverter>();
        for (ViableConversion viableConversion : viableConversions) {
            for (String sourceFormat : viableConversion.from()) {
                for (String targetFormat : viableConversion.to()) {
                    conversionMapping.put(new ConversionPath(new DocumentType(sourceFormat), new DocumentType(targetFormat)), externalConverter);
                }
            }
        }
        return conversionMapping;
    }
View Full Code Here

public class DocumentTypeAdapter extends XmlAdapter<AdaptedDocumentType, DocumentType> {

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

TOP

Related Classes of com.documents4j.api.DocumentType

Copyright © 2018 www.massapicom. 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.