/[schmitzm]/branches/2.2.x/src/skrueger/AttributeMetadataInterface.java
ViewVC logotype

Annotation of /branches/2.2.x/src/skrueger/AttributeMetadataInterface.java

Parent Directory Parent Directory | Revision Log Revision Log


Revision 770 - (hide 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 alfonx 244 package skrueger;
2    
3 alfonx 658 import java.util.HashSet;
4 alfonx 518
5 alfonx 770 import org.geotools.feature.NameImpl;
6 alfonx 464 import org.opengis.feature.type.Name;
7 alfonx 244
8 alfonx 420 import skrueger.geotools.Copyable;
9 alfonx 244 import skrueger.i8n.Translation;
10    
11 alfonx 769 public interface AttributeMetadata extends Copyable<AttributeMetadata>,
12 alfonx 518 Comparable<AttributeMetadata> {
13 alfonx 681
14 alfonx 534 /**
15 alfonx 769 * @return a translatable title for this attribute..
16 alfonx 244 */
17 alfonx 769 public Translation getTitle();
18 alfonx 464
19 alfonx 244 /**
20 alfonx 769 * Set a translatable title for this attribute..
21 alfonx 658 */
22 alfonx 769 public void setTitle(Translation title);
23 alfonx 658
24     /**
25 alfonx 769 * @return a translatable description for this attribute
26 alfonx 534 */
27 alfonx 769 public Translation getDesc();
28 alfonx 534
29     /**
30 alfonx 769 * Set a translatable description for this attribute.
31 alfonx 534 */
32 alfonx 769 public void setDesc(Translation desc);
33 alfonx 534
34     /**
35 alfonx 769 * The local name. E.g. the name of the DBF column as a {@link String}.
36 alfonx 244 */
37 alfonx 769 public String getLocalName();
38 alfonx 244
39 alfonx 464 /**
40 alfonx 769 * A short form for #setName(new NameImpl(localName))
41 alfonx 464 */
42 alfonx 769 public void setLocalName(String localName);
43 alfonx 464
44     /**
45 alfonx 769 * 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 alfonx 464 */
50 alfonx 770 public NameImpl getName();
51 alfonx 464
52     /**
53 alfonx 769 * set the fully qualified {@link Name} of this attribute.
54 alfonx 464 */
55 alfonx 770 public void setName(NameImpl name);
56 alfonx 464
57     /**
58 alfonx 769 * 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 alfonx 464 */
63 alfonx 769 public HashSet<Object> getNodataValues();
64 alfonx 464
65 alfonx 534 /**
66 alfonx 769 * 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 alfonx 534 */
72 alfonx 769 public Object fiterNodata(Object value);
73 alfonx 534
74     /**
75 alfonx 769 * @return a non-translatable unit {@link String} for this attribute values.
76 alfonx 534 */
77 alfonx 769 public String getUnit();
78 alfonx 244
79 alfonx 534 /**
80 alfonx 769 * Set a unit {@link String} for this attribute values.
81 alfonx 534 */
82 alfonx 769 public void setUnit(String unit);
83 alfonx 244
84 alfonx 534 /**
85 alfonx 769 * @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 alfonx 534 */
89 alfonx 769 public double getWeight();
90 alfonx 534
91     /**
92 alfonx 769 * 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 alfonx 534 */
96 alfonx 769 public void setWeight(double weight);
97 alfonx 464
98     /**
99 alfonx 769 * @return <code>false</code> if this attribute should not be selectable or
100     * shown to the end-user.
101 alfonx 464 */
102 alfonx 769 public boolean isVisible();
103 alfonx 464
104     /**
105 alfonx 769 * Set <code>false</code> if this attribute should not be shown to the
106     * end-user.
107 alfonx 464 */
108 alfonx 769 public void setVisible(boolean visible);
109 alfonx 464
110 alfonx 769 String getNoDataValuesFormatted();
111 alfonx 681
112 alfonx 244 }

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26