Examples of copyFromClassPath()


Examples of org.geoserver.platform.GeoServerResourceLoader.copyFromClassPath()

    public void initialize(GeoServer geoServer) throws Exception {
        // copy over the schema
        GeoServerResourceLoader l = geoServer.getCatalog().getResourceLoader();
        Resource resource = l.get(Paths.path("www", "inspire", "inspire_vs.xsd"));
        File target = resource.file();
        l.copyFromClassPath("inspire_vs.xsd", target, InspireInitializer.class);
        Assert.isTrue(target.exists());
    }

}
View Full Code Here

Examples of org.geoserver.platform.GeoServerResourceLoader.copyFromClassPath()

                // Copy the default property file into the data directory
                URL url = DownloadServiceConfigurationWatcher.class
                        .getResource(DEFAULT_PROPERTY_PATH);
                if (url != null) {
                    properties = loader.createFile(PROPERTYFILENAME);
                    loader.copyFromClassPath(DEFAULT_PROPERTY_PATH, properties,
                            DownloadServiceConfigurationWatcher.class);
                }
            } catch (IOException e) {
                if (LOGGER.isLoggable(Level.WARNING)) {
                    LOGGER.log(Level.WARNING, e.getMessage(), e);
View Full Code Here

Examples of org.geoserver.platform.GeoServerResourceLoader.copyFromClassPath()

        // Copy watertemp.zip test coverage resource in the data dir under a different name:
        GeoServerResourceLoader loader = getCatalog().getResourceLoader();
        File targetDir = loader.createDirectory(getDataDirectory().root(), coverageName.getPrefix()
                + File.separator + coverageName.getLocalPart());
        File target = new File(targetDir, coverageName.getLocalPart() + ".zip");
        loader.copyFromClassPath("org/geoserver/wms/dimension/watertemp.zip", target);

        // unpack the archive
        IOUtils.decompress(target, targetDir);

        // delete archive
View Full Code Here

Examples of org.geoserver.platform.GeoServerResourceLoader.copyFromClassPath()

    public void initialize(GeoServer geoServer) throws Exception {
        // copy over the schema
        GeoServerResourceLoader l = geoServer.getCatalog().getResourceLoader();
        File target = l.createFile("www", "inspire", "inspire_vs.xsd");
        l.copyFromClassPath("inspire_vs.xsd", target, getClass());
        Assert.isTrue(target.exists());
    }

}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.