Examples of WorkspaceInfo


Examples of org.geoserver.catalog.WorkspaceInfo

        namespace.setPrefix(getName());
        namespace.setURI("http://" + getName() + ".openplans.org");
        catalog.add(namespace);

        // store needs a workspace...
        WorkspaceInfo ws = catalog.getFactory().createWorkspace();
        ws.setName("testFeatureTypeWorkspace");
        catalog.add(ws);

        StyleInfo style = catalog.getFactory().createStyle();
        style.setName("style_testFeatureType");
        style.setFilename("style_testFeatureType");
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

        style.setName("style_testCoverage");
        style.setFilename("style_testCoverage");
        catalog.add(style);

        // store needs a workspace...
        WorkspaceInfo ws = catalog.getFactory().createWorkspace();
        ws.setName("testCoverageWorkspace");
        catalog.add(ws);

        endTransaction();
        startNewTransaction();
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

        // ensure no stores
        clearCatalog();
        removeExistingNS();

        // store needs a workspace...
        WorkspaceInfo ws = catalog.getFactory().createWorkspace();
        ws.setName("testLayerWorkspace");
        catalog.add(ws);
        NamespaceInfo ns = catalog.getFactory().createNamespace();
        ns.setPrefix("testLayerWorkspace");
        ns.setURI("http://testLayerWorkspace.org");
        catalog.add(ns);
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

        // ensure no stores
        clearCatalog();
        removeExistingNS();

        // store needs a workspace...
        WorkspaceInfo ws = catalog.getFactory().createWorkspace();
        ws.setName("testLayerWorkspace");
        catalog.add(ws);
        NamespaceInfo ns = catalog.getFactory().createNamespace();
        ns.setPrefix("testLayerWorkspace");
        ns.setURI("http://testLayerWorkspace.org");
        catalog.add(ns);
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

        // ensure no stores
        clearCatalog();
        removeExistingNS();

        // store needs a workspace...
        WorkspaceInfo ws = catalog.getFactory().createWorkspace();
        ws.setName("testLayerWorkspace");
        catalog.add(ws);
        NamespaceInfo ns = catalog.getFactory().createNamespace();
        ns.setPrefix("testLayerWorkspace");
        ns.setURI("http://testLayerWorkspace.org");
        catalog.add(ns);
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

                try {
                    // build the datastore namespace URI
                    String ns = buildDatastoreNamespace();
                   
                    // build the workspace
                    WorkspaceInfo ws = getCatalog().getWorkspaceByName(project);
                    boolean workspaceNew = false;
                    if (ws == null) {
                        workspaceNew = true;
                        ws = getCatalog().getFactory().createWorkspace();
                        ws.setName(project);
                        NamespaceInfo nsi = getCatalog().getFactory().createNamespace();
                        nsi.setPrefix(project);
                        nsi.setURI(ns);
                        getCatalog().add(ws);
                        getCatalog().add(nsi);
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

        @Override
        protected void onValidate(IValidatable validatable) {
            String project = (String) validatable.getValue();
           
            // new workspace? if so, good
            WorkspaceInfo ws = getCatalog().getWorkspaceByName(project);
            if(ws == null)
                return;
           
            // new store too?
            StoreInfo store = getCatalog().getStoreByName(ws, project, StoreInfo.class);
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

            protected void onClick(AjaxRequestTarget target) {
                Catalog catalog = getCatalog();
                CascadeDeleteVisitor deleteVisitor = new CascadeDeleteVisitor(catalog);
                String project = summary.getProject();
                if(summary.isWorkspaceNew()) {
                    WorkspaceInfo ws = catalog.getWorkspaceByName(project);
                    if(ws != null)
                        ws.accept(deleteVisitor);
                } else if(summary.isStoreNew()) {
                    StoreInfo si = catalog.getStoreByName(project, project, StoreInfo.class);
                    if(si != null)
                        si.accept(deleteVisitor);
                } else {
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

    /**
     *
     */
    public WorkspaceInfo getWorkspaceByName(String name) {
        WorkspaceInfo ws = (WorkspaceInfo) first(buildQuery("from ", WorkspaceInfo.class,
                " where name = ", param(name)));
        return ws;
    }
View Full Code Here

Examples of org.geoserver.catalog.WorkspaceInfo

        return getAttribute( "workspace") == null;
    }
   
    @Override
    protected String handleObjectPost(Object object) throws Exception {
        WorkspaceInfo workspace = (WorkspaceInfo) object;
        catalog.add( workspace );
       
        //create a namespace corresponding to the workspace if one does not
        // already exist
        NamespaceInfo namespace = catalog.getNamespaceByPrefix( workspace.getName() );
        if ( namespace == null ) {
            LOGGER.fine( "Automatically creating namespace for workspace " + workspace.getName() );

            namespace = catalog.getFactory().createNamespace();
            namespace.setPrefix( workspace.getName() );
            namespace.setURI( "http://" + workspace.getName() );
            catalog.add( namespace );
        }
       
        LOGGER.info( "POST workspace " + workspace.getName() );
        return workspace.getName();
    }
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.