> Von: Jesse Eichar <
jesse.eichar@xxxxxxxxxxxxxx>
> An: User-friendly Desktop Internet GIS <
udig-devel@xxxxxxxxxxxxxxxxxxxxx>
> Betreff: Re: [udig-devel] Remove temporary resource from catalog
> I just did a quick check and you should be able to do something like:
>
> service.resolve(ActiveMemoryDataStore.class).remove(featureType)
>
> or
>
> ((ActiveMemoryDataStore)service.resolve(MemoryDataStore.class)).remove(featureType)
>
>
> where the service is the service of the layer you found:
>
> IResolve service = list.get(0).service();
> featureType = list.get(0).resolve(FeatureStore.class).getSchema()
>
> Something like that.
>
> Be kind this is completely from memory so you will have to figure out the
> details
>
> Jesse
> On Tue, Nov 30, 2010 at 4:05 PM, <
konfri@xxxxxx> wrote:
>
> > Hey Jesse,
> >
> > thanks for you help :) After I got the first element:
> >
> > IResolve firstElement = list.get(0);
> >
> > I'm not able to change any properties. It would be great if I could
> change
> > the name. Since I'm trying to add again a temporary resource with
> different
> > properties but the same name to the catalog. At present, I'm just
> getting
> > schema change unsupport exceptions :(
> >
> > I need the resource being able to create a new layer in uDig. Is there
> some
> > kind of workaround? Thanks again for you help.
> >
> > Kon
> >
> >
> > -------- Original-Nachricht --------
> > > Datum: Tue, 30 Nov 2010 15:47:19 +0100
> > > Von: Jesse Eichar <
jesse.eichar@xxxxxxxxxxxxxx>
> > > An: User-friendly Desktop Internet GIS
> <
udig-devel@xxxxxxxxxxxxxxxxxxxxx
> > >
> > > Betreff: Re: [udig-devel] Remove temporary resource from catalog
> >
> > > In honesty I am not sure you can. I think Memory datastore may need
> to
> > be
> > > updated so that it is possible.
> > >
> > > Jesse
> > >
> > > On Tue, Nov 30, 2010 at 3:44 PM, <
konfri@xxxxxx> wrote:
> > >
> > > > Hey,
> > > >
> > > > I'm trying to delete some temporary resources from catalog.
> > > >
> > > > SimpleFeatureTypeBuilder tb = new SimpleFeatureTypeBuilder();
> > > > tb.setName(LAYERNAME);
> > > > SimpleFeatureType sft = tb.buildFeatureType();
> > > > IGeoResource resourcex =
> > > >
> > >
> >
> CatalogPlugin.getDefault().getLocalCatalog().createTemporaryResource(sft);
> > > >
> > > > // after some time
> > > > List<IResolve> list =
> > > CatalogPlugin.getDefault().getLocalCatalog().find(new
> > > > URL(LAYERURL), new NullProgressMonitor());
> > > > IResolve firstElement = list.get(0); // contains IGeoResource type
> > > >
> > > > How do I delete the first element? Unfortunately, there is no remove
> > > method
> > > > with IResolve type.
> > > >
> > > > Thanks for your help :)
> > > >
> > > > Kon
> > > > --
> > > > GMX DSL Doppel-Flat ab 19,99 €/mtl.! Jetzt auch mit
> > > > gratis Notebook-Flat!
http://portal.gmx.net/de/go/dsl
> > > > _______________________________________________
> > > > User-friendly Desktop Internet GIS (uDig)
> > > >
http://udig.refractions.net
> > > >
http://lists.refractions.net/mailman/listinfo/udig-devel
> > > >
> >
> > --
> > GRATIS! Movie-FLAT mit über 300 Videos.
> > Jetzt freischalten unter
http://portal.gmx.net/de/go/maxdome
> > _______________________________________________
> > User-friendly Desktop Internet GIS (uDig)
> >
http://udig.refractions.net
> >
http://lists.refractions.net/mailman/listinfo/udig-devel
> >