Package org.geoserver.config

Examples of org.geoserver.config.GeoServerDataDirectory


        //create a class template loader to delegate to
        if (caller != null) {
            classTemplateLoader = new ClassTemplateLoader(caller, "");
        }
       
        dd = new GeoServerDataDirectory(rl);
    }
View Full Code Here


       
        return attributes;
    }
   
    void handleSchemaOverride( List<AttributeTypeInfo> atts, FeatureTypeInfo ft ) throws IOException {
        GeoServerDataDirectory dd = new GeoServerDataDirectory(catalog.getResourceLoader());
        File schemaFile = dd.findSuppResourceFile(ft, "schema.xsd");
        if (schemaFile == null) {
            schemaFile = dd.findSuppLegacyResourceFile(ft, "schema.xsd");
            if ( schemaFile == null ) {
                //check for the old style schema.xml
                File oldSchemaFile = dd.findSuppResourceFile(ft, "schema.xml");
                if ( oldSchemaFile == null ) {
                    oldSchemaFile = dd.findSuppLegacyResourceFile(ft, "schema.xml");
                }
                if ( oldSchemaFile != null ) {
                    schemaFile = new File( oldSchemaFile.getParentFile(), "schema.xsd");
                    BufferedWriter out =
                        new BufferedWriter(new OutputStreamWriter( new FileOutputStream( schemaFile ) ) );
View Full Code Here

    protected GeoServerResourceLoader getResourceLoader() {
        return (GeoServerResourceLoader) applicationContext.getBean( "resourceLoader" );
    }
   
    protected GeoServerDataDirectory getDataDirectory() {
        return new GeoServerDataDirectory(getResourceLoader());
    }
View Full Code Here

        protected Catalog catalog;
        protected GeoServerDataDirectory dataDir;

        Creator(Catalog catalog) {
            this.catalog = catalog;
            dataDir = new GeoServerDataDirectory(catalog.getResourceLoader());
        }
View Full Code Here

        // create a temp directory for the export
        temp = Files.createTempDirectory(null);
        work = temp.resolve("work");
        work.toFile().mkdirs();

        sourceDataDir = new GeoServerDataDirectory(catalog.getResourceLoader());
        exportDataDir = new GeoServerDataDirectory(new GeoServerResourceLoader(work.toFile()));
        //exportDataDir.setConfigFileExtension("json");

        // config serializer
        xsp = new XStreamPersisterFactory().createXMLPersister();
        xsp.setExcludeIds();
View Full Code Here

        workspace = options.workspace();
        namespace = catalog.getNamespaceByPrefix(workspace.getName());

        // temp directory to unpack
        root = Files.createTempDirectory(null);
        importDataDir = new GeoServerDataDirectory(new GeoServerResourceLoader(root.toFile()));
        targetDataDir = new GeoServerDataDirectory(catalog.getResourceLoader());

        // config deserializer
        xsp = new XStreamPersisterFactory().createXMLPersister();
        xsp.setExcludeIds();
        xsp.setReferenceByName(true);
View Full Code Here

    public Catalog catalog() {
        return geoServer.getCatalog();
    }

    protected GeoServerDataDirectory dataDir() {
        return new GeoServerDataDirectory(geoServer.getCatalog().getResourceLoader());
    }
View Full Code Here

       
        return attributes;
    }
   
    void handleSchemaOverride( List<AttributeTypeInfo> atts, FeatureTypeInfo ft ) throws IOException {
        GeoServerDataDirectory dd = new GeoServerDataDirectory(catalog.getResourceLoader());
        File schemaFile = dd.findSuppResourceFile(ft, "schema.xsd");
        if (schemaFile == null) {
            schemaFile = dd.findSuppLegacyResourceFile(ft, "schema.xsd");
            if ( schemaFile == null ) {
                //check for the old style schema.xml
                File oldSchemaFile = dd.findSuppResourceFile(ft, "schema.xml");
                if ( oldSchemaFile == null ) {
                    oldSchemaFile = dd.findSuppLegacyResourceFile(ft, "schema.xml");
                }
                if ( oldSchemaFile != null ) {
                    schemaFile = new File( oldSchemaFile.getParentFile(), "schema.xsd");
                    BufferedWriter out =
                        new BufferedWriter(new OutputStreamWriter( new FileOutputStream( schemaFile ) ) );
View Full Code Here

        }
        logFile = new File(location);
       
        if (!logFile.isAbsolute()) {
            // locate the geoserver.log file
            GeoServerDataDirectory dd = getGeoServerApplication().getBeanOfType(
                    GeoServerDataDirectory.class);
            logFile = new File(dd.root(), logFile.getPath());
        }
       
        if (!logFile.exists()) {
            error("Could not find the GeoServer log file: " + logFile.getAbsolutePath());
        }
View Full Code Here

    protected GeoServerResourceLoader getResourceLoader() {
        return (GeoServerResourceLoader) applicationContext.getBean( "resourceLoader" );
    }
   
    protected GeoServerDataDirectory getDataDirectory() {
        return new GeoServerDataDirectory(getResourceLoader());
    }
View Full Code Here

TOP

Related Classes of org.geoserver.config.GeoServerDataDirectory

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.