1
2
3
4
5
6 package nl.javel.gisbeans.geom;
7
8 import java.io.Serializable;
9
10 /***
11 * the GisObject class stores both the java2D shape as the accomplishing array
12 * of attributes.
13 *
14 * @author <a href="mailto:peter.jacobs@javel.nl">Peter Jacobs </a> <br>
15 * <a href="mailto:paul.jacobs@javel.nl">Paul Jacobs </a>
16 * @since JDK 1.0
17 * @version 1.0
18 */
19 public class GisObject implements Serializable
20 {
21 /*** the represented shape */
22 private Object shape;
23
24 /*** the attributes */
25 private String[] attributes;
26
27 /***
28 * constructs a GisObject
29 *
30 * @param shape the shape (either a <code>java.awt.geom.Point2D</code> or
31 * a <code>java.awt.Shape</code>
32 * @param attributes attributes
33 */
34 public GisObject(final Object shape, final String[] attributes)
35 {
36 this.shape = shape;
37 this.attributes = attributes;
38 }
39
40 /***
41 * returns the shape of the GisObject
42 *
43 * @return Object the resulting shape
44 */
45 public Object getShape()
46 {
47 return this.shape;
48 }
49
50 /***
51 * returns the attributes of the shape
52 *
53 * @return String[] the array of Strings representing the attributes of the
54 * GisObject.
55 */
56 public String[] getAttributes()
57 {
58 return this.attributes;
59 }
60 }