Package org.geoserver.inspire

Source Code of org.geoserver.inspire.InspireInitializer

/* (c) 2014 Open Source Geospatial Foundation - all rights reserved
* (c) 2001 - 2013 OpenPlans
* This code is licensed under the GPL 2.0 license, available at the root
* application directory.
*/
package org.geoserver.inspire;

import java.io.File;

import org.geoserver.config.GeoServer;
import org.geoserver.config.GeoServerInitializer;
import org.geoserver.platform.GeoServerResourceLoader;
import org.geoserver.platform.resource.Paths;
import org.geoserver.platform.resource.Resource;
import org.springframework.util.Assert;

public class InspireInitializer implements GeoServerInitializer {

    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());
    }

}
TOP

Related Classes of org.geoserver.inspire.InspireInitializer

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.