01: /*
02: * uDig - User Friendly Desktop Internet GIS client http://udig.refractions.net (C) 2004,
03: * Refractions Research Inc. This library is free software; you can redistribute it and/or modify it
04: * under the terms of the GNU Lesser General Public License as published by the Free Software
05: * Foundation; version 2.1 of the License. This library is distributed in the hope that it will be
06: * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
07: * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
08: */
09: package net.refractions.udig.project.internal;
10:
11: import java.io.IOException;
12: import java.util.List;
13:
14: import net.refractions.udig.catalog.IGeoResource;
15: import net.refractions.udig.catalog.IService;
16:
17: import org.eclipse.emf.ecore.EObject;
18:
19: /**
20: * TODO Purpose of net.refractions.udig.project.internal
21: * <p>
22: * </p>
23: *
24: * @author Jesse
25: * @since 1.0.0
26: * @model
27: */
28: public interface LayerFactory extends EObject {
29: /**
30: * <!-- begin-user-doc --> <!-- end-user-doc -->
31: * @generated
32: */
33: String copyright = "uDig - User Friendly Desktop Internet GIS client http://udig.refractions.net (C) 2004, Refractions Research Inc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; version 2.1 of the License. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details."; //$NON-NLS-1$
34:
35: /**
36: * Creates a list of {@linkplain Layer}objects from the provided selection.
37: *
38: * @param selection A selection of CatalogEntries obtained from a {@linkplain CatalogTreeViewer}
39: * object.
40: * @return a list of {@linkplain Layer}objects from the provided selection.
41: * @throws IOException
42: */
43: public abstract List<Layer> getLayers(List selection)
44: throws IOException;
45:
46: /**
47: * Creates a list of layers from a service. Each GeoResource in the service will have a
48: * corresponding layer created for it. Becareful this can result in a large number of layers.
49: *
50: * @param service a service that will be used to created layers
51: * @return a list of layers
52: * @throws IOException
53: */
54: public abstract List<Layer> getLayers(IService service)
55: throws IOException;
56:
57: /**
58: * Creates a layer from a service and a resource. The layer is represented the data in resource.
59: * May return null if it cannot resolve the service.
60: *
61: * @param service
62: * @param resource
63: * @return
64: * @throws IOException
65: */
66: public abstract Layer createLayer(IGeoResource resource)
67: throws IOException;
68:
69: /**
70: * @return
71: * @model opposite="layerFactory" many="false"
72: */
73: public Map getMap();
74:
75: /**
76: * Sets the value of the '{@link net.refractions.udig.project.internal.LayerFactory#getMap <em>Map</em>}' container reference.
77: * <!-- begin-user-doc --> <!-- end-user-doc -->
78: * @param value the new value of the '<em>Map</em>' container reference.
79: * @see #getMap()
80: * @generated
81: */
82: void setMap(Map value);
83:
84: }
|