Package eu.scape_project.planning.model

Examples of eu.scape_project.planning.model.PlatoException


                    measurements.put(measurement.getMeasureId(), measurement);
                }
            }
            result.setMeasurements(measurements);
        } catch (IOException e) {
            throw new PlatoException("Error communicating with the server.", e);
        } catch (TavernaExecutorException e) {
            throw new PlatoException("Error executing taverna workflow", e);
        }
        return result;
    }
View Full Code Here


        IPreservationActionRegistry serviceLocator = null;

        try {
            serviceLocator = PreservationActionRegistryFactory.getInstance(registry);
        } catch (IllegalArgumentException e1) {
            throw new PlatoException("Registry:  " + registry.getShortname()
                + " has changed and needs to be reconfigured.");
        }

        if (serviceLocator == null) {
            throw new PlatoException("Failed to access " + registry.getShortname());
        }

        return serviceLocator.getAvailableActions(formatInfo);
    }
View Full Code Here

    public List<Plan> importProjects(final String file) throws PlatoException {
        try {
            FileInputStream in = new FileInputStream(file);
            return importProjects(in);
        } catch (FileNotFoundException e) {
            throw new PlatoException("IMPORT FAILED: could not find file " + file, e);
        }
    }
View Full Code Here

             * t.getOwner()); }
             */

            return templates;
        } catch (Exception e) {
            throw new PlatoException("Failed to parse template tree.", e);
        }
    }
View Full Code Here

                         */
                        plan.getPlanProperties().setState(PlanState.valueOf(PlanState.ANALYSED.getValue() - 1));
                    }

                } else {
                    throw new PlatoException("Could not find any project data.");
                }
            }
        } catch (Exception e) {
            throw new PlatoException("Failed to import plans.", e);
        }

        return plans;
    }
View Full Code Here

                return fileTo;
            } else {
                return null;
            }
        } catch (Exception e) {
            throw new PlatoException("Failed to update plan to current version.", e);
        }
    }
View Full Code Here

                return new ArrayList<Plan>();
            } else {
                return planParser.importProjects(new FileInputStream(currentVersionFile));
            }
        } catch (FileNotFoundException e) {
            throw new PlatoException("IMPORT FAILED: could not find migrated file", e);
        } finally {
            OS.deleteDirectory(tempDir);
        }
    }
View Full Code Here

     */
    public List<Plan> importPlans(final String file) throws PlatoException {
        try {
            return importPlans(new FileInputStream(file));
        } catch (FileNotFoundException e) {
            throw new PlatoException("IMPORT FAILED: could not find file " + file, e);
        }
    }
View Full Code Here

     */
    public int importAllProjectsFromDir(final String dir) throws PlatoException {
        int count = 0;
        File f = new File(dir);
        if (!f.exists()) {
            throw new PlatoException("Directory not found: " + dir);
        }
        String[] files = f.list();
        if (files == null) {
            throw new PlatoException("Directory is empty: " + dir);
        }
        List<String> sortedFiles = Arrays.asList(files);
        Collections.sort(sortedFiles);
        for (String s : sortedFiles) {
            String file = f.getAbsolutePath() + File.separator + s;
View Full Code Here

                    o.setPid(pid);
                    o.getData().releaseData();
                }
            }
        } catch (Exception e) {
            throw new PlatoException(e);
        }
    }
View Full Code Here

TOP

Related Classes of eu.scape_project.planning.model.PlatoException

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.