root / branches / v2_0_0_prep / libraries / libFMap_dal / src / org / gvsig / fmap / dal / feature / FeatureAttributeDescriptor.java @ 24496
History | View | Annotate | Download (3.34 KB)
1 | 24496 | jmvivo | package org.gvsig.fmap.dal.feature; |
---|---|---|---|
2 | 19399 | vcaballero | |
3 | 23754 | jjdelcerro | import java.text.DateFormat; |
4 | 19399 | vcaballero | |
5 | 23754 | jjdelcerro | import org.gvsig.tools.evaluator.Evaluator; |
6 | 19399 | vcaballero | |
7 | |||
8 | 20412 | vcaballero | |
9 | 23123 | jmvivo | |
10 | 23754 | jjdelcerro | |
11 | 21045 | jmvivo | public interface FeatureAttributeDescriptor { |
12 | 19399 | vcaballero | |
13 | /**
|
||
14 | 23754 | jjdelcerro | * Clone this attribute
|
15 | *
|
||
16 | * @return FeatureAttributeDescriptor
|
||
17 | */
|
||
18 | public FeatureAttributeDescriptor getCopy();
|
||
19 | 19399 | vcaballero | |
20 | |||
21 | 23754 | jjdelcerro | /**
|
22 | * Returns the name of this attribute. This is the name that can be used to
|
||
23 | * retrieve the value of an attribute and usually maps to either an XML
|
||
24 | * element name or a column name in a relational database.
|
||
25 | */
|
||
26 | public String getName(); |
||
27 | 19399 | vcaballero | |
28 | 23754 | jjdelcerro | /**
|
29 | * Returns a constant from {@link FeatureAttributeDescriptor}. The return
|
||
30 | * value of this method indicates how the return values of {@link #getSize},
|
||
31 | * {@link #getPrecision}, and {@link #getObjectClass} should be interpreted.
|
||
32 | * For attributes whose maximum cardinality is greater than one, this should
|
||
33 | * return the data type of the individual elements of the collection.
|
||
34 | */
|
||
35 | public int getDataType(); |
||
36 | 19399 | vcaballero | |
37 | 23754 | jjdelcerro | public String getDataTypeName(); |
38 | 19399 | vcaballero | |
39 | 23754 | jjdelcerro | /**
|
40 | * Returns a number that indicates the size of a given attribute. See the
|
||
41 | * documentation for the various constants of
|
||
42 | * {@link FeatureAttributeDescriptor} for how to interpret this value. As an
|
||
43 | * example, when the data type is {@link FeatureAttributeDescriptor#STRING
|
||
44 | * STRING}, this value indicates the maximum length of the string.
|
||
45 | */
|
||
46 | public int getSize(); |
||
47 | 19399 | vcaballero | |
48 | 23754 | jjdelcerro | /**
|
49 | * For attributes of type {@link FeatureAttributeDescriptor#DECIMAL DECIMAL}
|
||
50 | * , this returns the maximum number of places after the decimal point. For
|
||
51 | * other types, this must always return zero.
|
||
52 | */
|
||
53 | public int getPrecision(); |
||
54 | 19399 | vcaballero | |
55 | 23754 | jjdelcerro | /**
|
56 | * For attributes of type {@link FeatureAttributeDescriptor#OBJECT OBJECT},
|
||
57 | * this returns the Java {@link Class} object that class or interface that
|
||
58 | * all values of this attribute can be cast to.
|
||
59 | */
|
||
60 | public Class getObjectClass(); |
||
61 | 19399 | vcaballero | |
62 | 23754 | jjdelcerro | /**
|
63 | * Returns the minimum number of occurrences of this attribute on a given
|
||
64 | * feature. The vast majority of data sources and data consumers will only
|
||
65 | * function with this value being zero or one. If the minimum number of
|
||
66 | * occurrences is zero, this is equivalent, in SQL terms, to the attribute
|
||
67 | * being nillable.
|
||
68 | */
|
||
69 | public int getMinimumOccurrences(); |
||
70 | 19399 | vcaballero | |
71 | 20084 | jmvivo | /**
|
72 | 23754 | jjdelcerro | * Returns the maximum number of occurrences of this attribute on a given
|
73 | * feature. The vast majority of data sources and data consumers will only
|
||
74 | * function with this value being one. A value of {@link Integer#MAX_VALUE}
|
||
75 | * indicates that the maximum number of occurrences is unbounded.
|
||
76 | 20084 | jmvivo | */
|
77 | 23754 | jjdelcerro | public int getMaximumOccurrences(); |
78 | 20084 | jmvivo | |
79 | /**
|
||
80 | 23754 | jjdelcerro | * Returns {@code true} if this attribute forms all or part of the unique identifying
|
81 | * value for the feature it is contained by. The primary key attributes uniquely
|
||
82 | * identify this feature from other features of the same type. This is different
|
||
83 | * from the {@linkplain Feature#getID feature's ID}, which must uniquely identify
|
||
84 | * the {@link Feature} among all feature types.
|
||
85 | 20084 | jmvivo | */
|
86 | 23754 | jjdelcerro | public boolean isPrimaryKey(); |
87 | 19695 | jmvivo | |
88 | 23754 | jjdelcerro | public boolean allowNull(); |
89 | 20084 | jmvivo | /**
|
90 | * Gets Intance to use for evalue the field value
|
||
91 | */
|
||
92 | 23754 | jjdelcerro | public Evaluator getEvaluator();
|
93 | 20084 | jmvivo | |
94 | 23754 | jjdelcerro | public boolean isReadOnly(); |
95 | 20412 | vcaballero | |
96 | 23754 | jjdelcerro | public String getSRS(); |
97 | 20449 | jmvivo | |
98 | 23754 | jjdelcerro | public int getGeometryType(); |
99 | 20907 | jmvivo | |
100 | 23754 | jjdelcerro | public Object getDefaultValue(); |
101 | 22663 | jmvivo | |
102 | 23754 | jjdelcerro | public DateFormat getDateFormat(); |
103 | |||
104 | public int getIndex(); |
||
105 | |||
106 | 19399 | vcaballero | } |