Revision 1341 org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.lib/src/main/java/org/gvsig/tools/dynobject/DynStruct.java
DynStruct.java | ||
---|---|---|
3 | 3 |
* |
4 | 4 |
* Copyright (C) 2007-2013 gvSIG Association. |
5 | 5 |
* |
6 |
* This program is free software; you can redistribute it and/or |
|
7 |
* modify it under the terms of the GNU General Public License
|
|
8 |
* as published by the Free Software Foundation; either version 2
|
|
9 |
* of the License, or (at your option) any later version.
|
|
6 |
* This program is free software; you can redistribute it and/or modify it under
|
|
7 |
* the terms of the GNU General Public License as published by the Free Software
|
|
8 |
* Foundation; either version 2 of the License, or (at your option) any later
|
|
9 |
* version. |
|
10 | 10 |
* |
11 |
* This program is distributed in the hope that it will be useful, |
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14 |
* GNU General Public License for more details.
|
|
11 |
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
13 |
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
14 |
* details. |
|
15 | 15 |
* |
16 |
* You should have received a copy of the GNU General Public License |
|
17 |
* along with this program; if not, write to the Free Software |
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
19 |
* MA 02110-1301, USA. |
|
16 |
* You should have received a copy of the GNU General Public License along with |
|
17 |
* this program; if not, write to the Free Software Foundation, Inc., 51 |
|
18 |
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
20 | 19 |
* |
21 |
* For any additional information, do not hesitate to contact us |
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
|
20 |
* For any additional information, do not hesitate to contact us at info AT
|
|
21 |
* gvsig.com, or visit our website www.gvsig.com. |
|
23 | 22 |
*/ |
24 | 23 |
/* |
25 | 24 |
* AUTHORS (In addition to CIT): |
... | ... | |
29 | 28 |
|
30 | 29 |
import org.gvsig.tools.dynobject.exception.DynObjectValidateException; |
31 | 30 |
|
32 |
|
|
33 | 31 |
/** |
34 | 32 |
* @author <a href="mailto:jjdelcerro@gvsig.org">Joaqu?n Jos? del Cerro</a> |
35 | 33 |
* @author <a href="mailto:cordin@disid.com">C?sar Ordi?ana</a> |
36 | 34 |
*/ |
37 |
public interface DynStruct{ |
|
35 |
public interface DynStruct {
|
|
38 | 36 |
|
39 | 37 |
String getName(); |
40 | 38 |
|
41 |
String getNamespace();
|
|
39 |
String getNamespace();
|
|
42 | 40 |
|
43 |
String getFullName();
|
|
41 |
String getFullName();
|
|
44 | 42 |
|
45 | 43 |
String getDescription(); |
46 |
|
|
47 |
void setNamespace(String namespace); |
|
48 | 44 |
|
49 |
void setDescription(String description);
|
|
45 |
void setNamespace(String namespace);
|
|
50 | 46 |
|
51 |
/*************/ |
|
52 |
/* DynFields */ |
|
53 |
/*************/ |
|
47 |
void setDescription(String description); |
|
54 | 48 |
|
55 | 49 |
DynField getDynField(String name); |
56 | 50 |
|
... | ... | |
62 | 56 |
|
63 | 57 |
DynField addDynField(String name); |
64 | 58 |
|
65 |
// /** |
|
66 |
// * Adds a new field to the struct |
|
67 |
// * @param name |
|
68 |
// * @return |
|
69 |
// */ |
|
70 |
// DynField addDynFieldSingle(String name); |
|
59 |
DynField addDynFieldBoolean(String name); |
|
71 | 60 |
|
72 |
DynField addDynFieldBoolean(String name); |
|
73 |
|
|
74 | 61 |
DynField addDynFieldInt(String name); |
75 | 62 |
|
76 |
DynField addDynFieldLong(String name);
|
|
63 |
DynField addDynFieldLong(String name);
|
|
77 | 64 |
|
78 |
DynField addDynFieldFloat(String name);
|
|
65 |
DynField addDynFieldFloat(String name);
|
|
79 | 66 |
|
80 | 67 |
DynField addDynFieldDouble(String name); |
81 | 68 |
|
82 |
DynField addDynFieldString(String name);
|
|
69 |
DynField addDynFieldString(String name);
|
|
83 | 70 |
|
84 |
DynField addDynFieldDate(String name);
|
|
71 |
DynField addDynFieldDate(String name);
|
|
85 | 72 |
|
86 |
DynField addDynFieldList(String name);
|
|
73 |
DynField addDynFieldList(String name);
|
|
87 | 74 |
|
88 |
DynField addDynFieldArray(String name);
|
|
75 |
DynField addDynFieldArray(String name);
|
|
89 | 76 |
|
90 |
DynField addDynFieldMap(String name);
|
|
77 |
DynField addDynFieldMap(String name);
|
|
91 | 78 |
|
92 |
DynField addDynFieldSet(String name);
|
|
79 |
DynField addDynFieldSet(String name);
|
|
93 | 80 |
|
94 |
DynField addDynFieldObject(String name);
|
|
81 |
DynField addDynFieldObject(String name);
|
|
95 | 82 |
|
96 |
DynField addDynFieldFile(String name);
|
|
83 |
DynField addDynFieldFile(String name);
|
|
97 | 84 |
|
98 |
DynField addDynFieldFolder(String name);
|
|
85 |
DynField addDynFieldFolder(String name);
|
|
99 | 86 |
|
100 |
DynField addDynFieldURL(String name);
|
|
87 |
DynField addDynFieldURL(String name);
|
|
101 | 88 |
|
102 |
DynField addDynFieldURI(String name);
|
|
89 |
DynField addDynFieldURI(String name);
|
|
103 | 90 |
|
104 |
/** |
|
105 |
* @deprecated to be removed in gvSIG 2.1.0 |
|
106 |
* @see #addDynFieldString(String) |
|
107 |
*/ |
|
91 |
/** |
|
92 |
* @param name |
|
93 |
* @param type |
|
94 |
* @param defaultValue |
|
95 |
* @return |
|
96 |
* @deprecated to be removed in gvSIG 2.1.0 |
|
97 |
* @see #addDynFieldString(String) |
|
98 |
*/ |
|
108 | 99 |
DynField addDynFieldSingle(String name, int type, Object defaultValue, |
109 |
boolean mandatory, boolean persistent);
|
|
100 |
boolean mandatory, boolean persistent);
|
|
110 | 101 |
|
111 |
/** |
|
112 |
* @deprecated to be removed in gvSIG 2.1.0 |
|
113 |
* @see #addDynFieldString(String) |
|
114 |
*/ |
|
102 |
/** |
|
103 |
* @param name |
|
104 |
* @param type |
|
105 |
* @param defaultValue |
|
106 |
* @return |
|
107 |
* @deprecated to be removed in gvSIG 2.1.0 |
|
108 |
* @see #addDynFieldString(String) |
|
109 |
*/ |
|
115 | 110 |
DynField addDynFieldSingle(String name, int type, Object defaultValue); |
116 | 111 |
|
117 |
/** |
|
118 |
* @deprecated to be removed in gvSIG 2.1.0 |
|
119 |
* @see #addDynFieldRange(String) |
|
120 |
*/ |
|
112 |
/** |
|
113 |
* @param name |
|
114 |
* @param type |
|
115 |
* @param defaultValue |
|
116 |
* @param min |
|
117 |
* @param max |
|
118 |
* @param mandatory |
|
119 |
* @param persistent |
|
120 |
* @return |
|
121 |
* @deprecated to be removed in gvSIG 2.1.0 |
|
122 |
* @see #addDynFieldRange(String) |
|
123 |
*/ |
|
121 | 124 |
DynField addDynFieldRange(String name, int type, Object defaultValue, |
122 |
Object min, Object max, boolean mandatory, boolean persistent);
|
|
125 |
Object min, Object max, boolean mandatory, boolean persistent);
|
|
123 | 126 |
|
124 |
/** |
|
125 |
* @deprecated to be removed in gvSIG 2.1.0 |
|
126 |
* @see #addDynFieldRange(String) |
|
127 |
*/ |
|
127 |
/** |
|
128 |
* @param name |
|
129 |
* @param type |
|
130 |
* @param defaultValue |
|
131 |
* @param min |
|
132 |
* @param max |
|
133 |
* @return |
|
134 |
* @deprecated to be removed in gvSIG 2.1.0 |
|
135 |
* @see #addDynFieldRange(String) |
|
136 |
*/ |
|
128 | 137 |
DynField addDynFieldRange(String name, int type, Object defaultValue, |
129 |
Object min, Object max);
|
|
138 |
Object min, Object max);
|
|
130 | 139 |
|
131 |
/** |
|
132 |
* @deprecated to be removed in gvSIG 2.1.0 |
|
133 |
* @see #addDynFieldChoice(String) |
|
134 |
*/ |
|
140 |
/** |
|
141 |
* @param name |
|
142 |
* @param type |
|
143 |
* @param defaultValue |
|
144 |
* @param values |
|
145 |
* @param mandatory |
|
146 |
* @param persistent |
|
147 |
* @return |
|
148 |
* @deprecated to be removed in gvSIG 2.1.0 |
|
149 |
* @see #addDynFieldChoice(String) |
|
150 |
*/ |
|
135 | 151 |
DynField addDynFieldChoice(String name, int type, Object defaultValue, |
136 |
DynObjectValueItem[] values, boolean mandatory, boolean persistent);
|
|
152 |
DynObjectValueItem[] values, boolean mandatory, boolean persistent);
|
|
137 | 153 |
|
138 |
/** |
|
139 |
* @deprecated to be removed in gvSIG 2.1.0 |
|
140 |
* @see #addDynFieldChoice(String) |
|
141 |
*/ |
|
154 |
/** |
|
155 |
* @param name |
|
156 |
* @param type |
|
157 |
* @param defaultValue |
|
158 |
* @param values |
|
159 |
* @return |
|
160 |
* @deprecated to be removed in gvSIG 2.1.0 |
|
161 |
* @see #addDynFieldChoice(String) |
|
162 |
*/ |
|
142 | 163 |
DynField addDynFieldChoice(String name, int type, Object defaultValue, |
143 |
DynObjectValueItem[] values);
|
|
164 |
DynObjectValueItem[] values);
|
|
144 | 165 |
|
145 | 166 |
void removeDynField(String name); |
146 | 167 |
|
147 | 168 |
void validate(DynObject object) throws DynObjectValidateException; |
148 |
|
|
169 |
|
|
149 | 170 |
DynObject newInstance(); |
150 | 171 |
|
151 |
/***************************/ |
|
152 |
/* Parent DynClass objects */ |
|
153 |
/***************************/ |
|
154 |
|
|
155 | 172 |
void extend(DynStruct struct); |
156 | 173 |
|
157 | 174 |
void extend(String namespace, String structName); |
... | ... | |
159 | 176 |
void extend(String structName); |
160 | 177 |
|
161 | 178 |
/** |
162 |
* |
|
163 |
* Removes a given dynStruct from the current superDynClasses of this dynClass. If it is not contained, does nothing. |
|
164 |
* |
|
165 |
* @param dynStruct the dynStruct to be removed. |
|
179 |
* |
|
180 |
* Removes a given dynStruct from the current superDynClasses of this |
|
181 |
* dynClass. If it is not contained, does nothing. |
|
182 |
* |
|
183 |
* @param superDynStruct the dynStruct to be removed. |
|
166 | 184 |
*/ |
167 | 185 |
void remove(DynStruct superDynStruct); |
168 | 186 |
|
169 |
|
|
170 | 187 |
DynStruct[] getSuperDynStructs(); |
171 | 188 |
|
172 | 189 |
boolean isInstance(DynObject dynObject); |
173 | 190 |
|
174 | 191 |
boolean isExtendable(DynStruct dynStruct); |
175 |
|
|
176 |
} |
|
192 |
|
|
193 |
} |
Also available in: Unified diff