Statistics
| Revision:

root / org.gvsig.dxf / trunk / org.gvsig.dxf / org.gvsig.dxf.provider.legend / src / main / java / org / gvsig / fmap / dal / store / dxf / legend / DXFGetLegendBuilder.java @ 180

History | View | Annotate | Download (2.3 KB)

1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Government (CIT)
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
 */
22

    
23
/*
24
 * AUTHORS (In addition to CIT):
25
 * 2008 IVER T.I. S.A.   {{Task}}
26
 */
27
package org.gvsig.fmap.dal.store.dxf.legend;
28

    
29
import org.gvsig.fmap.dal.store.dxf.LegendBuilder;
30
import org.gvsig.tools.ToolsLocator;
31
import org.gvsig.tools.dynobject.DynClass;
32
import org.gvsig.tools.dynobject.DynMethod;
33
import org.gvsig.tools.dynobject.DynObject;
34
import org.gvsig.tools.dynobject.exception.DynMethodException;
35
import org.gvsig.tools.dynobject.exception.DynMethodNotSupportedException;
36

    
37
public class DXFGetLegendBuilder implements DynMethod {
38

    
39
    private static Integer code = null;
40

    
41
    static void register(DynClass dxfLegendDynClass) {
42
        if (code != null) {
43
            return;
44
        }
45
        code = ToolsLocator.getDynObjectManager()
46
                .registerDynMethod(
47
                        dxfLegendDynClass, new DXFGetLegendBuilder());
48

    
49
    }
50

    
51
    @Override
52
    public int getCode() throws DynMethodNotSupportedException {
53
        return code;
54
    }
55

    
56
    @Override
57
    public String getDescription() {
58
        return "DXF LegendBuilder creator";
59
    }
60

    
61
    @Override
62
    public String getName() {
63
        return LegendBuilder.DYNMETHOD_BUILDER_NAME;
64
    }
65

    
66
    @Override
67
    public Object invoke(DynObject self, Object[] args)
68
            throws DynMethodException {
69
        return new DXFLegendBuilder();
70
    }
71

    
72
    @Override
73
    public Object clone() throws CloneNotSupportedException {
74
        return super.clone();
75
    }
76

    
77
    
78
}