Statistics
| Revision:

gvsig-vectorediting / org.gvsig.vectorediting / trunk / org.gvsig.vectorediting / org.gvsig.vectorediting.lib / org.gvsig.vectorediting.lib.impl / src / main / java / org / gvsig / vectorediting / lib / impl / DefaultEditingService.java @ 875

History | View | Annotate | Download (2.88 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.impl;
26

    
27
import java.util.List;
28

    
29
import org.gvsig.fmap.geom.Geometry;
30
import org.gvsig.fmap.geom.primitive.Point;
31
import org.gvsig.tools.service.Manager;
32
import org.gvsig.vectorediting.lib.api.DrawingStatus;
33
import org.gvsig.vectorediting.lib.api.EditingService;
34
import org.gvsig.vectorediting.lib.api.EditingServiceParameter;
35
import org.gvsig.vectorediting.lib.api.exceptions.DrawServiceException;
36
import org.gvsig.vectorediting.lib.api.exceptions.FinishServiceException;
37
import org.gvsig.vectorediting.lib.api.exceptions.InvalidEntryException;
38
import org.gvsig.vectorediting.lib.api.exceptions.StartServiceException;
39
import org.gvsig.vectorediting.lib.api.exceptions.StopServiceException;
40
import org.gvsig.vectorediting.lib.spi.EditingProvider;
41

    
42
public class DefaultEditingService implements EditingService {
43

    
44
    EditingProvider provider;
45

    
46
    public DefaultEditingService(EditingProvider provider) {
47
        this.provider = provider;
48
    }
49

    
50
    public Manager getManager() {
51
        return null;
52
    }
53

    
54
    public DrawingStatus getDrawingStatus(Point mousePosition)
55
        throws DrawServiceException {
56
        return provider.getDrawingStatus(mousePosition);
57
    }
58

    
59
    public List<EditingServiceParameter> getParameters() {
60
        return provider.getParameters();
61
    }
62

    
63
    public EditingServiceParameter next() {
64
        return provider.next();
65
    }
66

    
67
    public void setValue(Object value) throws InvalidEntryException {
68
        provider.setValue(value);
69
    }
70

    
71
    public void stop() throws StopServiceException {
72
        provider.stop();
73
    }
74

    
75
    public void finishAndStore() throws FinishServiceException {
76
        provider.finishAndStore();
77
    }
78

    
79
    public Geometry finish() throws FinishServiceException {
80
        return provider.finish();
81
    }
82

    
83
    public void start() throws StartServiceException, InvalidEntryException {
84
        this.provider.start();
85
    }
86

    
87
    public String getName() {
88
        return provider.getName();
89
    }
90
}