Examples of XStreamPersisterFactory


Examples of org.geoserver.config.util.XStreamPersisterFactory

    protected void setUpInternal() throws Exception {
        super.setUpInternal();
       
        catalog = getCatalog();
        GeoServerPersister p =
            new GeoServerPersister( getResourceLoader(), new XStreamPersisterFactory().createXMLPersister() );
        catalog.addListener( p );
    }
View Full Code Here

Examples of org.geoserver.config.util.XStreamPersisterFactory

                File baseDir = new File(GeoserverDataDirectory.findGeoServerDataDir(context));
                GeoServerResourceLoader loader = new GeoServerResourceLoader(baseDir);
               
                File f= loader.find( "logging.xml" );
                if ( f != null ) {
                    XStreamPersister xp = new XStreamPersisterFactory().createXMLPersister();
                    BufferedInputStream in = new BufferedInputStream( new FileInputStream( f ) );
                    try {
                        LoggingInfo loginfo = xp.load(in,LoggingInfo.class);
                        LoggingUtils.initLogging(loader, loginfo.getLevel(), !loginfo.isStdOutLogging(),
                            loginfo.getLocation());
View Full Code Here

Examples of org.geoserver.config.util.XStreamPersisterFactory

        assertPathExists(root, "styles/stuff.xml");
        assertPathExists(root, "styles/stuff.sld");
        assertPathExists(root, "data/bar/stuff.properties");

        // ensure the exported store config points to the properties
        DataStoreInfo store = new XStreamPersisterFactory().createXMLPersister()
                .load(new FileInputStream(root.resolve("bar/datastore.xml").toFile()), DataStoreInfo.class);

        assertEquals("file:%WORKSPACE%/data/bar", store.getConnectionParameters().get("directory"));
    }
View Full Code Here

Examples of org.geoserver.config.util.XStreamPersisterFactory

        finally {
            gpkg.close();
        }

        // ensure the exported store config points to the geopackage
        DataStoreInfo store = new XStreamPersisterFactory().createXMLPersister()
            .load(new FileInputStream(root.resolve("bar/datastore.xml").toFile()), DataStoreInfo.class);

        assertEquals("geopkg", store.getConnectionParameters().get("dbtype"));
        assertEquals("file:%WORKSPACE%/data/bar.gpkg", store.getConnectionParameters().get("database"));
    }
View Full Code Here

Examples of org.geoserver.config.util.XStreamPersisterFactory

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

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

Examples of org.geoserver.config.util.XStreamPersisterFactory

        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);
        xsp.setCatalog(catalog);
    }
View Full Code Here

Examples of org.geoserver.config.util.XStreamPersisterFactory

        Path dataDir = Files.createTempDirectory(Paths.get("target"), "data");
        GeoServerResourceLoader resourceLoader = new GeoServerResourceLoader(dataDir.toFile());

        Catalog cat = new CatalogImpl();
        cat.setResourceLoader(resourceLoader);
        cat.addListener(new GeoServerPersister(resourceLoader, new XStreamPersisterFactory().createXMLPersister()));
        return cat;
    }
View Full Code Here

Examples of org.geoserver.config.util.XStreamPersisterFactory

                File baseDir = new File(GeoserverDataDirectory.findGeoServerDataDir(context));
                GeoServerResourceLoader loader = new GeoServerResourceLoader(baseDir);
               
                File f= loader.find( "logging.xml" );
                if ( f != null ) {
                    XStreamPersister xp = new XStreamPersisterFactory().createXMLPersister();
                    BufferedInputStream in = new BufferedInputStream( new FileInputStream( f ) );
                    try {
                        LoggingInfo loginfo = xp.load(in,LoggingInfo.class);
                        final String location = getLogFileLocation(loginfo.getLocation());
                        LoggingUtils.initLogging(loader, loginfo.getLevel(), !loginfo.isStdOutLogging(),
View Full Code Here

Examples of org.geoserver.config.util.XStreamPersisterFactory

    protected void setUpInternal() throws Exception {
        super.setUpInternal();
       
        catalog = getCatalog();
        GeoServerPersister p =
            new GeoServerPersister( getResourceLoader(), new XStreamPersisterFactory().createXMLPersister() );
        catalog.addListener( p );
    }
View Full Code Here

Examples of org.geoserver.config.util.XStreamPersisterFactory

        // Exposing this is a hack to provide JDBCConfig with the information it needs to compute
        // the "change" between logging.xml and the versions stored in JDBC. KS
        // TODO find a better solution than re-initializing on JDBCCOnfig startup.
        File f= loader.find( "logging.xml" );
        if ( f != null ) {
            XStreamPersister xp = new XStreamPersisterFactory().createXMLPersister();
            BufferedInputStream in = new BufferedInputStream( new FileInputStream( f ) );
            try {
                LoggingInfo loginfo = xp.load(in,LoggingInfo.class);
                return loginfo;
            }
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.