01: package net.refractions.udig.mapgraphic;
02:
03: import java.io.IOException;
04: import java.util.List;
05:
06: import net.refractions.udig.catalog.CatalogPlugin;
07: import net.refractions.udig.catalog.IService;
08: import net.refractions.udig.catalog.IServiceFactory;
09: import net.refractions.udig.mapgraphic.internal.MapGraphicService;
10:
11: public class MapGraphicUtil {
12: // public static List getMapGraphicResources(MapGraphicService service) {
13: // List members = null;
14: // synchronized (MapGraphicFactory.getInstance()) {
15: // members = new ArrayList<MapGraphicResource>();
16: // List<IConfigurationElement> graphics = MapGraphicFactory.getInstance()
17: // .getMapGraphics();
18: //
19: // if (graphics != null) {
20: // for( IConfigurationElement graphic : graphics ) {
21: // members.add(new MapGraphicResource(service, graphic));
22: // }
23: // }
24: // }
25: // return members;
26: // }
27:
28: public static List getMapGraphicServices() {
29: IServiceFactory factory = CatalogPlugin.getDefault()
30: .getServiceFactory();
31: List<IService> services = factory
32: .acquire(MapGraphicService.SERVICE_URL);
33: return services;
34: }
35:
36: public static List getMapGraphicResources(MapGraphicService service)
37: throws IOException {
38: return service.members(null);
39: }
40: }
|