Revision 38488

View differences:

tags/v2_0_0_Build_2049/libraries/libFMap_mapcontext/src-test/org/gvsig/fmap/mapcontext/tools/persistence/DimensionPersistenceFactoryTest.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Gobernment (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
 * 2009 {}  {{Task}}
26
 */
27
package org.gvsig.fmap.mapcontext.tools.persistence;
28

  
29
import java.awt.Dimension;
30

  
31
import org.easymock.MockControl;
32

  
33
import org.gvsig.tools.ToolsLocator;
34
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase;
35
import org.gvsig.tools.persistence.PersistenceManager;
36
import org.gvsig.tools.persistence.PersistentState;
37

  
38
/**
39
 * Unit tests for the class {@link DimensionPersistenceFactory}.
40
 * 
41
 * @author gvSIG team
42
 */
43
public class DimensionPersistenceFactoryTest extends
44
		AbstractLibraryAutoInitTestCase {
45

  
46
	private DimensionPersistenceFactory factory;
47
	private MockControl stateControl;
48
	private PersistentState state;
49
	private Dimension dimension;
50

  
51
	protected void doSetUp() throws Exception {
52
		PersistenceManager persistenceManager = ToolsLocator
53
				.getPersistenceManager();
54
		factory = (DimensionPersistenceFactory) persistenceManager
55
				.getFactories().get(Dimension.class);
56
		stateControl = MockControl.createNiceControl(PersistentState.class);
57
		state = (PersistentState) stateControl.getMock();
58
		dimension = new Dimension(320, 200);
59
	}
60

  
61
	/**
62
	 * Test method for
63
	 * {@link org.gvsig.fmap.mapcontext.tools.persistence.DimensionPersistenceFactory#createFromState(org.gvsig.tools.persistence.PersistentState, java.lang.Class)}
64
	 * .
65
	 */
66
	public void testCreateFromState() throws Exception {
67
		stateControl.expectAndReturn(state
68
				.getInt(DimensionPersistenceFactory.FIELD_WIDTH), dimension.width);			
69
		stateControl.expectAndReturn(state
70
				.getInt(DimensionPersistenceFactory.FIELD_HEIGHT), dimension.height);				
71
		stateControl.replay();
72

  
73
		Dimension newDimension = (Dimension) factory.createFromState(state);
74
		assertTrue(newDimension.equals(dimension));
75

  
76
		stateControl.verify();
77
	}
78

  
79
	/**
80
	 * Test method for
81
	 * {@link org.gvsig.fmap.mapcontext.tools.persistence.DimensionPersistenceFactory#saveToState(org.gvsig.tools.persistence.PersistentState, java.lang.Object)}
82
	 * .
83
	 */
84
	public void testSaveToState() throws Exception {
85
		state.set(DimensionPersistenceFactory.FIELD_WIDTH, dimension.width);
86
		state.set(DimensionPersistenceFactory.FIELD_HEIGHT, dimension.height);
87
				
88
		stateControl.replay();
89

  
90
		factory.saveToState(state, dimension);
91

  
92
		stateControl.verify();
93
	}
94

  
95
}
tags/v2_0_0_Build_2049/libraries/libFMap_mapcontext/src-test/org/gvsig/fmap/mapcontext/tools/persistence/FontPersistenceFactoryTest.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Gobernment (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
 * 2009 {}  {{Task}}
26
 */
27
package org.gvsig.fmap.mapcontext.tools.persistence;
28

  
29
import java.awt.Font;
30

  
31
import org.easymock.MockControl;
32
import org.gvsig.tools.ToolsLocator;
33
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase;
34
import org.gvsig.tools.persistence.PersistenceManager;
35
import org.gvsig.tools.persistence.PersistentState;
36

  
37
/**
38
 * Unit tests for the class {@link FontPersistenceFactory}.
39
 * 
40
 * @author 2009- <a href="cordinyana@gvsig.org">C?sar Ordi?ana</a> - gvSIG team
41
 */
42
public class FontPersistenceFactoryTest extends AbstractLibraryAutoInitTestCase {
43

  
44
	private FontPersistenceFactory factory;
45
	private MockControl stateControl;
46
	private PersistentState state;
47
	private Font font;
48

  
49
	protected void doSetUp() throws Exception {
50
		PersistenceManager persistenceManager = ToolsLocator
51
				.getPersistenceManager();
52
		factory = (FontPersistenceFactory) persistenceManager.getFactories()
53
				.get(Font.class);
54
		stateControl = MockControl.createNiceControl(PersistentState.class);
55
		state = (PersistentState) stateControl.getMock();
56
		font = new Font("Arial", Font.BOLD, 18);
57
	}
58

  
59
	/**
60
	 * Test method for
61
	 * {@link org.gvsig.fmap.mapcontext.tools.persistence.FontPersistenceFactory#createFromState(org.gvsig.tools.persistence.PersistentState, java.lang.Class)}
62
	 * .
63
	 */
64
	public void testCreateFromState() throws Exception {
65
		stateControl.expectAndReturn(state
66
				.getString(FontPersistenceFactory.FIELD_NAME), font.getName());
67
		stateControl.expectAndReturn(state
68
				.getInt(FontPersistenceFactory.FIELD_STYLE), font.getStyle());
69
		stateControl.expectAndReturn(state
70
				.getInt(FontPersistenceFactory.FIELD_SIZE), font.getSize());
71
		stateControl.replay();
72

  
73
		Font newFont = (Font) factory.createFromState(state);
74
		assertTrue(newFont.equals(font));
75

  
76
		stateControl.verify();
77
	}
78

  
79
	/**
80
	 * Test method for
81
	 * {@link org.gvsig.fmap.mapcontext.tools.persistence.FontPersistenceFactory#saveToState(org.gvsig.tools.persistence.PersistentState, java.lang.Object)}
82
	 * .
83
	 */
84
	public void testSaveToState() throws Exception {
85
		state.set(FontPersistenceFactory.FIELD_NAME, font.getName());
86
		state.set(FontPersistenceFactory.FIELD_STYLE, font.getStyle());
87
		state.set(FontPersistenceFactory.FIELD_SIZE, font.getSize());
88
		stateControl.replay();
89

  
90
		factory.saveToState(state, font);
91

  
92
		stateControl.verify();
93
	}
94

  
95
}
tags/v2_0_0_Build_2049/libraries/libFMap_mapcontext/src-test/org/gvsig/fmap/mapcontext/tools/persistence/Rectangle2DPersistenceFactoryTest.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Gobernment (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
 * 2009 {}  {{Task}}
26
 */
27
package org.gvsig.fmap.mapcontext.tools.persistence;
28

  
29
import java.awt.geom.Rectangle2D;
30

  
31
import org.easymock.MockControl;
32
import org.gvsig.tools.ToolsLocator;
33
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase;
34
import org.gvsig.tools.persistence.PersistenceManager;
35
import org.gvsig.tools.persistence.PersistentState;
36

  
37
/**
38
 * Unit tests for the class {@link Rectangle2DPersistenceFactory}.
39
 * 
40
 * @author 2009- <a href="cordinyana@gvsig.org">C?sar Ordi?ana</a> - gvSIG team
41
 */
42
public class Rectangle2DPersistenceFactoryTest extends
43
		AbstractLibraryAutoInitTestCase {
44

  
45
	private Rectangle2DPersistenceFactory factory;
46
	private MockControl stateControl;
47
	private PersistentState state;
48
	private Rectangle2D rectangle;
49

  
50
	protected void doSetUp() throws Exception {
51
		PersistenceManager persistenceManager = ToolsLocator
52
				.getPersistenceManager();
53
		factory = (Rectangle2DPersistenceFactory) persistenceManager
54
				.getFactories().get(Rectangle2D.class);
55
		stateControl = MockControl.createNiceControl(PersistentState.class);
56
		state = (PersistentState) stateControl.getMock();
57
		double x = Math.random() * 1000d;
58
		double y = Math.random() * 1000d;
59
		rectangle = new Rectangle2D.Double(x, y, 320, 200);
60
	}
61

  
62
	/**
63
	 * Test method for
64
	 * {@link org.gvsig.fmap.mapcontext.tools.persistence.Rectangle2DPersistenceFactory#createFromState(PersistentState, Class)}
65
	 * .
66
	 */
67
	public void testCreateFromState() throws Exception {
68
		stateControl.expectAndReturn(state
69
				.getDouble(Rectangle2DPersistenceFactory.FIELD_X), rectangle
70
				.getX());
71
		stateControl.expectAndReturn(state
72
				.getDouble(Rectangle2DPersistenceFactory.FIELD_Y), rectangle
73
				.getY());
74
		stateControl.expectAndReturn(state
75
				.getDouble(Rectangle2DPersistenceFactory.FIELD_WIDTH),
76
				rectangle.getWidth());
77
		stateControl.expectAndReturn(state
78
				.getDouble(Rectangle2DPersistenceFactory.FIELD_HEIGHT),
79
				rectangle.getHeight());
80
		stateControl.replay();
81

  
82
		Rectangle2D newRectangle = (Rectangle2D) factory.createFromState(state);
83

  
84
		System.out.println("Orig x = " + rectangle.getX() + " - New x = "
85
				+ newRectangle.getX());
86
		assertEquals(rectangle.getX(), newRectangle.getX(), 0.0d);
87
		System.out.println("Orig y = " + rectangle.getY() + " - New y = "
88
				+ newRectangle.getY());
89
		assertEquals(rectangle.getY(), newRectangle.getY(), 0.0d);
90
		System.out.println("Orig width = " + rectangle.getWidth()
91
				+ " - New width = " + newRectangle.getWidth());
92
		assertEquals(rectangle.getWidth(), newRectangle.getWidth(), 0.0d);
93
		System.out.println("Orig height = " + rectangle.getHeight()
94
				+ " - New height = " + newRectangle.getHeight());
95
		assertEquals(rectangle.getHeight(), newRectangle.getHeight(), 0.0d);
96

  
97
		assertTrue(newRectangle.equals(rectangle));
98

  
99
		stateControl.verify();
100
	}
101

  
102
	/**
103
	 * Test method for
104
	 * {@link org.gvsig.fmap.mapcontext.tools.persistence.Rectangle2DPersistenceFactory#saveToState(org.gvsig.tools.persistence.PersistentState, java.lang.Object)}
105
	 * .
106
	 */
107
	public void testSaveToState() throws Exception {
108
		state.set(Rectangle2DPersistenceFactory.FIELD_X, rectangle.getX());
109
		state.set(Rectangle2DPersistenceFactory.FIELD_Y, rectangle.getY());
110
		state.set(Rectangle2DPersistenceFactory.FIELD_WIDTH, rectangle
111
				.getWidth());
112
		state.set(Rectangle2DPersistenceFactory.FIELD_HEIGHT, rectangle
113
				.getHeight());
114
		stateControl.replay();
115

  
116
		factory.saveToState(state, rectangle);
117

  
118
		stateControl.verify();
119
	}
120
}
tags/v2_0_0_Build_2049/libraries/libFMap_mapcontext/src-test/org/gvsig/fmap/mapcontext/tools/persistence/ColorPersistenceFactoryTest.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Gobernment (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
 * 2009 {}  {{Task}}
26
 */
27
package org.gvsig.fmap.mapcontext.tools.persistence;
28

  
29
import java.awt.Color;
30

  
31
import org.easymock.MockControl;
32
import org.gvsig.tools.ToolsLocator;
33
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase;
34
import org.gvsig.tools.persistence.PersistenceManager;
35
import org.gvsig.tools.persistence.PersistentState;
36

  
37
/**
38
 * Unit tests for the class {@link ColorPersistenceFactory}.
39
 * 
40
 * @author gvSIG team
41
 */
42
public class ColorPersistenceFactoryTest extends
43
		AbstractLibraryAutoInitTestCase {
44

  
45
	private ColorPersistenceFactory factory;
46
	private MockControl stateControl;
47
	private PersistentState state;
48
	private Color color;
49

  
50
	protected void doSetUp() throws Exception {
51
		PersistenceManager persistenceManager = ToolsLocator
52
				.getPersistenceManager();
53
		factory = (ColorPersistenceFactory) persistenceManager.getFactories()
54
				.get(Color.class);
55
		stateControl = MockControl.createNiceControl(PersistentState.class);
56
		state = (PersistentState) stateControl.getMock();
57
		color = Color.magenta;
58
	}
59

  
60
	/**
61
	 * Test method for
62
	 * {@link org.gvsig.fmap.mapcontext.tools.persistence.ColorPersistenceFactory#createFromState(org.gvsig.tools.persistence.PersistentState, java.lang.Class)}
63
	 * .
64
	 */
65
	public void testCreateFromState() throws Exception {
66
		stateControl.expectAndReturn(state
67
				.getInt(ColorPersistenceFactory.FIELD_RED), color.getRed());
68
		stateControl.expectAndReturn(state
69
				.getInt(ColorPersistenceFactory.FIELD_GREEN), color.getGreen());
70
		stateControl.expectAndReturn(state
71
				.getInt(ColorPersistenceFactory.FIELD_BLUE), color.getBlue());
72
		stateControl.expectAndReturn(state
73
				.getInt(ColorPersistenceFactory.FIELD_ALPHA), color.getAlpha());
74
		stateControl.replay();
75

  
76
		Color newColor = (Color) factory.createFromState(state);
77
		assertTrue(newColor.equals(color));
78

  
79
		stateControl.verify();
80
	}
81

  
82
	/**
83
	 * Test method for
84
	 * {@link org.gvsig.fmap.mapcontext.tools.persistence.ColorPersistenceFactory#saveToState(org.gvsig.tools.persistence.PersistentState, java.lang.Object)}
85
	 * .
86
	 */
87
	public void testSaveToState() throws Exception {
88
		state.set(ColorPersistenceFactory.FIELD_RED, color.getRed());
89
		state.set(ColorPersistenceFactory.FIELD_GREEN, color.getGreen());
90
		state.set(ColorPersistenceFactory.FIELD_BLUE, color.getBlue());
91
		state.set(ColorPersistenceFactory.FIELD_ALPHA, color.getAlpha());
92
		stateControl.replay();
93

  
94
		factory.saveToState(state, color);
95

  
96
		stateControl.verify();
97
	}
98

  
99
}
tags/v2_0_0_Build_2049/libraries/libFMap_mapcontext/src-test/org/gvsig/fmap/mapcontext/tools/persistence/Point2DPersistenceFactoryTest.java
1
/* gvSIG. Geographic Information System of the Valencian Government
2
 *
3
 * Copyright (C) 2007-2008 Infrastructures and Transports Department
4
 * of the Valencian Gobernment (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
 * 2009 {}  {{Task}}
26
 */
27
package org.gvsig.fmap.mapcontext.tools.persistence;
28

  
29
import java.awt.geom.Point2D;
30

  
31
import org.easymock.MockControl;
32
import org.gvsig.tools.ToolsLocator;
33
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase;
34
import org.gvsig.tools.persistence.PersistenceManager;
35
import org.gvsig.tools.persistence.PersistentState;
36

  
37
/**
38
 * Unit tests for the class {@link Point2DPersistenceFactory}.
39
 * 
40
 * @author 2009- <a href="cordinyana@gvsig.org">C?sar Ordi?ana</a> - gvSIG team
41
 */
42
public class Point2DPersistenceFactoryTest extends
43
		AbstractLibraryAutoInitTestCase {
44

  
45
	private Point2DPersistenceFactory factory;
46
	private MockControl stateControl;
47
	private PersistentState state;
48
	private Point2D point;
49

  
50
	protected void doSetUp() throws Exception {
51
		PersistenceManager persistenceManager = ToolsLocator
52
				.getPersistenceManager();
53
		factory = (Point2DPersistenceFactory) persistenceManager.getFactories()
54
				.get(Point2D.class);
55
		stateControl = MockControl.createNiceControl(PersistentState.class);
56
		state = (PersistentState) stateControl.getMock();
57
		double x = Math.random() * 1000d;
58
		double y = Math.random() * 1000d;
59
		point = new Point2D.Double(x, y);
60
	}
61

  
62
	/**
63
	 * Test method for
64
	 * {@link org.gvsig.fmap.mapcontext.tools.persistence.Point2DPersistenceFactory#createFromState(PersistentState, Class)}
65
	 * .
66
	 */
67
	public void testCreateFromState() throws Exception {
68
		stateControl.expectAndReturn(state
69
				.getDouble(Point2DPersistenceFactory.FIELD_X), point.getX());
70
		stateControl.expectAndReturn(state
71
				.getDouble(Point2DPersistenceFactory.FIELD_Y), point.getY());
72
		stateControl.replay();
73

  
74
		Point2D newPoint = (Point2D) factory.createFromState(state);
75
		assertTrue(newPoint.equals(point));
76

  
77
		stateControl.verify();
78
	}
79

  
80
	/**
81
	 * Test method for
82
	 * {@link org.gvsig.fmap.mapcontext.tools.persistence.Point2DPersistenceFactory#saveToState(org.gvsig.tools.persistence.PersistentState, java.lang.Object)}
83
	 * .
84
	 */
85
	public void testSaveToState() throws Exception {
86
		state.set(Point2DPersistenceFactory.FIELD_X, point.getX());
87
		state.set(Point2DPersistenceFactory.FIELD_Y, point.getY());
88
		stateControl.replay();
89

  
90
		factory.saveToState(state, point);
91

  
92
		stateControl.verify();
93
	}
94
}
tags/v2_0_0_Build_2049/libraries/libFMap_mapcontext/src-test/org/gvsig/fmap/mapcontext/impl/DefaultMapContextManagerTest.java
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
 * 2009 {DiSiD Technologies}  {{Task}}
26
 */
27
package org.gvsig.fmap.mapcontext.impl;
28

  
29
import java.awt.Graphics2D;
30
import java.awt.image.BufferedImage;
31
import java.util.Map;
32

  
33
import org.cresques.cts.ICoordTrans;
34

  
35
import org.gvsig.compat.print.PrintAttributes;
36
import org.gvsig.fmap.crs.CRSFactory;
37
import org.gvsig.fmap.dal.exception.ReadException;
38
import org.gvsig.fmap.dal.feature.Feature;
39
import org.gvsig.fmap.dal.feature.FeatureQuery;
40
import org.gvsig.fmap.dal.feature.FeatureStore;
41
import org.gvsig.fmap.mapcontext.MapContext;
42
import org.gvsig.fmap.mapcontext.MapContextDrawer;
43
import org.gvsig.fmap.mapcontext.MapContextException;
44
import org.gvsig.fmap.mapcontext.MapContextRuntimeException;
45
import org.gvsig.fmap.mapcontext.ViewPort;
46
import org.gvsig.fmap.mapcontext.layers.FLayers;
47
import org.gvsig.fmap.mapcontext.rendering.legend.ILegend;
48
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend;
49
import org.gvsig.fmap.mapcontext.rendering.legend.LegendException;
50
import org.gvsig.fmap.mapcontext.rendering.legend.driver.ILegendReader;
51
import org.gvsig.fmap.mapcontext.rendering.legend.driver.ILegendWriter;
52
import org.gvsig.fmap.mapcontext.rendering.legend.events.LegendContentsChangedListener;
53
import org.gvsig.fmap.mapcontext.rendering.legend.events.SymbolLegendEvent;
54
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
55
import org.gvsig.tools.evaluator.Evaluator;
56
import org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase;
57
import org.gvsig.tools.observer.Observer;
58
import org.gvsig.tools.persistence.PersistentState;
59
import org.gvsig.tools.persistence.exception.PersistenceException;
60
import org.gvsig.tools.task.Cancellable;
61

  
62
/**
63
 * @author <a href="mailto:cordinyana@gvsig.org">C?sar Ordi?ana</a>
64
 */
65
public class DefaultMapContextManagerTest extends
66
AbstractLibraryAutoInitTestCase {
67

  
68
    private DefaultMapContextManager manager;
69

  
70
    protected void doSetUp() throws Exception {
71
        manager = new DefaultMapContextManager();
72

  
73
        manager.registerLegend("DummyLegend", DummyVectorLegend.class);
74
        manager.setDefaultVectorLegend("DummyLegend");
75
        manager.registerLegendReader("Dummy", DummyLegendReader.class);
76
        manager.registerLegendWriter("DummyLegend", "Dummy", DummyLegendWriter.class);
77
    }
78

  
79
    protected void tearDown() throws Exception {
80
        super.tearDown();
81
    }
82

  
83
    /**
84
     * Test method for
85
     * {@link org.gvsig.fmap.mapcontext.impl.DefaultMapContextManager#createDefaultMapContextDrawerInstance()}
86
     * .
87
     */
88
    public void testGetDefaultMapContextDrawerInstance() throws Exception {
89

  
90
        manager.setDefaultMapContextDrawer(DummyMapContextDrawer.class);
91

  
92
        MapContextDrawer drawer = manager
93
        .createDefaultMapContextDrawerInstance();
94

  
95
        assertNotNull("The created MapContextDrawer instance can't be null",
96
            drawer);
97
        assertTrue(
98
            "The created MapContextDrawer is not instance of the registered class"
99
            + DummyMapContextDrawer.class,
100
            drawer instanceof DummyMapContextDrawer);
101
    }
102

  
103
    /**
104
     * Test method for
105
     * {@link org.gvsig.fmap.mapcontext.impl.DefaultMapContextManager#setDefaultMapContextDrawer(java.lang.Class)}
106
     * .
107
     */
108
    public void testSetDefaultMapContextDrawer() throws Exception {
109

  
110
        // First, try to register an invalid class
111
        try {
112
            manager.setDefaultMapContextDrawer(Object.class);
113
            fail("Error, a class that does not implement the MapContextDrawer "
114
                + "interface has been accepted");
115
        } catch (MapContextRuntimeException e) {
116
            // OK
117
        }
118

  
119
        // Next, try to register a valid class
120
        manager.setDefaultMapContextDrawer(DummyMapContextDrawer.class);
121
    }
122

  
123
    public void testCreateGraphicsLayer() throws Exception {
124
        assertNotNull(manager.createGraphicsLayer(CRSFactory.getCRS("EPSG:23030")));
125
    }
126

  
127
    public void testCreateDefaultVectorLegend() throws Exception {
128

  
129
        IVectorLegend legend = manager.createDefaultVectorLegend(1);
130
        assertNotNull(legend);
131
        assertTrue(legend instanceof DummyVectorLegend);
132
    }
133

  
134
    public void testRegisterCreateLegend() throws Exception {
135

  
136
        manager.registerLegend("DummyLegend", DummyVectorLegend.class);
137

  
138
        ILegend legend = manager.createLegend("DummyLegend");
139
        assertNotNull(legend);
140
        assertTrue(legend instanceof DummyVectorLegend);
141

  
142
        assertNull(manager.createLegend("NONE"));
143
    }
144

  
145
    public void testRegisterCreateLegendReader() throws Exception {
146

  
147
        manager.registerLegendReader("Dummy", DummyLegendReader.class);
148

  
149
        ILegendReader legendReader = manager.createLegendReader("Dummy");
150
        assertNotNull(legendReader);
151
        assertTrue(legendReader instanceof DummyLegendReader);
152

  
153
        assertNull(manager.createLegendReader("NONE"));
154
    }
155

  
156
    public void testRegisterCreateLegendWriter() throws Exception {
157

  
158
        manager.registerLegend("DummyLegend", DummyVectorLegend.class);
159

  
160
        manager.registerLegendWriter("DummyLegend", "Dummy",
161
            DummyLegendWriter.class);
162

  
163
        // Test the registered writer is created
164
        ILegendWriter legendWriter = manager.createLegendWriter("DummyLegend",
165
        "Dummy");
166
        assertNotNull(legendWriter);
167
        assertTrue(legendWriter instanceof DummyLegendWriter);
168

  
169
        // Test non registered cases
170
        assertNull(manager.createLegendWriter("NONE", "Dummy"));
171
        assertNull(manager.createLegendWriter("DummyLegend", "NONE"));
172
        assertNull(manager.createLegendWriter("NONE", "NONE"));
173
    }
174

  
175
    public static class DummyMapContextDrawer implements MapContextDrawer {
176

  
177
        public void dispose() {
178
        }
179

  
180
        public void draw(FLayers root, BufferedImage image, Graphics2D g,
181
            Cancellable cancel, double scale) throws ReadException {
182
        }
183

  
184
        public void print(FLayers root, Graphics2D g, Cancellable cancel,
185
            double scale, PrintAttributes properties) throws ReadException {
186
        }
187

  
188
        public void setMapContext(MapContext mapContext) {
189
        }
190

  
191
        public void setViewPort(ViewPort viewPort) {
192
        }
193

  
194
    }
195

  
196
    public static class DummyLegendReader implements ILegendReader {
197

  
198
    }
199

  
200
    public static class DummyLegendWriter implements ILegendWriter {
201

  
202
    }
203

  
204
    public static class DummyVectorLegend implements IVectorLegend {
205

  
206
        public void draw(BufferedImage image, Graphics2D graphics2d,
207
            ViewPort viewPort, Cancellable cancel, double scale,
208
            Map queryParameters, ICoordTrans coordTrans,
209
            FeatureStore featureStore, FeatureQuery featureQuery) throws LegendException {
210
            // Empty method
211
        }
212

  
213
        public void draw(BufferedImage image, Graphics2D graphics2d,
214
            ViewPort viewPort, Cancellable cancel, double scale,
215
            Map queryParameters, ICoordTrans coordTrans,
216
            FeatureStore featureStore) throws LegendException {
217
            // Empty method
218
        }
219

  
220
        public int getShapeType() {
221
            // Empty method
222
            return 0;
223
        }
224

  
225
        public ISymbol getSymbolByFeature(Feature feat)
226
        throws MapContextException {
227
            // Empty method
228
            return null;
229
        }
230

  
231
        public boolean isSuitableForShapeType(int shapeType) {
232
            // Empty method
233
            return false;
234
        }
235

  
236
        public boolean isUseDefaultSymbol() {
237
            // Empty method
238
            return false;
239
        }
240

  
241
        public void print(Graphics2D g, ViewPort viewPort, Cancellable cancel,
242
            double scale, Map queryParameters, ICoordTrans coordTrans,
243
            FeatureStore featureStore, PrintAttributes properties)
244
        throws LegendException {
245
            // Empty method
246
        }
247

  
248
        public void print(Graphics2D g, ViewPort viewPort, Cancellable cancel,
249
            double scale, Map queryParameters, ICoordTrans coordTrans,
250
            FeatureStore featureStore, FeatureQuery featureQuery, PrintAttributes properties)
251
        throws LegendException {
252
            // Empty method
253
        }
254

  
255
        public void setDefaultSymbol(ISymbol s) {
256
            // Empty method
257
        }
258

  
259
        public void setShapeType(int shapeType) {
260
            // Empty method
261
        }
262

  
263
        public void useDefaultSymbol(boolean b) {
264
            // Empty method
265
        }
266

  
267
        public void addLegendListener(LegendContentsChangedListener listener) {
268
            // Empty method
269
        }
270

  
271
        public ILegend cloneLegend() {
272
            // Empty method
273
            return null;
274
        }
275

  
276
        public Object clone() throws CloneNotSupportedException {
277
            // TODO Auto-generated method stub
278
            return super.clone();
279
        }
280

  
281
        public void fireDefaultSymbolChangedEvent(SymbolLegendEvent event) {
282
            // Empty method
283
        }
284

  
285
        public ISymbol getDefaultSymbol() {
286
            // Empty method
287
            return null;
288
        }
289

  
290
        public LegendContentsChangedListener[] getListeners() {
291
            // Empty method
292
            return null;
293
        }
294

  
295
        public void removeLegendListener(LegendContentsChangedListener listener) {
296
            // Empty method
297
        }
298

  
299
        public void loadFromState(PersistentState state)
300
        throws PersistenceException {
301
            // Empty method
302
        }
303

  
304
        public void saveToState(PersistentState state)
305
        throws PersistenceException {
306
            // Empty method
307
        }
308

  
309
        public void addDrawingObserver(Observer observer) {
310
            // Empty method
311
        }
312

  
313
        public void deleteDrawingObserver(Observer observer) {
314
            // Empty method
315
        }
316

  
317
        public void deleteDrawingObservers() {
318
            // Empty method
319
        }
320
    }
321
}
tags/v2_0_0_Build_2049/libraries/libFMap_mapcontext/src-test/org/gvsig/fmap/mapcontext/persistence/DummyFileFeatureStore.java
1
package org.gvsig.fmap.mapcontext.persistence;
2

  
3
import java.text.DateFormat;
4
import java.util.Collection;
5
import java.util.Iterator;
6
import java.util.List;
7
import java.util.Set;
8

  
9
import org.cresques.cts.IProjection;
10

  
11
import org.gvsig.fmap.dal.DataQuery;
12
import org.gvsig.fmap.dal.DataServerExplorer;
13
import org.gvsig.fmap.dal.DataSet;
14
import org.gvsig.fmap.dal.DataStoreParameters;
15
import org.gvsig.fmap.dal.exception.DataException;
16
import org.gvsig.fmap.dal.exception.ValidateDataParametersException;
17
import org.gvsig.fmap.dal.feature.EditableFeature;
18
import org.gvsig.fmap.dal.feature.EditableFeatureType;
19
import org.gvsig.fmap.dal.feature.Feature;
20
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor;
21
import org.gvsig.fmap.dal.feature.FeatureAttributeGetter;
22
import org.gvsig.fmap.dal.feature.FeatureCache;
23
import org.gvsig.fmap.dal.feature.FeatureIndex;
24
import org.gvsig.fmap.dal.feature.FeatureIndexes;
25
import org.gvsig.fmap.dal.feature.FeatureLocks;
26
import org.gvsig.fmap.dal.feature.FeatureQuery;
27
import org.gvsig.fmap.dal.feature.FeatureReference;
28
import org.gvsig.fmap.dal.feature.FeatureRules;
29
import org.gvsig.fmap.dal.feature.FeatureSelection;
30
import org.gvsig.fmap.dal.feature.FeatureSet;
31
import org.gvsig.fmap.dal.feature.FeatureStore;
32
import org.gvsig.fmap.dal.feature.FeatureStoreTransforms;
33
import org.gvsig.fmap.dal.feature.FeatureType;
34
import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters;
35
import org.gvsig.fmap.dal.feature.exception.NeedEditingModeException;
36
import org.gvsig.fmap.geom.Geometry;
37
import org.gvsig.fmap.geom.primitive.Envelope;
38
import org.gvsig.fmap.geom.type.GeometryType;
39
import org.gvsig.timesupport.Interval;
40
import org.gvsig.tools.ToolsLocator;
41
import org.gvsig.tools.dataTypes.CoercionException;
42
import org.gvsig.tools.dataTypes.DataType;
43
import org.gvsig.tools.dynobject.DynClass;
44
import org.gvsig.tools.dynobject.DynField;
45
import org.gvsig.tools.dynobject.DynMethod;
46
import org.gvsig.tools.dynobject.DynObject;
47
import org.gvsig.tools.dynobject.DynObjectValueItem;
48
import org.gvsig.tools.dynobject.DynStruct;
49
import org.gvsig.tools.dynobject.exception.DynFieldIsNotAContainerException;
50
import org.gvsig.tools.dynobject.exception.DynFieldNotFoundException;
51
import org.gvsig.tools.dynobject.exception.DynFieldValidateException;
52
import org.gvsig.tools.dynobject.exception.DynMethodException;
53
import org.gvsig.tools.dynobject.exception.DynObjectValidateException;
54
import org.gvsig.tools.evaluator.Evaluator;
55
import org.gvsig.tools.exception.BaseException;
56
import org.gvsig.tools.observer.Observer;
57
import org.gvsig.tools.persistence.PersistenceManager;
58
import org.gvsig.tools.persistence.PersistentState;
59
import org.gvsig.tools.persistence.exception.PersistenceException;
60
import org.gvsig.tools.undo.RedoException;
61
import org.gvsig.tools.undo.UndoException;
62
import org.gvsig.tools.visitor.Visitor;
63

  
64
public class DummyFileFeatureStore implements FeatureStore {
65

  
66
	public static class DummyFeatureAttributeDescriptor implements
67
			FeatureAttributeDescriptor {
68

  
69
		public boolean allowNull() {
70
			// TODO Auto-generated method stub
71
			return false;
72
		}
73

  
74
		public Object getAdditionalInfo(String infoName) {
75
			// TODO Auto-generated method stub
76
			return null;
77
		}
78

  
79
		public FeatureAttributeDescriptor getCopy() {
80
			// TODO Auto-generated method stub
81
			return null;
82
		}
83

  
84
		public DataType getDataType() {
85
			// TODO Auto-generated method stub
86
			return null;
87
		}
88

  
89
		public String getDataTypeName() {
90
			// TODO Auto-generated method stub
91
			return null;
92
		}
93

  
94
		public DateFormat getDateFormat() {
95
			// TODO Auto-generated method stub
96
			return null;
97
		}
98

  
99
		public Object getDefaultValue() {
100
			// TODO Auto-generated method stub
101
			return null;
102
		}
103

  
104
		public Evaluator getEvaluator() {
105
			// TODO Auto-generated method stub
106
			return null;
107
		}
108

  
109
		public int getGeometrySubType() {
110
			// TODO Auto-generated method stub
111
			return 0;
112
		}
113

  
114
		public int getGeometryType() {
115
			return Geometry.TYPES.POINT;
116
		}
117

  
118
		public int getIndex() {
119
			// TODO Auto-generated method stub
120
			return 0;
121
		}
122

  
123
		public int getMaximumOccurrences() {
124
			// TODO Auto-generated method stub
125
			return 0;
126
		}
127

  
128
		public int getMinimumOccurrences() {
129
			// TODO Auto-generated method stub
130
			return 0;
131
		}
132

  
133
		public String getName() {
134
			// TODO Auto-generated method stub
135
			return null;
136
		}
137

  
138
		public Class getObjectClass() {
139
			// TODO Auto-generated method stub
140
			return null;
141
		}
142

  
143
		public int getPrecision() {
144
			// TODO Auto-generated method stub
145
			return 0;
146
		}
147

  
148
		public IProjection getSRS() {
149
			// TODO Auto-generated method stub
150
			return null;
151
		}
152

  
153
		public int getSize() {
154
			// TODO Auto-generated method stub
155
			return 0;
156
		}
157

  
158
		public int getType() {
159
			// TODO Auto-generated method stub
160
			return 0;
161
		}
162

  
163
		public boolean isAutomatic() {
164
			// TODO Auto-generated method stub
165
			return false;
166
		}
167

  
168
		public boolean isPrimaryKey() {
169
			// TODO Auto-generated method stub
170
			return false;
171
		}
172

  
173
		public boolean isReadOnly() {
174
			// TODO Auto-generated method stub
175
			return false;
176
		}
177
      
178
        public String getSubtype() {
179
            // TODO Auto-generated method stub
180
            return null;
181
        }
182

  
183
        public int getTheTypeOfAvailableValues() {
184
            // TODO Auto-generated method stub
185
            return 0;
186
        }
187

  
188
        public boolean isContainer() {
189
            // TODO Auto-generated method stub
190
            return false;
191
        }
192

  
193
        public boolean isHidden() {
194
            // TODO Auto-generated method stub
195
            return false;
196
        }
197

  
198
        public boolean isMandatory() {
199
            // TODO Auto-generated method stub
200
            return false;
201
        }
202

  
203
        public boolean isPersistent() {
204
            // TODO Auto-generated method stub
205
            return false;
206
        }
207

  
208
        public DynField setAvailableValues(DynObjectValueItem[] values) {
209
            // TODO Auto-generated method stub
210
            return null;
211
        }
212

  
213
        public DynField setAvailableValues(List values) {
214
            // TODO Auto-generated method stub
215
            return null;
216
        }
217

  
218
        public DynField setClassOfItems(Class theClass)
219
            throws DynFieldIsNotAContainerException {
220
            // TODO Auto-generated method stub
221
            return null;
222
        }
223

  
224
        public DynField setClassOfValue(Class theClass)
225
            throws DynFieldIsNotAContainerException {
226
            // TODO Auto-generated method stub
227
            return null;
228
        }
229

  
230
        public DynField setDefaultDynValue(Object defaultValue) {
231
            // TODO Auto-generated method stub
232
            return null;
233
        }
234

  
235
        public DynField setDefaultFieldValue(Object defaultValue) {
236
            // TODO Auto-generated method stub
237
            return null;
238
        }
239

  
240
        public DynField setDescription(String description) {
241
            // TODO Auto-generated method stub
242
            return null;
243
        }
244

  
245
        public DynField setElementsType(int type)
246
            throws DynFieldIsNotAContainerException {
247
            // TODO Auto-generated method stub
248
            return null;
249
        }
250

  
251
        public DynField setElementsType(DynStruct type)
252
            throws DynFieldIsNotAContainerException {
253
            // TODO Auto-generated method stub
254
            return null;
255
        }
256

  
257
        public DynField setGroup(String groupName) {
258
            // TODO Auto-generated method stub
259
            return null;
260
        }
261

  
262
        public DynField setHidden(boolean hidden) {
263
            // TODO Auto-generated method stub
264
            return null;
265
        }
266

  
267
        public DynField setMandatory(boolean mandatory) {
268
            // TODO Auto-generated method stub
269
            return null;
270
        }
271

  
272
        public DynField setMaxValue(Object maxValue) {
273
            // TODO Auto-generated method stub
274
            return null;
275
        }
276

  
277
        public DynField setMinValue(Object minValue) {
278
            // TODO Auto-generated method stub
279
            return null;
280
        }
281

  
282
        public DynField setOrder(int order) {
283
            // TODO Auto-generated method stub
284
            return null;
285
        }
286

  
287
        public DynField setPersistent(boolean persistent) {
288
            // TODO Auto-generated method stub
289
            return null;
290
        }
291

  
292
        public DynField setReadOnly(boolean isReadOnly) {
293
            // TODO Auto-generated method stub
294
            return null;
295
        }
296

  
297
        public DynField setSubtype(String subtype) {
298
            // TODO Auto-generated method stub
299
            return null;
300
        }
301

  
302
        public DynField setTheTypeOfAvailableValues(int type) {
303
            // TODO Auto-generated method stub
304
            return null;
305
        }
306

  
307
        public DynField setType(int type) {
308
            // TODO Auto-generated method stub
309
            return null;
310
        }
311

  
312
        public DynField setType(DataType type) {
313
            // TODO Auto-generated method stub
314
            return null;
315
        }
316

  
317
        public void validate(Object value) throws DynFieldValidateException {
318
            // TODO Auto-generated method stub
319
            
320
        }
321

  
322
        public Object coerce(Object value) throws CoercionException {
323
            // TODO Auto-generated method stub
324
            return null;
325
        }
326

  
327
        public DynObjectValueItem[] getAvailableValues() {
328
            // TODO Auto-generated method stub
329
            return null;
330
        }
331

  
332
        public Class getClassOfItems() {
333
            // TODO Auto-generated method stub
334
            return null;
335
        }
336

  
337
        public Class getClassOfValue() {
338
            // TODO Auto-generated method stub
339
            return null;
340
        }
341

  
342
        public String getDescription() {
343
            // TODO Auto-generated method stub
344
            return null;
345
        }
346

  
347
        public DynField getElementsType() {
348
            // TODO Auto-generated method stub
349
            return null;
350
        }
351

  
352
        public String getGroup() {
353
            // TODO Auto-generated method stub
354
            return null;
355
        }
356

  
357
        public Object getMaxValue() {
358
            // TODO Auto-generated method stub
359
            return null;
360
        }
361

  
362
        public Object getMinValue() {
363
            // TODO Auto-generated method stub
364
            return null;
365
        }
366

  
367
        public int getOder() {
368
            // TODO Auto-generated method stub
369
            return 0;
370
        }
371

  
372
        public GeometryType getGeomType() {
373
            // TODO Auto-generated method stub
374
            return null;
375
        }
376

  
377
        public boolean isTime() {
378
            // TODO Auto-generated method stub
379
            return false;
380
        }
381

  
382
        public FeatureAttributeGetter getFeatureAttributeGetter() {
383
            // TODO Auto-generated method stub
384
            return null;
385
        }
386

  
387
        public void setFeatureAttributeGetter(
388
            FeatureAttributeGetter featureAttributeGetter) {
389
            // TODO Auto-generated method stub
390
            
391
        }
392
	}
393

  
394
	public static class DummyFeatureType implements FeatureType {
395

  
396
		public boolean allowAutomaticValues() {
397
			// TODO Auto-generated method stub
398
			return false;
399
		}
400

  
401
		public Object get(String name) {
402
			// TODO Auto-generated method stub
403
			return null;
404
		}
405

  
406
		public Object get(int index) {
407
			// TODO Auto-generated method stub
408
			return null;
409
		}
410

  
411
		public FeatureAttributeDescriptor getAttributeDescriptor(String name) {
412
			// TODO Auto-generated method stub
413
			return null;
414
		}
415

  
416
		public FeatureAttributeDescriptor getAttributeDescriptor(int index) {
417
			return new DummyFeatureAttributeDescriptor();
418
		}
419

  
420
		public FeatureAttributeDescriptor[] getAttributeDescriptors() {
421
			// TODO Auto-generated method stub
422
			return null;
423
		}
424

  
425
		public FeatureType getCopy() {
426
			// TODO Auto-generated method stub
427
			return null;
428
		}
429

  
430
		public FeatureAttributeDescriptor getDefaultGeometryAttribute() {
431
			// TODO Auto-generated method stub
432
			return null;
433
		}
434

  
435
		public int getDefaultGeometryAttributeIndex() {
436
			return 0;
437
		}
438

  
439
		public String getDefaultGeometryAttributeName() {
440
			// TODO Auto-generated method stub
441
			return null;
442
		}
443

  
444
		public IProjection getDefaultSRS() {
445
			// TODO Auto-generated method stub
446
			return null;
447
		}
448

  
449
		public EditableFeatureType getEditable() {
450
			// TODO Auto-generated method stub
451
			return null;
452
		}
453

  
454
		public String getId() {
455
			// TODO Auto-generated method stub
456
			return null;
457
		}
458

  
459
		public int getIndex(String name) {
460
			// TODO Auto-generated method stub
461
			return 0;
462
		}
463

  
464
		public FeatureAttributeDescriptor[] getPrimaryKey() {
465
			// TODO Auto-generated method stub
466
			return null;
467
		}
468

  
469
		public FeatureRules getRules() {
470
			// TODO Auto-generated method stub
471
			return null;
472
		}
473

  
474
		public List getSRSs() {
475
			// TODO Auto-generated method stub
476
			return null;
477
		}
478

  
479
		public boolean hasEvaluators() {
480
			// TODO Auto-generated method stub
481
			return false;
482
		}
483

  
484
		public boolean hasOID() {
485
			// TODO Auto-generated method stub
486
			return false;
487
		}
488

  
489
		public Iterator iterator() {
490
			// TODO Auto-generated method stub
491
			return null;
492
		}
493

  
494
		public int size() {
495
			// TODO Auto-generated method stub
496
			return 0;
497
		}
498

  
499
        public DynClass[] getSuperDynClasses() {
500
            // TODO Auto-generated method stub
501
            return null;
502
        }
503

  
504
        public void removeDynMethod(String name) {
505
            // TODO Auto-generated method stub
506
            
507
        }
508

  
509
        public DynField addDynField(String name) {
510
            // TODO Auto-generated method stub
511
            return null;
512
        }
513

  
514
        public DynField addDynFieldArray(String name) {
515
            // TODO Auto-generated method stub
516
            return null;
517
        }
518

  
519
        public DynField addDynFieldBoolean(String name) {
520
            // TODO Auto-generated method stub
521
            return null;
522
        }
523

  
524
        public DynField addDynFieldChoice(String name, int type,
525
            Object defaultValue, DynObjectValueItem[] values,
526
            boolean mandatory, boolean persistent) {
527
            // TODO Auto-generated method stub
528
            return null;
529
        }
530

  
531
        public DynField addDynFieldChoice(String name, int type,
532
            Object defaultValue, DynObjectValueItem[] values) {
533
            // TODO Auto-generated method stub
534
            return null;
535
        }
536

  
537
        public DynField addDynFieldDate(String name) {
538
            // TODO Auto-generated method stub
539
            return null;
540
        }
541

  
542
        public DynField addDynFieldDouble(String name) {
543
            // TODO Auto-generated method stub
544
            return null;
545
        }
546

  
547
        public DynField addDynFieldFile(String name) {
548
            // TODO Auto-generated method stub
549
            return null;
550
        }
551

  
552
        public DynField addDynFieldFloat(String name) {
553
            // TODO Auto-generated method stub
554
            return null;
555
        }
556

  
557
        public DynField addDynFieldFolder(String name) {
558
            // TODO Auto-generated method stub
559
            return null;
560
        }
561

  
562
        public DynField addDynFieldInt(String name) {
563
            // TODO Auto-generated method stub
564
            return null;
565
        }
566

  
567
        public DynField addDynFieldList(String name) {
568
            // TODO Auto-generated method stub
569
            return null;
570
        }
571

  
572
        public DynField addDynFieldLong(String name) {
573
            // TODO Auto-generated method stub
574
            return null;
575
        }
576

  
577
        public DynField addDynFieldMap(String name) {
578
            // TODO Auto-generated method stub
579
            return null;
580
        }
581

  
582
        public DynField addDynFieldObject(String name) {
583
            // TODO Auto-generated method stub
584
            return null;
585
        }
586

  
587
        public DynField addDynFieldRange(String name, int type,
588
            Object defaultValue, Object min, Object max, boolean mandatory,
589
            boolean persistent) {
590
            // TODO Auto-generated method stub
591
            return null;
592
        }
593

  
594
        public DynField addDynFieldRange(String name, int type,
595
            Object defaultValue, Object min, Object max) {
596
            // TODO Auto-generated method stub
597
            return null;
598
        }
599

  
600
        public DynField addDynFieldSet(String name) {
601
            // TODO Auto-generated method stub
602
            return null;
603
        }
604

  
605
        public DynField addDynFieldSingle(String name, int type,
606
            Object defaultValue, boolean mandatory, boolean persistent) {
607
            // TODO Auto-generated method stub
608
            return null;
609
        }
610

  
611
        public DynField addDynFieldSingle(String name, int type,
612
            Object defaultValue) {
613
            // TODO Auto-generated method stub
614
            return null;
615
        }
616

  
617
        public DynField addDynFieldString(String name) {
618
            // TODO Auto-generated method stub
619
            return null;
620
        }
621

  
622
        public DynField addDynFieldURI(String name) {
623
            // TODO Auto-generated method stub
624
            return null;
625
        }
626

  
627
        public DynField addDynFieldURL(String name) {
628
            // TODO Auto-generated method stub
629
            return null;
630
        }
631

  
632
        public void extend(DynStruct struct) {
633
            // TODO Auto-generated method stub
634
            
635
        }
636

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff