Examples of WorkspaceInfo


Examples of org.geoserver.catalog.WorkspaceInfo

        return workspaces.containsKey( null ) ?
                ModificationProxy.create( workspaces.get( null ), WorkspaceInfo.class ) : null;
    }
   
    public void setDefaultWorkspace(WorkspaceInfo workspace) {
        WorkspaceInfo old = workspaces.get(null);
        workspaces.put( null, workspace );
       
        //fire change event
        fireModified(this,
            Arrays.asList("defaultWorkspace"), Arrays.asList(old), Arrays.asList(workspace));
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

    protected void resolve(StoreInfo store) {
        setId(store);
        StoreInfoImpl s = (StoreInfoImpl) store;
       
        //resolve the workspace
        WorkspaceInfo resolved = ResolvingProxy.resolve( this, s.getWorkspace());
        if ( resolved != null ) {
            s.setWorkspaceresolved );   
        }
        else {
            //this means the workspace has not yet been added to the catalog, keep the proxy around
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

   
    public void testDataStore() throws Exception {
        Catalog catalog = new CatalogImpl();
        CatalogFactory cFactory = catalog.getFactory();
       
        WorkspaceInfo ws = cFactory.createWorkspace();
        ws.setName( "foo" );
       
        DataStoreInfo ds1 = cFactory.createDataStore();
        ds1.setName( "bar" );
        ds1.setWorkspace( ws );
       
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

   
    public void testCoverageStore() throws Exception {
        Catalog catalog = new CatalogImpl();
        CatalogFactory cFactory = catalog.getFactory();
       
        WorkspaceInfo ws = cFactory.createWorkspace();
        ws.setName( "foo" );
       
        CoverageStoreInfo cs1 = cFactory.createCoverageStore();
        cs1.setName( "bar" );
        cs1.setWorkspace( ws );
       
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

   
    public void testCatalog() throws Exception {
        Catalog catalog = new CatalogImpl();
        CatalogFactory cFactory = catalog.getFactory();
       
        WorkspaceInfo ws = cFactory.createWorkspace();
        ws.setName( "foo" );
        catalog.add( ws );
       
        NamespaceInfo ns = cFactory.createNamespace();
        ns.setPrefix( "acme" );
        ns.setURI( "http://acme.org" );
        catalog.add( ns );
       
        DataStoreInfo ds = cFactory.createDataStore();
        ds.setWorkspace( ws );
        ds.setName( "foo" );
        catalog.add( ds );
       
        CoverageStoreInfo cs = cFactory.createCoverageStore();
        cs.setWorkspace( ws );
        cs.setName( "bar" );
        catalog.add( cs );
       
        StyleInfo s = cFactory.createStyle();
        s.setName( "style" );
        s.setFilename( "style.sld" );
        catalog.add(s);
    
        ByteArrayOutputStream out = out();
        persister.save( catalog, out );
       
        catalog = persister.load( in(out), Catalog.class );
        assertNotNull(catalog);
       
        assertEquals( 1, catalog.getWorkspaces().size() );
        assertNotNull( catalog.getDefaultWorkspace() );
        ws = catalog.getDefaultWorkspace();
        assertEquals( "foo", ws.getName() );
       
        assertEquals( 1, catalog.getNamespaces().size() );
        assertNotNull( catalog.getDefaultNamespace() );
        ns = catalog.getDefaultNamespace();
        assertEquals( "acme", ns.getPrefix() );
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.