Statistics
| Revision:

gvsig-vectorediting / org.gvsig.vectorediting / trunk / org.gvsig.vectorediting / org.gvsig.vectorediting.lib / org.gvsig.vectorediting.lib.spi / src / main / java / org / gvsig / vectorediting / lib / spi / EditingProviderManager.java @ 2608

History | View | Annotate | Download (3.57 KB)

1
/**
2
 * gvSIG. Desktop Geographic Information System.
3
 *
4
 * Copyright ? 2007-2014 gvSIG Association
5
 *
6
 * This program is free software; you can redistribute it and/or
7
 * modify it under the terms of the GNU General Public License
8
 * as published by the Free Software Foundation; either version 2
9
 * of the License, or (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program; if not, write to the Free Software
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19
 * MA  02110-1301, USA.
20
 *
21
 * For any additional information, do not hesitate to contact us
22
 * at info AT gvsig.com, or visit our website www.gvsig.com.
23
 */
24

    
25
package org.gvsig.vectorediting.lib.spi;
26

    
27
import java.util.List;
28
import java.util.Map;
29
import org.gvsig.fmap.dal.feature.EditableFeature;
30
import org.gvsig.fmap.dal.feature.FeatureStore;
31
import org.gvsig.fmap.geom.Geometry;
32
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
33
import org.gvsig.tools.service.spi.ProviderManager;
34
import org.gvsig.vectorediting.lib.api.EditingServiceInfo;
35
import org.gvsig.vectorediting.lib.api.exceptions.ServiceInformationException;
36

    
37
/**
38
 *
39
 * Manager the registration of {@link EditingProviderFactory} objects and the
40
 * creation of Providers. Moreover, offers service info about services and
41
 * utility methods.
42
 *
43
 * @author llmarques
44
 * @version $Id$
45
 */
46
public interface EditingProviderManager extends ProviderManager {
47

    
48
    /**
49
     * Gets read only information about a service such as if creates new
50
     * geometries, name, description, supported types, mouse icon, parameters
51
     * and
52
     * information about its parameters.
53
     *
54
     * @param name
55
     *            service name to get the service information
56
     * @return An <code>EditingServiceInfo</code> object that contains the
57
     *         information. {@link EditingServiceInfo}.
58
     * @throws ServiceInformationException
59
     *             if there is an error getting
60
     *             information of service.
61
     */
62
    public EditingServiceInfo getServiceInfo(String name)
63
        throws ServiceInformationException;
64

    
65
    /**
66
     * Utility method used by providers to register icons. Use png files.
67
     *
68
     * @param group
69
     *            of icon. Use vectorediting-tools.
70
     * @param name
71
     *            of icon.
72
     * @param loader
73
     *            classloader of provider.
74
     * @param provider
75
     *            of icon
76
     */
77
    public void registerIcon(String group, String name, ClassLoader loader,
78
        String provider);
79

    
80
    /**
81
    * Register a symbol in a symbol's map with name as key
82
    *
83
    * @param name
84
    * @param symbol
85
    */
86
   public void registerSymbol(String name, ISymbol symbol);
87

    
88
   /**
89
   *
90
   * @param name
91
   * @param symbol
92
   * @return 
93
   */
94
  public ISymbol getSymbol(String name);
95

    
96
  /**
97
  *
98
     * @param provider
99
  * @param values
100
  */
101
  public void registerDefaultValues(String provider, Map values);
102

    
103
  /**
104
  *
105
  * @param name
106
  * @param loader
107
  */
108
  public void registerDefaultValues(String name, ClassLoader loader);
109

    
110
  /**
111
  *
112
  * @param name
113
     * @return 
114
  */
115
  public Map<String, String> getDefaultValues(String name);
116
  
117
  public List<Geometry> getGeometriesFromClipboard();
118
  
119
  public List<EditableFeature> getFeaturesFromClipboard(EditingProviderServices providerServices, FeatureStore store);
120

    
121
}