Package org.zanata.adapter

Examples of org.zanata.adapter.FileFormatAdapter


            // TODO damason: this file is not transmitted, but used to generate
            // a file later
            // the generated file should be scanned instead
            virusScanner.scan(tempFile, name);
            URI uri = tempFile.toURI();
            FileFormatAdapter adapter =
                    translationFileServiceImpl.getAdapterFor(hDocument
                            .getRawDocument().getType());
            String rawParamString =
                    hDocument.getRawDocument().getAdapterParameters();
            Optional<String> params =
View Full Code Here


    @Override
    public Resource parseUpdatedAdapterDocumentFile(URI documentFile,
            String docId, String fileName, Optional<String> params)
            throws ZanataServiceException {
        if (hasAdapterFor(fileName)) {
            FileFormatAdapter adapter = getAdapterFor(fileName);
            Resource doc;
            try {
                doc =
                        adapter.parseDocumentFile(documentFile, new LocaleId(
                                "en"), params);
            } catch (FileFormatAdapterException e) {
                throw new ZanataServiceException(
                        "Error parsing document file: " + fileName, e);
            }
View Full Code Here

TOP

Related Classes of org.zanata.adapter.FileFormatAdapter

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.