gvsig-tools / org.gvsig.tools / library / trunk / org.gvsig.tools / org.gvsig.tools.lib / src / main / java / org / gvsig / tools / dynobject / DynStruct.java @ 1342
History | View | Annotate | Download (5.1 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2013 gvSIG Association.
|
5 |
*
|
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 |
*
|
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 |
*
|
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.
|
19 |
*
|
20 |
* For any additional information, do not hesitate to contact us at info AT
|
21 |
* gvsig.com, or visit our website www.gvsig.com.
|
22 |
*/
|
23 |
/*
|
24 |
* AUTHORS (In addition to CIT):
|
25 |
* 2008 {DiSiD Technologies} {Create DynObjects implementation}
|
26 |
*/
|
27 |
package org.gvsig.tools.dynobject; |
28 |
|
29 |
import org.gvsig.tools.dynobject.exception.DynObjectValidateException; |
30 |
|
31 |
/**
|
32 |
* @author <a href="mailto:jjdelcerro@gvsig.org">Joaqu?n Jos? del Cerro</a>
|
33 |
* @author <a href="mailto:cordin@disid.com">C?sar Ordi?ana</a>
|
34 |
*/
|
35 |
public interface DynStruct { |
36 |
|
37 |
String getName();
|
38 |
|
39 |
String getNamespace();
|
40 |
|
41 |
String getFullName();
|
42 |
|
43 |
String getDescription();
|
44 |
|
45 |
void setNamespace(String namespace); |
46 |
|
47 |
void setDescription(String description); |
48 |
|
49 |
DynField getDynField(String name);
|
50 |
|
51 |
DynField getDeclaredDynField(String name);
|
52 |
|
53 |
DynField[] getDynFields();
|
54 |
|
55 |
DynField[] getDeclaredDynFields();
|
56 |
|
57 |
DynField addDynField(String name);
|
58 |
|
59 |
DynField addDynFieldBoolean(String name);
|
60 |
|
61 |
DynField addDynFieldInt(String name);
|
62 |
|
63 |
DynField addDynFieldLong(String name);
|
64 |
|
65 |
DynField addDynFieldFloat(String name);
|
66 |
|
67 |
DynField addDynFieldDouble(String name);
|
68 |
|
69 |
DynField addDynFieldString(String name);
|
70 |
|
71 |
DynField addDynFieldDate(String name);
|
72 |
|
73 |
DynField addDynFieldList(String name);
|
74 |
|
75 |
DynField addDynFieldArray(String name);
|
76 |
|
77 |
DynField addDynFieldMap(String name);
|
78 |
|
79 |
DynField addDynFieldSet(String name);
|
80 |
|
81 |
DynField addDynFieldObject(String name);
|
82 |
|
83 |
DynField addDynFieldFile(String name);
|
84 |
|
85 |
DynField addDynFieldFolder(String name);
|
86 |
|
87 |
DynField addDynFieldURL(String name);
|
88 |
|
89 |
DynField addDynFieldURI(String name);
|
90 |
|
91 |
/**
|
92 |
* @param name
|
93 |
* @param type
|
94 |
* @param defaultValue
|
95 |
* @param mandatory
|
96 |
* @param persistent
|
97 |
* @return
|
98 |
* @deprecated to be removed in gvSIG 2.1.0
|
99 |
* @see #addDynFieldString(String)
|
100 |
*/
|
101 |
DynField addDynFieldSingle(String name, int type, Object defaultValue, |
102 |
boolean mandatory, boolean persistent); |
103 |
|
104 |
/**
|
105 |
* @param name
|
106 |
* @param type
|
107 |
* @param defaultValue
|
108 |
* @return
|
109 |
* @deprecated to be removed in gvSIG 2.1.0
|
110 |
* @see #addDynFieldString(String)
|
111 |
*/
|
112 |
DynField addDynFieldSingle(String name, int type, Object defaultValue); |
113 |
|
114 |
/**
|
115 |
* @param name
|
116 |
* @param type
|
117 |
* @param defaultValue
|
118 |
* @param min
|
119 |
* @param max
|
120 |
* @param mandatory
|
121 |
* @param persistent
|
122 |
* @return
|
123 |
* @deprecated to be removed in gvSIG 2.1.0
|
124 |
* @see #addDynFieldRange(String)
|
125 |
*/
|
126 |
DynField addDynFieldRange(String name, int type, Object defaultValue, |
127 |
Object min, Object max, boolean mandatory, boolean persistent); |
128 |
|
129 |
/**
|
130 |
* @param name
|
131 |
* @param type
|
132 |
* @param defaultValue
|
133 |
* @param min
|
134 |
* @param max
|
135 |
* @return
|
136 |
* @deprecated to be removed in gvSIG 2.1.0
|
137 |
* @see #addDynFieldRange(String)
|
138 |
*/
|
139 |
DynField addDynFieldRange(String name, int type, Object defaultValue, |
140 |
Object min, Object max); |
141 |
|
142 |
/**
|
143 |
* @param name
|
144 |
* @param type
|
145 |
* @param defaultValue
|
146 |
* @param values
|
147 |
* @param mandatory
|
148 |
* @param persistent
|
149 |
* @return
|
150 |
* @deprecated to be removed in gvSIG 2.1.0
|
151 |
* @see #addDynFieldChoice(String)
|
152 |
*/
|
153 |
DynField addDynFieldChoice(String name, int type, Object defaultValue, |
154 |
DynObjectValueItem[] values, boolean mandatory, boolean persistent); |
155 |
|
156 |
/**
|
157 |
* @param name
|
158 |
* @param type
|
159 |
* @param defaultValue
|
160 |
* @param values
|
161 |
* @return
|
162 |
* @deprecated to be removed in gvSIG 2.1.0
|
163 |
* @see #addDynFieldChoice(String)
|
164 |
*/
|
165 |
DynField addDynFieldChoice(String name, int type, Object defaultValue, |
166 |
DynObjectValueItem[] values);
|
167 |
|
168 |
void removeDynField(String name); |
169 |
|
170 |
void validate(DynObject object) throws DynObjectValidateException; |
171 |
|
172 |
DynObject newInstance(); |
173 |
|
174 |
void extend(DynStruct struct);
|
175 |
|
176 |
void extend(String namespace, String structName); |
177 |
|
178 |
void extend(String structName); |
179 |
|
180 |
/**
|
181 |
*
|
182 |
* Removes a given dynStruct from the current superDynClasses of this
|
183 |
* dynClass. If it is not contained, does nothing.
|
184 |
*
|
185 |
* @param superDynStruct the dynStruct to be removed.
|
186 |
*/
|
187 |
void remove(DynStruct superDynStruct);
|
188 |
|
189 |
DynStruct[] getSuperDynStructs();
|
190 |
|
191 |
boolean isInstance(DynObject dynObject);
|
192 |
|
193 |
boolean isExtendable(DynStruct dynStruct);
|
194 |
|
195 |
} |