Search in sources :

Example 1 with ResourcesFileValidationException

use of es.bsc.compss.types.resources.exceptions.ResourcesFileValidationException in project compss by bsc-wdc.

the class ResourceLoader method loadFiles.

private static void loadFiles() throws ResourcesFileValidationException, ProjectFileValidationException {
    LOGGER.info("ResourceLoader loading files");
    // Load resources
    try {
        LOGGER.debug("ResourceLoader loading resources.xml");
        ResourceLoader.resources = new ResourcesFile(new File(resources_XML), resources_XSD, LOGGER);
    } catch (SAXException | JAXBException e) {
        throw new ResourcesFileValidationException(e);
    }
    // Load project
    try {
        LOGGER.debug("ResourceLoader loading project.xml");
        ResourceLoader.project = new ProjectFile(new File(project_XML), project_XSD, LOGGER);
    } catch (SAXException | JAXBException e) {
        throw new ProjectFileValidationException(e);
    }
}
Also used : ResourcesFile(es.bsc.compss.types.resources.ResourcesFile) JAXBException(javax.xml.bind.JAXBException) ResourcesFileValidationException(es.bsc.compss.types.resources.exceptions.ResourcesFileValidationException) ProjectFile(es.bsc.compss.types.project.ProjectFile) ProjectFileValidationException(es.bsc.compss.types.project.exceptions.ProjectFileValidationException) ProjectFile(es.bsc.compss.types.project.ProjectFile) File(java.io.File) ResourcesFile(es.bsc.compss.types.resources.ResourcesFile) SAXException(org.xml.sax.SAXException)

Aggregations

ProjectFile (es.bsc.compss.types.project.ProjectFile)1 ProjectFileValidationException (es.bsc.compss.types.project.exceptions.ProjectFileValidationException)1 ResourcesFile (es.bsc.compss.types.resources.ResourcesFile)1 ResourcesFileValidationException (es.bsc.compss.types.resources.exceptions.ResourcesFileValidationException)1 File (java.io.File)1 JAXBException (javax.xml.bind.JAXBException)1 SAXException (org.xml.sax.SAXException)1