/[schmitzm]/trunk/src/skrueger/AttributeMetadataInterface.java
ViewVC logotype

Contents of /trunk/src/skrueger/AttributeMetadataInterface.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 770 - (show annotations)
Sun Mar 21 11:36:11 2010 UTC (14 years, 11 months ago) by alfonx
Original Path: trunk/src/skrueger/AttributeMetadata.java
File size: 2930 byte(s)
Had to switch the AttributeMetadata key from org.opengis.feature.type.Name to geotools.NameImpl. That sounds not-so-nice, because it is generally better to program against an interface instead of an implementation, BUT NameImpl implements Serializable which is a big help when i want to map that AttributeMetaDataMap in another project.
1 package skrueger;
2
3 import java.util.HashSet;
4
5 import org.geotools.feature.NameImpl;
6 import org.opengis.feature.type.Name;
7
8 import skrueger.geotools.Copyable;
9 import skrueger.i8n.Translation;
10
11 public interface AttributeMetadata extends Copyable<AttributeMetadata>,
12 Comparable<AttributeMetadata> {
13
14 /**
15 * @return a translatable title for this attribute..
16 */
17 public Translation getTitle();
18
19 /**
20 * Set a translatable title for this attribute..
21 */
22 public void setTitle(Translation title);
23
24 /**
25 * @return a translatable description for this attribute
26 */
27 public Translation getDesc();
28
29 /**
30 * Set a translatable description for this attribute.
31 */
32 public void setDesc(Translation desc);
33
34 /**
35 * The local name. E.g. the name of the DBF column as a {@link String}.
36 */
37 public String getLocalName();
38
39 /**
40 * A short form for #setName(new NameImpl(localName))
41 */
42 public void setLocalName(String localName);
43
44 /**
45 * The fully qualified {@link Name} of the attribute, e.g.
46 * <code>org.bla.plo:blub</code>. The second part equals the
47 * {@link #getLocalName()} value. The first may be <code>null</code> or
48 * represent the layer name.
49 */
50 public NameImpl getName();
51
52 /**
53 * set the fully qualified {@link Name} of this attribute.
54 */
55 public void setName(NameImpl name);
56
57 /**
58 * A list og objects that represent NODATA-values for this attribute. The
59 * objects are supporsed to be correctly casted already. That means that the
60 * NODATA objects listed here have must have the same type as the values of
61 * this object.
62 */
63 public HashSet<Object> getNodataValues();
64
65 /**
66 * Takes any value object and checks it against the NODATA values. If the
67 * value equals a NODATA value, <code>null</code> is returned. Otherwise the
68 * same object is returned.
69 *
70 * Note: This method is called often.
71 */
72 public Object fiterNodata(Object value);
73
74 /**
75 * @return a non-translatable unit {@link String} for this attribute values.
76 */
77 public String getUnit();
78
79 /**
80 * Set a unit {@link String} for this attribute values.
81 */
82 public void setUnit(String unit);
83
84 /**
85 * @return A value defining the position of this attribute whenever the
86 * attributes are listed to an end-user. The higher the weight, the
87 * lower the position. (heavy goes down, light goes up)
88 */
89 public double getWeight();
90
91 /**
92 * set a value defining the position of this attribute whenever the
93 * attributes are listed to an end-user. The higher the weight, the lower
94 * the position. (heavy goes down, light goes up)
95 */
96 public void setWeight(double weight);
97
98 /**
99 * @return <code>false</code> if this attribute should not be selectable or
100 * shown to the end-user.
101 */
102 public boolean isVisible();
103
104 /**
105 * Set <code>false</code> if this attribute should not be shown to the
106 * end-user.
107 */
108 public void setVisible(boolean visible);
109
110 String getNoDataValuesFormatted();
111
112 }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26