Package org.zanata.exception

Examples of org.zanata.exception.FileFormatAdapterException


                        }
                    }
                }
            }
        } catch (OkapiIOException e) {
            throw new FileFormatAdapterException("Unable to parse document", e);
        } finally {
            filter.close();
        }
        return document;
    }
View Full Code Here


    private boolean shouldAdd(String id, HasContents hc,
            Map<String, HasContents> addedResources)
            throws FileFormatAdapterException {
        if (addedResources.containsKey(id)) {
            if (!hc.getContents().equals(addedResources.get(id).getContents())) {
                throw new FileFormatAdapterException(
                        "Same id but different contents for text text flow, "
                                + "not suitable for eliding.");
            }
            return false;
        }
View Full Code Here

                        }
                    }
                }
            }
        } catch (OkapiIOException e) {
            throw new FileFormatAdapterException(
                    "Unable to parse translation file", e);
        } finally {
            filter.close();
        }
        return transRes;
View Full Code Here

            while ((bytesRead = input.read(buffer)) != -1) {
                output.write(buffer, 0, bytesRead);
            }
        } catch (IOException e) {
            // FIXME log
            throw new FileFormatAdapterException(
                    "Unable to generate translated file", e);
        } catch (SecurityException e) {
            // FIXME log
            throw new FileFormatAdapterException(
                    "Unable to generate translated file", e);
        } finally {
            if (tempFile != null) {
                if (!tempFile.delete()) {
                    log.warn(
View Full Code Here

                }
                writer.handleEvent(event);
            }
        } catch (OkapiIOException e) {
            throw new FileFormatAdapterException(
                    "Unable to generate translated document from original", e);
        } finally {
            filter.close();
            writer.close();
        }
View Full Code Here

TOP

Related Classes of org.zanata.exception.FileFormatAdapterException

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.