1 |
alfonx |
244 |
package skrueger; |
2 |
|
|
|
3 |
alfonx |
658 |
import java.util.HashSet; |
4 |
alfonx |
518 |
|
5 |
alfonx |
464 |
import org.opengis.feature.type.Name; |
6 |
alfonx |
244 |
|
7 |
alfonx |
420 |
import skrueger.geotools.Copyable; |
8 |
alfonx |
244 |
import skrueger.i8n.Translation; |
9 |
|
|
|
10 |
alfonx |
772 |
public interface AttributeMetadataInterface extends Copyable<AttributeMetadataInterface>, |
11 |
|
|
Comparable<AttributeMetadataInterface> { |
12 |
alfonx |
681 |
|
13 |
alfonx |
534 |
/** |
14 |
alfonx |
769 |
* @return a translatable title for this attribute.. |
15 |
alfonx |
244 |
*/ |
16 |
alfonx |
769 |
public Translation getTitle(); |
17 |
alfonx |
464 |
|
18 |
alfonx |
244 |
/** |
19 |
alfonx |
769 |
* Set a translatable title for this attribute.. |
20 |
alfonx |
658 |
*/ |
21 |
alfonx |
769 |
public void setTitle(Translation title); |
22 |
alfonx |
772 |
|
23 |
|
|
/** |
24 |
|
|
* Set an untranslated title for this attribute or pass a {@link Translation} encryped as a {@link String} |
25 |
|
|
*/ |
26 |
|
|
public void setTitle(String title); |
27 |
alfonx |
658 |
|
28 |
|
|
/** |
29 |
alfonx |
769 |
* @return a translatable description for this attribute |
30 |
alfonx |
534 |
*/ |
31 |
alfonx |
769 |
public Translation getDesc(); |
32 |
alfonx |
534 |
|
33 |
|
|
/** |
34 |
alfonx |
769 |
* Set a translatable description for this attribute. |
35 |
alfonx |
534 |
*/ |
36 |
alfonx |
769 |
public void setDesc(Translation desc); |
37 |
alfonx |
534 |
|
38 |
|
|
/** |
39 |
alfonx |
772 |
* Set an untranslated description for this attribute or pass a {@link Translation} encryped as a {@link String} |
40 |
|
|
*/ |
41 |
|
|
public void setDesc(String desc); |
42 |
|
|
|
43 |
|
|
|
44 |
|
|
/** |
45 |
alfonx |
769 |
* The local name. E.g. the name of the DBF column as a {@link String}. |
46 |
alfonx |
244 |
*/ |
47 |
alfonx |
769 |
public String getLocalName(); |
48 |
alfonx |
244 |
|
49 |
alfonx |
464 |
/** |
50 |
alfonx |
769 |
* A short form for #setName(new NameImpl(localName)) |
51 |
alfonx |
464 |
*/ |
52 |
alfonx |
769 |
public void setLocalName(String localName); |
53 |
alfonx |
464 |
|
54 |
|
|
/** |
55 |
alfonx |
769 |
* The fully qualified {@link Name} of the attribute, e.g. |
56 |
|
|
* <code>org.bla.plo:blub</code>. The second part equals the |
57 |
|
|
* {@link #getLocalName()} value. The first may be <code>null</code> or |
58 |
|
|
* represent the layer name. |
59 |
alfonx |
464 |
*/ |
60 |
alfonx |
797 |
public Name getName(); |
61 |
alfonx |
464 |
|
62 |
|
|
/** |
63 |
alfonx |
769 |
* set the fully qualified {@link Name} of this attribute. |
64 |
alfonx |
464 |
*/ |
65 |
alfonx |
797 |
public void setName(Name name); |
66 |
alfonx |
464 |
|
67 |
|
|
/** |
68 |
alfonx |
769 |
* A list og objects that represent NODATA-values for this attribute. The |
69 |
|
|
* objects are supporsed to be correctly casted already. That means that the |
70 |
|
|
* NODATA objects listed here have must have the same type as the values of |
71 |
|
|
* this object. |
72 |
alfonx |
464 |
*/ |
73 |
alfonx |
769 |
public HashSet<Object> getNodataValues(); |
74 |
alfonx |
464 |
|
75 |
alfonx |
534 |
/** |
76 |
alfonx |
769 |
* Takes any value object and checks it against the NODATA values. If the |
77 |
|
|
* value equals a NODATA value, <code>null</code> is returned. Otherwise the |
78 |
|
|
* same object is returned. |
79 |
|
|
* |
80 |
|
|
* Note: This method is called often. |
81 |
alfonx |
534 |
*/ |
82 |
alfonx |
769 |
public Object fiterNodata(Object value); |
83 |
alfonx |
534 |
|
84 |
|
|
/** |
85 |
alfonx |
769 |
* @return a non-translatable unit {@link String} for this attribute values. |
86 |
alfonx |
534 |
*/ |
87 |
alfonx |
769 |
public String getUnit(); |
88 |
alfonx |
244 |
|
89 |
alfonx |
534 |
/** |
90 |
alfonx |
769 |
* Set a unit {@link String} for this attribute values. |
91 |
alfonx |
534 |
*/ |
92 |
alfonx |
769 |
public void setUnit(String unit); |
93 |
alfonx |
244 |
|
94 |
alfonx |
534 |
/** |
95 |
alfonx |
769 |
* @return A value defining the position of this attribute whenever the |
96 |
|
|
* attributes are listed to an end-user. The higher the weight, the |
97 |
|
|
* lower the position. (heavy goes down, light goes up) |
98 |
alfonx |
534 |
*/ |
99 |
alfonx |
769 |
public double getWeight(); |
100 |
alfonx |
534 |
|
101 |
|
|
/** |
102 |
alfonx |
769 |
* set a value defining the position of this attribute whenever the |
103 |
|
|
* attributes are listed to an end-user. The higher the weight, the lower |
104 |
|
|
* the position. (heavy goes down, light goes up) |
105 |
alfonx |
534 |
*/ |
106 |
alfonx |
769 |
public void setWeight(double weight); |
107 |
alfonx |
464 |
|
108 |
|
|
/** |
109 |
alfonx |
769 |
* @return <code>false</code> if this attribute should not be selectable or |
110 |
|
|
* shown to the end-user. |
111 |
alfonx |
464 |
*/ |
112 |
alfonx |
769 |
public boolean isVisible(); |
113 |
alfonx |
464 |
|
114 |
|
|
/** |
115 |
alfonx |
769 |
* Set <code>false</code> if this attribute should not be shown to the |
116 |
|
|
* end-user. |
117 |
alfonx |
464 |
*/ |
118 |
alfonx |
769 |
public void setVisible(boolean visible); |
119 |
alfonx |
464 |
|
120 |
alfonx |
769 |
String getNoDataValuesFormatted(); |
121 |
alfonx |
681 |
|
122 |
alfonx |
244 |
} |