Examples of CatalogImpl


Examples of org.geoserver.catalog.impl.CatalogImpl

        assertEquals( "EPSG:4326", ft.getSRS() );
        assertTrue( CRS.equalsIgnoreMetadata( CRS.decode( "EPSG:4326"), ft.getNativeCRS() ) );
    }
   
    public void testWMSLayer() 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 );
       
        WMSStoreInfo wms = cFactory.createWebMapServer();
        wms.setWorkspace( ws );
        wms.setName( "foo" );
        wms.setCapabilitiesURL( "http://fake.host/wms?request=getCapabilities");
        catalog.add( wms );
       
        WMSLayerInfo wl = cFactory.createWMSLayer();
        wl.setStore( wms );
        wl.setNamespace( ns );
        wl.setName( "wmsLayer" );
View Full Code Here

Examples of org.geoserver.catalog.impl.CatalogImpl

        Document dom = dom( in( out ) );
        assertEquals( "wmsLayer", dom.getDocumentElement().getNodeName() );
    }
   
    public void testLayer() 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 );
       
        FeatureTypeInfo ft = cFactory.createFeatureType();
        ft.setStore( ds );
        ft.setNamespace( ns );
        ft.setName( "ft" );
        ft.setAbstract( "abstract");
        ft.setSRS( "EPSG:4326");
        ft.setNativeCRS( CRS.decode( "EPSG:4326") );
        catalog.add( ft );
       
        StyleInfo s = cFactory.createStyle();
        s.setName( "style" );
        s.setFilename( "style.sld" );
        catalog.add( s );
       
        LayerInfo l = cFactory.createLayer();
        // TODO: reinstate when layer/publish slipt is actually in place
        // l.setName( "layer" );
        l.setResource( ft );
        l.setDefaultStyle( s );
        catalog.add( l );
       
        ByteArrayOutputStream out = out();
        persister.save( l, out );
       
        persister.setCatalog( catalog );
View Full Code Here

Examples of org.geoserver.catalog.impl.CatalogImpl

        //assertNotNull( l.getStyles() );
       
    }
   
    public void testVirtualTable() 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 );
       
        VirtualTable vt = new VirtualTable("riverReduced",
                "select a, b, c * %mulparam% \n from table \n where x > 1 %andparam%");
        vt.addGeometryMetadatata("geom", LineString.class, 4326);
        vt.setPrimaryKeyColumns(Arrays.asList("a", "b"));
        vt.addParameter(new VirtualTableParameter("mulparam", "1", new RegexpValidator("\\d+")));
        vt.addParameter(new VirtualTableParameter("andparam", null));
       
        FeatureTypeInfo ft = cFactory.createFeatureType();
        ft.setStore( ds );
        ft.setNamespace( ns );
        ft.setName( "ft" );
        ft.setAbstract( "abstract");
        ft.setSRS( "EPSG:4326");
        ft.setNativeCRS( CRS.decode( "EPSG:4326") );
        ft.getMetadata().put(FeatureTypeInfo.JDBC_VIRTUAL_TABLE, vt);
        catalog.add( ft );
       
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        persister.save(ft, out);
       
        // System.out.println(out.toString());
View Full Code Here

Examples of org.geoserver.catalog.impl.CatalogImpl

        //look for catalog.xml, if it exists assume we are dealing with
        // an old data directory
        File f = resourceLoader.find( "catalog.xml" );
        if ( f == null ) {
            //assume 2.x style data directory
            CatalogImpl catalog2 = (CatalogImpl) readCatalog( xp );
            ((CatalogImpl)catalog).sync( catalog2 );
        } else {
            // import old style catalog, register the persister now so that we start
            // with a new version of the catalog
            CatalogImpl catalog2 = (CatalogImpl) readLegacyCatalog( f, xp );
            ((CatalogImpl)catalog).sync( catalog2 );
        }
    }
View Full Code Here

Examples of org.jclouds.trmk.vcloud_0_8.domain.internal.CatalogImpl

         @Override
         public Map<String, Map<String, ? extends org.jclouds.trmk.vcloud_0_8.domain.Catalog>> get() {
            return ImmutableMap.<String, Map<String, ? extends org.jclouds.trmk.vcloud_0_8.domain.Catalog>> of(ORG_REF
                  .getName(), ImmutableMap.<String, org.jclouds.trmk.vcloud_0_8.domain.Catalog> of(
                  CATALOG_REF.getName(),
                  new CatalogImpl(CATALOG_REF.getName(), CATALOG_REF.getType(), CATALOG_REF.getHref(), null,
                        ImmutableMap.<String, ReferenceType> of(
                              "item",
                              new ReferenceTypeImpl("item", "application/vnd.vmware.vcloud.catalogItem+xml", URI
                                    .create("https://vcloud.safesecureweb.com/api/v0.8/catalogItem/1")),
                              "template",
View Full Code Here

Examples of org.jclouds.trmk.vcloud_0_8.domain.internal.CatalogImpl

         @Override
         public Map<String, Map<String, ? extends org.jclouds.trmk.vcloud_0_8.domain.Catalog>> get() {
            return ImmutableMap.<String, Map<String, ? extends org.jclouds.trmk.vcloud_0_8.domain.Catalog>> of(ORG_REF
                  .getName(), ImmutableMap.<String, org.jclouds.trmk.vcloud_0_8.domain.Catalog> of(
                  CATALOG_REF.getName(),
                  new CatalogImpl(CATALOG_REF.getName(), CATALOG_REF.getType(), CATALOG_REF.getHref(), null,
                        ImmutableMap.<String, ReferenceType> of(
                              "item",
                              new ReferenceTypeImpl("item", "application/vnd.vmware.vcloud.catalogItem+xml", URI
                                    .create("https://vcloud.safesecureweb.com/api/v0.8/catalogItem/1")),
                              "template",
View Full Code Here

Examples of org.jclouds.trmk.vcloud_0_8.domain.internal.CatalogImpl

   private ReferenceType catalog;
   private Map<String, ReferenceType> contents = Maps.newLinkedHashMap();
   private String description;

   public Catalog getResult() {
      return new CatalogImpl(catalog.getName(), catalog.getType(), catalog.getHref(), description, contents);
   }
View Full Code Here

Examples of org.jclouds.trmk.vcloud_0_8.domain.internal.CatalogImpl

   private ReferenceType catalog;
   private Map<String, ReferenceType> contents = Maps.newLinkedHashMap();
   private String description;

   public Catalog getResult() {
      return new CatalogImpl(catalog.getName(), catalog.getType(), catalog.getHref(), description, contents);
   }
View Full Code Here

Examples of org.jclouds.trmk.vcloud_0_8.domain.internal.CatalogImpl

         @Override
         public Map<String, Map<String, ? extends org.jclouds.trmk.vcloud_0_8.domain.Catalog>> get() {
            return ImmutableMap.<String, Map<String, ? extends org.jclouds.trmk.vcloud_0_8.domain.Catalog>> of(ORG_REF
                  .getName(), ImmutableMap.<String, org.jclouds.trmk.vcloud_0_8.domain.Catalog> of(
                  CATALOG_REF.getName(),
                  new CatalogImpl(CATALOG_REF.getName(), CATALOG_REF.getType(), CATALOG_REF.getHref(), null,
                        ImmutableMap.<String, ReferenceType> of(
                              "item",
                              new ReferenceTypeImpl("item", "application/vnd.vmware.vcloud.catalogItem+xml", URI
                                    .create("https://vcloud.safesecureweb.com/api/v0.8/catalogItem/1")),
                              "template",
View Full Code Here

Examples of org.jclouds.trmk.vcloud_0_8.domain.internal.CatalogImpl

         @Override
         public Map<String, Map<String, ? extends org.jclouds.trmk.vcloud_0_8.domain.Catalog>> get() {
            return ImmutableMap.<String, Map<String, ? extends org.jclouds.trmk.vcloud_0_8.domain.Catalog>> of(ORG_REF
                  .getName(), ImmutableMap.<String, org.jclouds.trmk.vcloud_0_8.domain.Catalog> of(
                  CATALOG_REF.getName(),
                  new CatalogImpl(CATALOG_REF.getName(), CATALOG_REF.getType(), CATALOG_REF.getHref(), null,
                        ImmutableMap.<String, ReferenceType> of(
                              "item",
                              new ReferenceTypeImpl("item", "application/vnd.vmware.vcloud.catalogItem+xml", URI
                                    .create("https://vcloud.safesecureweb.com/api/v0.8/catalogItem/1")),
                              "template",
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.