Revision 24315
tags/tmp_build/frameworks/_fwAndami/log4j.properties | ||
---|---|---|
1 |
log4j.rootLogger=DEBUG, stdout |
|
2 |
|
|
3 |
log4j.appender.stdout=org.apache.log4j.ConsoleAppender |
|
4 |
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout |
|
5 |
|
|
6 |
# Pattern to output the caller's file name and line number. |
|
7 |
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n |
|
8 |
|
|
0 | 9 |
tags/tmp_build/frameworks/_fwAndami/.cvsignore | ||
---|---|---|
1 |
bin |
|
2 |
gvsig.log |
|
3 |
gvSIG |
|
4 |
web |
|
5 |
andami.jar |
|
6 |
keystore |
|
7 |
java.hprof.txt |
|
8 |
build-doc |
|
9 |
*.log |
|
10 |
cachedir |
|
11 |
bin-test |
|
0 | 12 |
tags/tmp_build/frameworks/_fwAndami/schemas/sample-plugins-persistence.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<plugins-status> |
|
3 |
<plugin name="gvsig" lastUpdate="237628686"> |
|
4 |
<xml-entity name="config"> |
|
5 |
<property name="dataDirectory" value="c:\"/> |
|
6 |
<xml-entity> |
|
7 |
<property name="dataDirectory" value="c:\"/> |
|
8 |
<property name="dataDirectory" value="c:\"/> |
|
9 |
<property name="dataDirectory" value="c:\"/> |
|
10 |
</xml-entity> |
|
11 |
</xml-entity> |
|
12 |
<bookmarks> |
|
13 |
<bookmark text="Recientes/raster"> |
|
14 |
<xml-entity> |
|
15 |
<property name="projection" value="EPSG:3403"/> |
|
16 |
<property name="boundinBox" value="12,12,115,115"/> |
|
17 |
</xml-entity> |
|
18 |
</bookmark> |
|
19 |
</bookmarks> |
|
20 |
<windows> |
|
21 |
<window id="0" rectangle="0,0,150,150"/> |
|
22 |
<window id="2" rectangle="50,50,150,150"/> |
|
23 |
<window id="8" rectangle="100,100,150,150"/> |
|
24 |
<window id="12" rectangle="150,150,150,150"/> |
|
25 |
</windows> |
|
26 |
</plugin> |
|
27 |
<tool-bars> |
|
28 |
<tool-bar name="gvsig.herramientas" x-position="0" y-position="1"/> |
|
29 |
<tool-bar name="gvsig.herramientas" x-position="0" y-position="0"/> |
|
30 |
</tool-bars> |
|
31 |
</plugins-status> |
|
0 | 32 |
tags/tmp_build/frameworks/_fwAndami/schemas/sample-config.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<plugin-config> |
|
3 |
<icon src="images/logoGVA.gif" text="gvSIG"/> |
|
4 |
<resourceBundle name="text"/> |
|
5 |
<import plugin-name="com.iver.cit.gvsig" /> |
|
6 |
<labelSet class="com.iver.cit.gvsig.gui.View"> |
|
7 |
<label id="1" size="100"/> |
|
8 |
<label id="2" size="230"/> |
|
9 |
</labelSet> |
|
10 |
<libraries> |
|
11 |
<library file="com.iver.cit.gvsig.jar"/> |
|
12 |
<library file="wmsclient.jar"/> |
|
13 |
</libraries> |
|
14 |
<extensions> |
|
15 |
<extension> |
|
16 |
<class name="com.iver.cit.gvsig.ProjectExtension"/> |
|
17 |
<menu text="Archivo/nuevo_proyecto" |
|
18 |
key="n" mnemonic="n" |
|
19 |
tooltip="nuevo_tooltip" |
|
20 |
action-command="NUEVO" icon="images/new.png"/> |
|
21 |
<menu text="Archivo/abrir_proyecto" |
|
22 |
key="a" mnemonic="a" |
|
23 |
tooltip="abrir_tooltip" |
|
24 |
action-command="ABRIR" icon="images/open.png"/> |
|
25 |
<menu text="Archivo/guardar_proyecto" |
|
26 |
key="g" mnemonic="g" |
|
27 |
tooltip="guardar_tooltip" |
|
28 |
action-command="GUARDAR" icon="images/save.png"/> |
|
29 |
|
|
30 |
<toolBar> |
|
31 |
<tool icon="images/new.png" tooltip="nuevo_tooltip" |
|
32 |
action-command="NUEVO"/> |
|
33 |
<tool icon="images/open.png" tooltip="abrir_tooltip" |
|
34 |
action-command="ABRIR"/> |
|
35 |
<tool icon="images/save.png" tooltip="guardar_tooltip" |
|
36 |
action-command="GUARDAR"/> |
|
37 |
|
|
38 |
<!-- these will be added to the containing toolbar --> |
|
39 |
<combo-scale |
|
40 |
name="JPEG Quality" |
|
41 |
elements="15;30;60;70;80;90;100" |
|
42 |
value="80" |
|
43 |
action-command="JPEG_QUALITY" /> |
|
44 |
|
|
45 |
<combo-button |
|
46 |
name="Copy/paste tools"> |
|
47 |
<combo-button-element icon="images/scissor.png" action-command="CUT" /> |
|
48 |
<combo-button-element icon="images/paste.png" action-command="PASTE" /> |
|
49 |
<combo-button-element icon="images/copy.png" action-command="COPY" /> |
|
50 |
</combo-button> |
|
51 |
</toolBar> |
|
52 |
|
|
53 |
</extension> |
|
54 |
|
|
55 |
<extension> |
|
56 |
<class name="com.iver.cit.gvsig.ZoomPrev"/> |
|
57 |
<menu text="Vista/Zoom_Previo" icon="images/ZoomPrevio.png"/> |
|
58 |
<tool-bar name="Herramientas"> |
|
59 |
<action-tool icon="images/ZoomPrevio.png" action-command="ZOOM_PREV" tooltip="Zoom_Previo" position="11"/> |
|
60 |
</tool-bar> |
|
61 |
|
|
62 |
<!-- these will be added to the status-bar (because they are not contained in any toolbar) --> |
|
63 |
<combo-scale |
|
64 |
name="Scale" |
|
65 |
label="Scale:" |
|
66 |
elements="1000;2000;5000;10000;25000;50000;100000;200000;500000;1000000;2000000;5000000" |
|
67 |
value="10000" |
|
68 |
action-command="CHANGE_SCALE" /> |
|
69 |
|
|
70 |
<combo-button |
|
71 |
name="Tool Mode"> |
|
72 |
<combo-button-element icon="images/once.png" action-command="USE_ONCE" /> |
|
73 |
<combo-button-element icon="images/sticky-tool.png" action-command="UNTIL_CHANGED" /> |
|
74 |
</combo-button> |
|
75 |
</extension> |
|
76 |
<extension processing-position="2"> |
|
77 |
<class name="com.iver.cit.gvsig.ViewControls"/> |
|
78 |
<menus> |
|
79 |
<menu text="Vista/Zoom_Completo" action-command="FULL" icon="images/MapContents.png" tooltip="Zoom completo a la v?sta"/> |
|
80 |
<menu text="Vista/Zoom_Select" action-command="ZOOM_SELECT" icon="image/Select.png"/> |
|
81 |
<menu text="Vista/Encuadre" action-command="ENCUADRE" icon="images/encuadre.png"/> |
|
82 |
<menu text="Vista/Seleccion_por_tema" action-command="SELECTIONBYSHAPE"/> |
|
83 |
<menu text="Vista/configurar_localizador" action-command="CONFIG_LOCATOR"/> |
|
84 |
<menu text="Vista/propiedades" action-command="PROPERTIES"/> |
|
85 |
</menus> |
|
86 |
<tool-bar name="Herramientas" y-position="1"> |
|
87 |
<action-tool icon="images/MapContents.png" action-command="FULL" tooltip="Zoom_Completo" position="1"/> |
|
88 |
<action-tool icon="images/encuadre.png" action-command="ENCUADRE" tooltip="gestion_encuadre" last="true" position="2"/> |
|
89 |
<selectable-tool group="grupo1" default="true" icon="images/ZoomIn.png" action-command="ZOOM_IN" tooltip="Zoom_M?s" position="3"/> |
|
90 |
<selectable-tool group="grupo1" icon="images/ZoomOut.png" action-command="ZOOM_OUT" position="4"/> |
|
91 |
<selectable-tool group="grupo1" icon="images/Pan.png" action-command="PAN" tooltip="Encuadre" position="5"/> |
|
92 |
<selectable-tool group="grupo1" icon="images/Identify.png" action-command="INFO" tooltip="informacion" position="6" /> |
|
93 |
<selectable-tool group="grupo2" icon="images/Distancia.png" action-command="MEDICION" tooltip="medir_distancias" position="7"/> |
|
94 |
<selectable-tool group="grupo2" icon="images/Poligono16.png" action-command="AREA" tooltip="medir_area" position="8"/> |
|
95 |
<selectable-tool group="grupo2" default="true" icon="images/Select.png" action-command="SELPOINT" tooltip="seleccionar_por_punto" position="9"/> |
|
96 |
<selectable-tool group="grupo2" icon="images/SelEspacial2b.png" action-command="SELRECT" tooltip="seleccionar_por_rectangulo" position="10"/> |
|
97 |
</tool-bar> |
|
98 |
</extension> |
|
99 |
<extension> |
|
100 |
<class name="com.iver.cit.gvsig.ThemeControls"/> |
|
101 |
<menu text="Tema/propiedades"/> |
|
102 |
</extension> |
|
103 |
</extensions> |
|
104 |
|
|
105 |
<file-extensions> |
|
106 |
<file-extension description="DGNfiles" ends-with="dgn" dialog="openLayer"> |
|
107 |
<class name="com.iver.cit.gvsig.DGNFileExtension"/> |
|
108 |
</file-extension> |
|
109 |
<file-extension description="Rasterfiles" ends-with="ecw,tif,tiff,jpg,png" dialog="openLayer"> |
|
110 |
<class name="com.iver.cit.gvsig.RasterFileExtension"/> |
|
111 |
</file-extension> |
|
112 |
</file-extensions> |
|
113 |
</plugin-config> |
|
0 | 114 |
tags/tmp_build/frameworks/_fwAndami/schemas/andami-config.xml | ||
---|---|---|
1 |
<andami-config locale-language="es" locale-country="ES" locale-variant="es" pluginsDirectory="c:\tirar"> |
|
2 |
<andami update="yes"/> |
|
3 |
<plugin name="com.iver.cit.gvsig" update="yes"/> |
|
4 |
<plugin name="com.iver.core" update="no"/> |
|
5 |
<andami-options> |
|
6 |
<option name="CustomOption1" value="customValue1"/> |
|
7 |
<icon-theme name="DefaultTheme" resource="iconThemes/default" basedir="iconThemes" /> |
|
8 |
</andami-options> |
|
9 |
</andami-config> |
|
0 | 10 |
tags/tmp_build/frameworks/_fwAndami/.project | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<projectDescription> |
|
3 |
<name>_fwAndami</name> |
|
4 |
<comment></comment> |
|
5 |
<projects> |
|
6 |
</projects> |
|
7 |
<buildSpec> |
|
8 |
<buildCommand> |
|
9 |
<name>org.eclipse.jdt.core.javabuilder</name> |
|
10 |
<arguments> |
|
11 |
</arguments> |
|
12 |
</buildCommand> |
|
13 |
<buildCommand> |
|
14 |
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> |
|
15 |
<triggers>full,incremental,</triggers> |
|
16 |
<arguments> |
|
17 |
<dictionary> |
|
18 |
<key>LaunchConfigHandle</key> |
|
19 |
<value><project>/.externalToolBuilders/Ant.launch</value> |
|
20 |
</dictionary> |
|
21 |
</arguments> |
|
22 |
</buildCommand> |
|
23 |
<buildCommand> |
|
24 |
<name>de.loskutov.FileSync.FSBuilder</name> |
|
25 |
<arguments> |
|
26 |
</arguments> |
|
27 |
</buildCommand> |
|
28 |
</buildSpec> |
|
29 |
<natures> |
|
30 |
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature> |
|
31 |
<nature>org.eclipse.jdt.core.javanature</nature> |
|
32 |
<nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature> |
|
33 |
</natures> |
|
34 |
</projectDescription> |
|
0 | 35 |
tags/tmp_build/frameworks/_fwAndami/gvSIG.bat | ||
---|---|---|
1 |
d: |
|
2 |
cd d:\eclipse\workspace\fwAndami |
|
3 |
java -cp andami.jar;lib/beans.jar;./lib/castor-0.9.5.3-xml.jar;./lib/crimson.jar;./lib/gvsig-i18n.jar;./lib/iver-utiles.jar;./lib/javaws.jar;lib/JWizardComponent.jar;./lib/log4j-1.2.8.jar;lib/looks-2.0.2.jar;./lib/xerces_2_5_0.jar;./lib/xml-apis.jar -Xmx500M com.iver.andami.Launcher gvSIG gvSIG/extensiones %1 |
|
0 | 4 |
tags/tmp_build/frameworks/_fwAndami/castor.properties | ||
---|---|---|
1 |
org.exolab.castor.indent=true |
|
0 | 2 |
tags/tmp_build/frameworks/_fwAndami/src/com/iver/andami/persistence/serverData/ServerDataPersistence.java | ||
---|---|---|
1 |
package com.iver.andami.persistence.serverData; |
|
2 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
3 |
* |
|
4 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
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. |
|
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. |
|
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
19 |
* |
|
20 |
* For more information, contact: |
|
21 |
* |
|
22 |
* Generalitat Valenciana |
|
23 |
* Conselleria d'Infraestructures i Transport |
|
24 |
* Av. Blasco Ib??ez, 50 |
|
25 |
* 46010 VALENCIA |
|
26 |
* SPAIN |
|
27 |
* |
|
28 |
* +34 963862235 |
|
29 |
* gvsig@gva.es |
|
30 |
* www.gvsig.gva.es |
|
31 |
* |
|
32 |
* or |
|
33 |
* |
|
34 |
* IVER T.I. S.A |
|
35 |
* Salamanca 50 |
|
36 |
* 46005 Valencia |
|
37 |
* Spain |
|
38 |
* |
|
39 |
* +34 963163400 |
|
40 |
* dac@iver.es |
|
41 |
*/ |
|
42 |
/* CVS MESSAGES: |
|
43 |
* |
|
44 |
* $Id$ |
|
45 |
* $Log$ |
|
46 |
* Revision 1.7 2006-09-01 13:39:38 jorpiell |
|
47 |
* Se ha a?adido la capacidad de almacenar properties en los server data |
|
48 |
* |
|
49 |
* Revision 1.6 2006/09/01 02:23:09 luisw2 |
|
50 |
* Geters and Seters added |
|
51 |
* |
|
52 |
* Revision 1.5 2006/08/28 07:56:54 jaume |
|
53 |
* *** empty log message *** |
|
54 |
* |
|
55 |
* Revision 1.4 2006/05/19 06:41:50 jaume |
|
56 |
* removed unnecessary imports |
|
57 |
* |
|
58 |
* Revision 1.3 2006/05/02 15:53:06 jorpiell |
|
59 |
* Se ha cambiado la interfaz Extension por dos clases: una interfaz (IExtension) y una clase abstract(Extension). A partir de ahora todas las extensiones deben heredar de Extension |
|
60 |
* |
|
61 |
* Revision 1.2 2006/03/21 18:06:46 jorpiell |
|
62 |
* Se ha hecho una modificaci?n para continuar soportando los servidores anteriores |
|
63 |
* |
|
64 |
* Revision 1.1 2006/03/07 11:32:13 jorpiell |
|
65 |
* Se ha a?adido la clase ServerDataPersistence en el paquete persistence.serverData que se usa para persistir los servidores por orden de ?ltimo acceso. |
|
66 |
* |
|
67 |
* |
|
68 |
*/ |
|
69 |
|
|
70 |
import java.util.Date; |
|
71 |
import java.util.Iterator; |
|
72 |
import java.util.Properties; |
|
73 |
import java.util.Set; |
|
74 |
|
|
75 |
import com.iver.andami.PluginServices; |
|
76 |
import com.iver.utiles.DateTime; |
|
77 |
import com.iver.utiles.NotExistInXMLEntity; |
|
78 |
import com.iver.utiles.XMLEntity; |
|
79 |
import com.iver.utiles.swing.jcomboServer.ServerData; |
|
80 |
|
|
81 |
/** |
|
82 |
* This class is used to save a list of servers (using the |
|
83 |
* Andami persistence model) to the plugins-persistence.xml file. |
|
84 |
* It has methods to create a set of ServerData objects from an |
|
85 |
* xml file. It can also save a set of ServerData objects in an |
|
86 |
* xml file. |
|
87 |
* |
|
88 |
* @see es.gva.cit.catalogClient.utils.comboserver.ServerData |
|
89 |
* @author Jorge Piera Llodra (piera_jor@gva.es) |
|
90 |
*/ |
|
91 |
public class ServerDataPersistence { |
|
92 |
private XMLEntity xml = null; |
|
93 |
private PluginServices ps = null; |
|
94 |
private String serviceType = null; |
|
95 |
private static final String SERVER_URL = "serverURL"; |
|
96 |
private static final String SERVER_ADDED = "added"; |
|
97 |
private static final String SERVER_LASTACCESS = "lastAccess"; |
|
98 |
private static final String SERVER_TYPE = "type"; |
|
99 |
private static final String SERVER_SUBTYPE = "subType"; |
|
100 |
private static final String SERVER_DATABASE = "database"; |
|
101 |
|
|
102 |
/** |
|
103 |
* Constructor |
|
104 |
* @param view |
|
105 |
* The View Class |
|
106 |
* @param sevice Type |
|
107 |
* Service type to load |
|
108 |
*/ |
|
109 |
public ServerDataPersistence(Object pluginClassInstance,String serviceType){ |
|
110 |
ps = PluginServices.getPluginServices(pluginClassInstance); |
|
111 |
xml = ps.getPersistentXML(); |
|
112 |
this.serviceType = serviceType; |
|
113 |
} |
|
114 |
|
|
115 |
/** |
|
116 |
* This methos is used to save the information in an XML file |
|
117 |
*/ |
|
118 |
public void setPersistent(){ |
|
119 |
ps.setPersistentXML(xml); |
|
120 |
} |
|
121 |
|
|
122 |
/** |
|
123 |
* This method saves an array of ServerData using the Anadami |
|
124 |
* persistence model |
|
125 |
* @param servers |
|
126 |
* Array of servers |
|
127 |
*/ |
|
128 |
public void setArrayOfServerData(ServerData[] servers){ |
|
129 |
xml.getXmlTag().removeAllXmlTag(); |
|
130 |
|
|
131 |
for (int i=0 ; i<servers.length ; i++){ |
|
132 |
xml.addChild(serverDataToXml(servers[i])); |
|
133 |
} |
|
134 |
|
|
135 |
} |
|
136 |
|
|
137 |
/** |
|
138 |
* This method adds a ServerData using the Anadami |
|
139 |
* persistence model. If the server exists just actualizes |
|
140 |
* the type and subtype fileds and changes the last access |
|
141 |
* value to the current time. |
|
142 |
* @param server |
|
143 |
* ServerData |
|
144 |
*/ |
|
145 |
public void addServerData(ServerData server){ |
|
146 |
ServerData[] servers = getArrayOfServerData(); |
|
147 |
ServerData[] newServers = new ServerData[servers.length + 1]; |
|
148 |
|
|
149 |
boolean found = false; |
|
150 |
|
|
151 |
for (int i = 0; i < servers.length; i++) { |
|
152 |
if (servers[i].getServerAddress().equals(server.getServerAddress())) { |
|
153 |
found = true; |
|
154 |
servers[i].updateLastAccess(); |
|
155 |
servers[i].setServiceSubType(server.getServiceSubType()); |
|
156 |
servers[i].setServiceType(server.getServiceType()); |
|
157 |
servers[i].setDatabase(server.getDatabase()); |
|
158 |
servers[i].setProperies(server.getProperies()); |
|
159 |
setArrayOfServerData(servers); |
|
160 |
} |
|
161 |
} |
|
162 |
|
|
163 |
if (!found) { |
|
164 |
System.arraycopy(servers, 0, newServers, 0, servers.length); |
|
165 |
newServers[servers.length] = server; |
|
166 |
setArrayOfServerData(newServers); |
|
167 |
|
|
168 |
} |
|
169 |
} |
|
170 |
|
|
171 |
|
|
172 |
|
|
173 |
/** |
|
174 |
* This method returns an array of ServerData objects that |
|
175 |
* have been saved using the Andami persistence model. |
|
176 |
* @return |
|
177 |
* String[] |
|
178 |
*/ |
|
179 |
public ServerData[] getArrayOfServerData(){ |
|
180 |
ServerData[] servers = new ServerData[xml.getChildrenCount()]; |
|
181 |
for (int i=0 ; i<xml.getChildrenCount() ; i++){ |
|
182 |
servers[i] = xmlToServerData(xml.getChild(i)); |
|
183 |
} |
|
184 |
return servers; |
|
185 |
} |
|
186 |
|
|
187 |
|
|
188 |
/** |
|
189 |
* This method creates and returns a new XMLEntity. |
|
190 |
* @param server |
|
191 |
* ServerData with all the server information |
|
192 |
* @return |
|
193 |
* XMLEntity |
|
194 |
*/ |
|
195 |
public XMLEntity serverDataToXml(ServerData server){ |
|
196 |
String dFormat="Y-m-d H:i:s.Z"; |
|
197 |
|
|
198 |
XMLEntity xmlEnt = new XMLEntity(); |
|
199 |
xmlEnt.putProperty(SERVER_URL,server.getServerAddress()); |
|
200 |
xmlEnt.putProperty(SERVER_ADDED,DateTime.dateToString(server.getAdded(),dFormat)); |
|
201 |
xmlEnt.putProperty(SERVER_LASTACCESS,DateTime.dateToString(server.getLastAccess(),dFormat)); |
|
202 |
xmlEnt.putProperty(SERVER_TYPE,server.getServiceType()); |
|
203 |
xmlEnt.putProperty(SERVER_SUBTYPE,server.getServiceSubType()); |
|
204 |
if (server.getServiceSubType().equals(ServerData.SERVER_SUBTYPE_CATALOG_Z3950)){ |
|
205 |
xmlEnt.putProperty(SERVER_DATABASE,server.getDatabase()); |
|
206 |
} |
|
207 |
Set keys = server.getProperies().keySet(); |
|
208 |
Iterator it = keys.iterator(); |
|
209 |
while (it.hasNext()) { |
|
210 |
String next = (String)it.next(); |
|
211 |
xmlEnt.putProperty(next, |
|
212 |
server.getProperies().get(next)); |
|
213 |
} |
|
214 |
return xmlEnt; |
|
215 |
} |
|
216 |
|
|
217 |
/** |
|
218 |
* This method creates a new serverData from a XMLEntity |
|
219 |
* @param xmlEnt |
|
220 |
* XMLRntity that contains the server information |
|
221 |
* @return |
|
222 |
* ServerData |
|
223 |
*/ |
|
224 |
public ServerData xmlToServerData(XMLEntity xmlEnt){ |
|
225 |
String serverAddress; |
|
226 |
Date added; |
|
227 |
Date lastAccess; |
|
228 |
String serviceType = ""; |
|
229 |
String serviceSubType = ""; |
|
230 |
String databaseName = ""; |
|
231 |
|
|
232 |
serverAddress = xmlEnt.getStringProperty(SERVER_URL); |
|
233 |
added = DateTime.stringToDate(xmlEnt.getStringProperty(SERVER_ADDED)); |
|
234 |
lastAccess = DateTime.stringToDate(xmlEnt.getStringProperty(SERVER_LASTACCESS)); |
|
235 |
serviceType = xmlEnt.getStringProperty(SERVER_TYPE).toUpperCase(); |
|
236 |
serviceSubType = xmlEnt.getStringProperty(SERVER_SUBTYPE).toUpperCase(); |
|
237 |
|
|
238 |
if (serviceSubType.equals(ServerData.SERVER_SUBTYPE_CATALOG_Z3950)){ |
|
239 |
try{ |
|
240 |
databaseName = xmlEnt.getStringProperty(SERVER_DATABASE); |
|
241 |
}catch(NotExistInXMLEntity e){ |
|
242 |
|
|
243 |
} |
|
244 |
} |
|
245 |
|
|
246 |
ServerData serverData = new ServerData(serverAddress,added,lastAccess,serviceType,serviceSubType,databaseName); |
|
247 |
|
|
248 |
Properties props = new Properties(); |
|
249 |
for (int i=0 ; i<xmlEnt.getPropertyCount() ; i++){ |
|
250 |
String property = xmlEnt.getPropertyName(i); |
|
251 |
if (!((property.equals(SERVER_URL)) || |
|
252 |
(property.equals(SERVER_ADDED)) || |
|
253 |
(property.equals(SERVER_LASTACCESS)) || |
|
254 |
(property.equals(SERVER_TYPE)) || |
|
255 |
(property.equals(SERVER_SUBTYPE)) || |
|
256 |
(property.equals(SERVER_DATABASE)))){ |
|
257 |
props.put(property,xmlEnt.getStringProperty(property)); |
|
258 |
} |
|
259 |
} |
|
260 |
serverData.setProperies(props); |
|
261 |
return serverData; |
|
262 |
} |
|
263 |
|
|
264 |
public String getServiceType() { |
|
265 |
return serviceType; |
|
266 |
} |
|
267 |
|
|
268 |
public void setServiceType(String serviceType) { |
|
269 |
this.serviceType = serviceType; |
|
270 |
} |
|
271 |
|
|
272 |
public XMLEntity getXml() { |
|
273 |
return xml; |
|
274 |
} |
|
275 |
|
|
276 |
public void setXml(XMLEntity xml) { |
|
277 |
this.xml = xml; |
|
278 |
} |
|
279 |
} |
|
0 | 280 |
tags/tmp_build/frameworks/_fwAndami/src/com/iver/andami/persistence/generate/PropertyDescriptor.java | ||
---|---|---|
1 |
/* |
|
2 |
* This class was automatically generated with |
|
3 |
* <a href="http://www.castor.org">Castor 0.9.5.3</a>, using an XML |
|
4 |
* Schema. |
|
5 |
* $Id$ |
|
6 |
*/ |
|
7 |
|
|
8 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
9 |
* |
|
10 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
11 |
* |
|
12 |
* This program is free software; you can redistribute it and/or |
|
13 |
* modify it under the terms of the GNU General Public License |
|
14 |
* as published by the Free Software Foundation; either version 2 |
|
15 |
* of the License, or (at your option) any later version. |
|
16 |
* |
|
17 |
* This program is distributed in the hope that it will be useful, |
|
18 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
19 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
20 |
* GNU General Public License for more details. |
|
21 |
* |
|
22 |
* You should have received a copy of the GNU General Public License |
|
23 |
* along with this program; if not, write to the Free Software |
|
24 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
25 |
* |
|
26 |
* For more information, contact: |
|
27 |
* |
|
28 |
* Generalitat Valenciana |
|
29 |
* Conselleria d'Infraestructures i Transport |
|
30 |
* Av. Blasco Ib??ez, 50 |
|
31 |
* 46010 VALENCIA |
|
32 |
* SPAIN |
|
33 |
* |
|
34 |
* +34 963862235 |
|
35 |
* gvsig@gva.es |
|
36 |
* www.gvsig.gva.es |
|
37 |
* |
|
38 |
* or |
|
39 |
* |
|
40 |
* IVER T.I. S.A |
|
41 |
* Salamanca 50 |
|
42 |
* 46005 Valencia |
|
43 |
* Spain |
|
44 |
* |
|
45 |
* +34 963163400 |
|
46 |
* dac@iver.es |
|
47 |
*/ |
|
48 |
package com.iver.andami.persistence.generate; |
|
49 |
|
|
50 |
//---------------------------------/ |
|
51 |
//- Imported classes and packages -/ |
|
52 |
//---------------------------------/ |
|
53 |
|
|
54 |
import org.exolab.castor.xml.validators.NameValidator; |
|
55 |
import org.exolab.castor.xml.validators.StringValidator; |
|
56 |
|
|
57 |
/** |
|
58 |
* Class PropertyDescriptor. |
|
59 |
* |
|
60 |
* @version $Revision$ $Date$ |
|
61 |
*/ |
|
62 |
public class PropertyDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { |
|
63 |
|
|
64 |
|
|
65 |
//--------------------------/ |
|
66 |
//- Class/Member Variables -/ |
|
67 |
//--------------------------/ |
|
68 |
|
|
69 |
/** |
|
70 |
* Field nsPrefix |
|
71 |
*/ |
|
72 |
private java.lang.String nsPrefix; |
|
73 |
|
|
74 |
/** |
|
75 |
* Field nsURI |
|
76 |
*/ |
|
77 |
private java.lang.String nsURI; |
|
78 |
|
|
79 |
/** |
|
80 |
* Field xmlName |
|
81 |
*/ |
|
82 |
private java.lang.String xmlName; |
|
83 |
|
|
84 |
/** |
|
85 |
* Field identity |
|
86 |
*/ |
|
87 |
private org.exolab.castor.xml.XMLFieldDescriptor identity; |
|
88 |
|
|
89 |
|
|
90 |
//----------------/ |
|
91 |
//- Constructors -/ |
|
92 |
//----------------/ |
|
93 |
|
|
94 |
public PropertyDescriptor() { |
|
95 |
super(); |
|
96 |
xmlName = "property"; |
|
97 |
org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; |
|
98 |
org.exolab.castor.xml.XMLFieldHandler handler = null; |
|
99 |
org.exolab.castor.xml.FieldValidator fieldValidator = null; |
|
100 |
//-- initialize attribute descriptors |
|
101 |
|
|
102 |
//-- _name |
|
103 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", org.exolab.castor.xml.NodeType.Attribute); |
|
104 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() { |
|
105 |
public java.lang.Object getValue( java.lang.Object object ) |
|
106 |
throws IllegalStateException |
|
107 |
{ |
|
108 |
Property target = (Property) object; |
|
109 |
return target.getName(); |
|
110 |
} |
|
111 |
public void setValue( java.lang.Object object, java.lang.Object value) |
|
112 |
throws IllegalStateException, IllegalArgumentException |
|
113 |
{ |
|
114 |
try { |
|
115 |
Property target = (Property) object; |
|
116 |
target.setName( (java.lang.String) value); |
|
117 |
} |
|
118 |
catch (java.lang.Exception ex) { |
|
119 |
throw new IllegalStateException(ex.toString()); |
|
120 |
} |
|
121 |
} |
|
122 |
public java.lang.Object newInstance( java.lang.Object parent ) { |
|
123 |
return new java.lang.String(); |
|
124 |
} |
|
125 |
} ); |
|
126 |
desc.setHandler(handler); |
|
127 |
desc.setRequired(true); |
|
128 |
addFieldDescriptor(desc); |
|
129 |
|
|
130 |
//-- validation code for: _name |
|
131 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
|
132 |
fieldValidator.setMinOccurs(1); |
|
133 |
{ //-- local scope |
|
134 |
NameValidator typeValidator = new NameValidator(NameValidator.NMTOKEN); |
|
135 |
fieldValidator.setValidator(typeValidator); |
|
136 |
} |
|
137 |
desc.setValidator(fieldValidator); |
|
138 |
//-- _value |
|
139 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String.class, "_value", "value", org.exolab.castor.xml.NodeType.Attribute); |
|
140 |
desc.setImmutable(true); |
|
141 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() { |
|
142 |
public java.lang.Object getValue( java.lang.Object object ) |
|
143 |
throws IllegalStateException |
|
144 |
{ |
|
145 |
Property target = (Property) object; |
|
146 |
return target.getValue(); |
|
147 |
} |
|
148 |
public void setValue( java.lang.Object object, java.lang.Object value) |
|
149 |
throws IllegalStateException, IllegalArgumentException |
|
150 |
{ |
|
151 |
try { |
|
152 |
Property target = (Property) object; |
|
153 |
target.setValue( (java.lang.String) value); |
|
154 |
} |
|
155 |
catch (java.lang.Exception ex) { |
|
156 |
throw new IllegalStateException(ex.toString()); |
|
157 |
} |
|
158 |
} |
|
159 |
public java.lang.Object newInstance( java.lang.Object parent ) { |
|
160 |
return null; |
|
161 |
} |
|
162 |
} ); |
|
163 |
desc.setHandler(handler); |
|
164 |
desc.setRequired(true); |
|
165 |
addFieldDescriptor(desc); |
|
166 |
|
|
167 |
//-- validation code for: _value |
|
168 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
|
169 |
fieldValidator.setMinOccurs(1); |
|
170 |
{ //-- local scope |
|
171 |
StringValidator typeValidator = new StringValidator(); |
|
172 |
typeValidator.setWhiteSpace("preserve"); |
|
173 |
fieldValidator.setValidator(typeValidator); |
|
174 |
} |
|
175 |
desc.setValidator(fieldValidator); |
|
176 |
//-- initialize element descriptors |
|
177 |
|
|
178 |
} //-- com.iver.andami.persistence.generate.PropertyDescriptor() |
|
179 |
|
|
180 |
|
|
181 |
//-----------/ |
|
182 |
//- Methods -/ |
|
183 |
//-----------/ |
|
184 |
|
|
185 |
/** |
|
186 |
* Method getAccessMode |
|
187 |
*/ |
|
188 |
public org.exolab.castor.mapping.AccessMode getAccessMode() |
|
189 |
{ |
|
190 |
return null; |
|
191 |
} //-- org.exolab.castor.mapping.AccessMode getAccessMode() |
|
192 |
|
|
193 |
/** |
|
194 |
* Method getExtends |
|
195 |
*/ |
|
196 |
public org.exolab.castor.mapping.ClassDescriptor getExtends() |
|
197 |
{ |
|
198 |
return null; |
|
199 |
} //-- org.exolab.castor.mapping.ClassDescriptor getExtends() |
|
200 |
|
|
201 |
/** |
|
202 |
* Method getIdentity |
|
203 |
*/ |
|
204 |
public org.exolab.castor.mapping.FieldDescriptor getIdentity() |
|
205 |
{ |
|
206 |
return identity; |
|
207 |
} //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() |
|
208 |
|
|
209 |
/** |
|
210 |
* Method getJavaClass |
|
211 |
*/ |
|
212 |
public java.lang.Class getJavaClass() |
|
213 |
{ |
|
214 |
return com.iver.andami.persistence.generate.Property.class; |
|
215 |
} //-- java.lang.Class getJavaClass() |
|
216 |
|
|
217 |
/** |
|
218 |
* Method getNameSpacePrefix |
|
219 |
*/ |
|
220 |
public java.lang.String getNameSpacePrefix() |
|
221 |
{ |
|
222 |
return nsPrefix; |
|
223 |
} //-- java.lang.String getNameSpacePrefix() |
|
224 |
|
|
225 |
/** |
|
226 |
* Method getNameSpaceURI |
|
227 |
*/ |
|
228 |
public java.lang.String getNameSpaceURI() |
|
229 |
{ |
|
230 |
return nsURI; |
|
231 |
} //-- java.lang.String getNameSpaceURI() |
|
232 |
|
|
233 |
/** |
|
234 |
* Method getValidator |
|
235 |
*/ |
|
236 |
public org.exolab.castor.xml.TypeValidator getValidator() |
|
237 |
{ |
|
238 |
return this; |
|
239 |
} //-- org.exolab.castor.xml.TypeValidator getValidator() |
|
240 |
|
|
241 |
/** |
|
242 |
* Method getXMLName |
|
243 |
*/ |
|
244 |
public java.lang.String getXMLName() |
|
245 |
{ |
|
246 |
return xmlName; |
|
247 |
} //-- java.lang.String getXMLName() |
|
248 |
|
|
249 |
} |
|
0 | 250 |
tags/tmp_build/frameworks/_fwAndami/src/com/iver/andami/persistence/generate/PluginsStatusDescriptor.java | ||
---|---|---|
1 |
/* |
|
2 |
* This class was automatically generated with |
|
3 |
* <a href="http://www.castor.org">Castor 0.9.5.3</a>, using an XML |
|
4 |
* Schema. |
|
5 |
* $Id$ |
|
6 |
*/ |
|
7 |
|
|
8 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
9 |
* |
|
10 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
11 |
* |
|
12 |
* This program is free software; you can redistribute it and/or |
|
13 |
* modify it under the terms of the GNU General Public License |
|
14 |
* as published by the Free Software Foundation; either version 2 |
|
15 |
* of the License, or (at your option) any later version. |
|
16 |
* |
|
17 |
* This program is distributed in the hope that it will be useful, |
|
18 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
19 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
20 |
* GNU General Public License for more details. |
|
21 |
* |
|
22 |
* You should have received a copy of the GNU General Public License |
|
23 |
* along with this program; if not, write to the Free Software |
|
24 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
25 |
* |
|
26 |
* For more information, contact: |
|
27 |
* |
|
28 |
* Generalitat Valenciana |
|
29 |
* Conselleria d'Infraestructures i Transport |
|
30 |
* Av. Blasco Ib??ez, 50 |
|
31 |
* 46010 VALENCIA |
|
32 |
* SPAIN |
|
33 |
* |
|
34 |
* +34 963862235 |
|
35 |
* gvsig@gva.es |
|
36 |
* www.gvsig.gva.es |
|
37 |
* |
|
38 |
* or |
|
39 |
* |
|
40 |
* IVER T.I. S.A |
|
41 |
* Salamanca 50 |
|
42 |
* 46005 Valencia |
|
43 |
* Spain |
|
44 |
* |
|
45 |
* +34 963163400 |
|
46 |
* dac@iver.es |
|
47 |
*/ |
|
48 |
package com.iver.andami.persistence.generate; |
|
49 |
|
|
50 |
//---------------------------------/ |
|
51 |
//- Imported classes and packages -/ |
|
52 |
//---------------------------------/ |
|
53 |
|
|
54 |
|
|
55 |
/** |
|
56 |
* Class PluginsStatusDescriptor. |
|
57 |
* |
|
58 |
* @version $Revision$ $Date$ |
|
59 |
*/ |
|
60 |
public class PluginsStatusDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { |
|
61 |
|
|
62 |
|
|
63 |
//--------------------------/ |
|
64 |
//- Class/Member Variables -/ |
|
65 |
//--------------------------/ |
|
66 |
|
|
67 |
/** |
|
68 |
* Field nsPrefix |
|
69 |
*/ |
|
70 |
private java.lang.String nsPrefix; |
|
71 |
|
|
72 |
/** |
|
73 |
* Field nsURI |
|
74 |
*/ |
|
75 |
private java.lang.String nsURI; |
|
76 |
|
|
77 |
/** |
|
78 |
* Field xmlName |
|
79 |
*/ |
|
80 |
private java.lang.String xmlName; |
|
81 |
|
|
82 |
/** |
|
83 |
* Field identity |
|
84 |
*/ |
|
85 |
private org.exolab.castor.xml.XMLFieldDescriptor identity; |
|
86 |
|
|
87 |
|
|
88 |
//----------------/ |
|
89 |
//- Constructors -/ |
|
90 |
//----------------/ |
|
91 |
|
|
92 |
public PluginsStatusDescriptor() { |
|
93 |
super(); |
|
94 |
xmlName = "plugins-status"; |
|
95 |
|
|
96 |
//-- set grouping compositor |
|
97 |
setCompositorAsSequence(); |
|
98 |
org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; |
|
99 |
org.exolab.castor.xml.XMLFieldHandler handler = null; |
|
100 |
org.exolab.castor.xml.FieldValidator fieldValidator = null; |
|
101 |
//-- initialize attribute descriptors |
|
102 |
|
|
103 |
//-- initialize element descriptors |
|
104 |
|
|
105 |
//-- _plugin |
|
106 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.iver.andami.persistence.generate.Plugin.class, "_plugin", "plugin", org.exolab.castor.xml.NodeType.Element); |
|
107 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() { |
|
108 |
public java.lang.Object getValue( java.lang.Object object ) |
|
109 |
throws IllegalStateException |
|
110 |
{ |
|
111 |
PluginsStatus target = (PluginsStatus) object; |
|
112 |
return target.getPlugin(); |
|
113 |
} |
|
114 |
public void setValue( java.lang.Object object, java.lang.Object value) |
|
115 |
throws IllegalStateException, IllegalArgumentException |
|
116 |
{ |
|
117 |
try { |
|
118 |
PluginsStatus target = (PluginsStatus) object; |
|
119 |
target.setPlugin( (com.iver.andami.persistence.generate.Plugin) value); |
|
120 |
} |
|
121 |
catch (java.lang.Exception ex) { |
|
122 |
throw new IllegalStateException(ex.toString()); |
|
123 |
} |
|
124 |
} |
|
125 |
public java.lang.Object newInstance( java.lang.Object parent ) { |
|
126 |
return new com.iver.andami.persistence.generate.Plugin(); |
|
127 |
} |
|
128 |
} ); |
|
129 |
desc.setHandler(handler); |
|
130 |
desc.setRequired(true); |
|
131 |
desc.setMultivalued(false); |
|
132 |
addFieldDescriptor(desc); |
|
133 |
|
|
134 |
//-- validation code for: _plugin |
|
135 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
|
136 |
fieldValidator.setMinOccurs(1); |
|
137 |
{ //-- local scope |
|
138 |
} |
|
139 |
desc.setValidator(fieldValidator); |
|
140 |
//-- _toolBars |
|
141 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.iver.andami.persistence.generate.ToolBars.class, "_toolBars", "tool-bars", org.exolab.castor.xml.NodeType.Element); |
|
142 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() { |
|
143 |
public java.lang.Object getValue( java.lang.Object object ) |
|
144 |
throws IllegalStateException |
|
145 |
{ |
|
146 |
PluginsStatus target = (PluginsStatus) object; |
|
147 |
return target.getToolBars(); |
|
148 |
} |
|
149 |
public void setValue( java.lang.Object object, java.lang.Object value) |
|
150 |
throws IllegalStateException, IllegalArgumentException |
|
151 |
{ |
|
152 |
try { |
|
153 |
PluginsStatus target = (PluginsStatus) object; |
|
154 |
target.setToolBars( (com.iver.andami.persistence.generate.ToolBars) value); |
|
155 |
} |
|
156 |
catch (java.lang.Exception ex) { |
|
157 |
throw new IllegalStateException(ex.toString()); |
|
158 |
} |
|
159 |
} |
|
160 |
public java.lang.Object newInstance( java.lang.Object parent ) { |
|
161 |
return new com.iver.andami.persistence.generate.ToolBars(); |
|
162 |
} |
|
163 |
} ); |
|
164 |
desc.setHandler(handler); |
|
165 |
desc.setRequired(true); |
|
166 |
desc.setMultivalued(false); |
|
167 |
addFieldDescriptor(desc); |
|
168 |
|
|
169 |
//-- validation code for: _toolBars |
|
170 |
fieldValidator = new org.exolab.castor.xml.FieldValidator(); |
|
171 |
fieldValidator.setMinOccurs(1); |
|
172 |
{ //-- local scope |
|
173 |
} |
|
174 |
desc.setValidator(fieldValidator); |
|
175 |
} //-- com.iver.andami.persistence.generate.PluginsStatusDescriptor() |
|
176 |
|
|
177 |
|
|
178 |
//-----------/ |
|
179 |
//- Methods -/ |
|
180 |
//-----------/ |
|
181 |
|
|
182 |
/** |
|
183 |
* Method getAccessMode |
|
184 |
*/ |
|
185 |
public org.exolab.castor.mapping.AccessMode getAccessMode() |
|
186 |
{ |
|
187 |
return null; |
|
188 |
} //-- org.exolab.castor.mapping.AccessMode getAccessMode() |
|
189 |
|
|
190 |
/** |
|
191 |
* Method getExtends |
|
192 |
*/ |
|
193 |
public org.exolab.castor.mapping.ClassDescriptor getExtends() |
|
194 |
{ |
|
195 |
return null; |
|
196 |
} //-- org.exolab.castor.mapping.ClassDescriptor getExtends() |
|
197 |
|
|
198 |
/** |
|
199 |
* Method getIdentity |
|
200 |
*/ |
|
201 |
public org.exolab.castor.mapping.FieldDescriptor getIdentity() |
|
202 |
{ |
|
203 |
return identity; |
|
204 |
} //-- org.exolab.castor.mapping.FieldDescriptor getIdentity() |
|
205 |
|
|
206 |
/** |
|
207 |
* Method getJavaClass |
|
208 |
*/ |
|
209 |
public java.lang.Class getJavaClass() |
|
210 |
{ |
|
211 |
return com.iver.andami.persistence.generate.PluginsStatus.class; |
|
212 |
} //-- java.lang.Class getJavaClass() |
|
213 |
|
|
214 |
/** |
|
215 |
* Method getNameSpacePrefix |
|
216 |
*/ |
|
217 |
public java.lang.String getNameSpacePrefix() |
|
218 |
{ |
|
219 |
return nsPrefix; |
|
220 |
} //-- java.lang.String getNameSpacePrefix() |
|
221 |
|
|
222 |
/** |
|
223 |
* Method getNameSpaceURI |
|
224 |
*/ |
|
225 |
public java.lang.String getNameSpaceURI() |
|
226 |
{ |
|
227 |
return nsURI; |
|
228 |
} //-- java.lang.String getNameSpaceURI() |
|
229 |
|
|
230 |
/** |
|
231 |
* Method getValidator |
|
232 |
*/ |
|
233 |
public org.exolab.castor.xml.TypeValidator getValidator() |
|
234 |
{ |
|
235 |
return this; |
|
236 |
} //-- org.exolab.castor.xml.TypeValidator getValidator() |
|
237 |
|
|
238 |
/** |
|
239 |
* Method getXMLName |
|
240 |
*/ |
|
241 |
public java.lang.String getXMLName() |
|
242 |
{ |
|
243 |
return xmlName; |
|
244 |
} //-- java.lang.String getXMLName() |
|
245 |
|
|
246 |
} |
|
0 | 247 |
tags/tmp_build/frameworks/_fwAndami/src/com/iver/andami/persistence/generate/Property.java | ||
---|---|---|
1 |
/* |
|
2 |
* This class was automatically generated with |
|
3 |
* <a href="http://www.castor.org">Castor 0.9.5.3</a>, using an XML |
|
4 |
* Schema. |
|
5 |
* $Id$ |
|
6 |
*/ |
|
7 |
|
|
8 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
9 |
* |
|
10 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
11 |
* |
|
12 |
* This program is free software; you can redistribute it and/or |
|
13 |
* modify it under the terms of the GNU General Public License |
|
14 |
* as published by the Free Software Foundation; either version 2 |
|
15 |
* of the License, or (at your option) any later version. |
|
16 |
* |
|
17 |
* This program is distributed in the hope that it will be useful, |
|
18 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
19 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
20 |
* GNU General Public License for more details. |
|
21 |
* |
|
22 |
* You should have received a copy of the GNU General Public License |
|
23 |
* along with this program; if not, write to the Free Software |
|
24 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
25 |
* |
|
26 |
* For more information, contact: |
|
27 |
* |
|
28 |
* Generalitat Valenciana |
|
29 |
* Conselleria d'Infraestructures i Transport |
|
30 |
* Av. Blasco Ib??ez, 50 |
|
31 |
* 46010 VALENCIA |
|
32 |
* SPAIN |
|
33 |
* |
|
34 |
* +34 963862235 |
|
35 |
* gvsig@gva.es |
|
36 |
* www.gvsig.gva.es |
|
37 |
* |
|
38 |
* or |
|
39 |
* |
|
40 |
* IVER T.I. S.A |
|
41 |
* Salamanca 50 |
|
42 |
* 46005 Valencia |
|
43 |
* Spain |
|
44 |
* |
|
45 |
* +34 963163400 |
|
46 |
* dac@iver.es |
|
47 |
*/ |
|
48 |
package com.iver.andami.persistence.generate; |
|
49 |
|
|
50 |
//---------------------------------/ |
|
51 |
//- Imported classes and packages -/ |
|
52 |
//---------------------------------/ |
|
53 |
|
|
54 |
import org.exolab.castor.xml.Marshaller; |
|
55 |
import org.exolab.castor.xml.Unmarshaller; |
|
56 |
|
|
57 |
/** |
|
58 |
* Class Property. |
|
59 |
* |
|
60 |
* @version $Revision$ $Date$ |
|
61 |
*/ |
|
62 |
public class Property implements java.io.Serializable { |
|
63 |
|
|
64 |
|
|
65 |
//--------------------------/ |
|
66 |
//- Class/Member Variables -/ |
|
67 |
//--------------------------/ |
|
68 |
|
|
69 |
/** |
|
70 |
* Field _name |
|
71 |
*/ |
|
72 |
private java.lang.String _name; |
|
73 |
|
|
74 |
/** |
|
75 |
* Field _value |
|
76 |
*/ |
|
77 |
private java.lang.String _value; |
|
78 |
|
|
79 |
|
|
80 |
//----------------/ |
|
81 |
//- Constructors -/ |
|
82 |
//----------------/ |
|
83 |
|
|
84 |
public Property() { |
|
85 |
super(); |
|
86 |
} //-- com.iver.andami.persistence.generate.Property() |
|
87 |
|
|
88 |
|
|
89 |
//-----------/ |
|
90 |
//- Methods -/ |
|
91 |
//-----------/ |
|
92 |
|
|
93 |
/** |
|
94 |
* Returns the value of field 'name'. |
|
95 |
* |
|
96 |
* @return the value of field 'name'. |
|
97 |
*/ |
|
98 |
public java.lang.String getName() |
|
99 |
{ |
|
100 |
return this._name; |
|
101 |
} //-- java.lang.String getName() |
|
102 |
|
|
103 |
/** |
|
104 |
* Returns the value of field 'value'. |
|
105 |
* |
|
106 |
* @return the value of field 'value'. |
|
107 |
*/ |
|
108 |
public java.lang.String getValue() |
|
109 |
{ |
|
110 |
return this._value; |
|
111 |
} //-- java.lang.String getValue() |
|
112 |
|
|
113 |
/** |
|
114 |
* Method isValid |
|
115 |
*/ |
|
116 |
public boolean isValid() |
|
117 |
{ |
|
118 |
try { |
|
119 |
validate(); |
|
120 |
} |
|
121 |
catch (org.exolab.castor.xml.ValidationException vex) { |
|
122 |
return false; |
|
123 |
} |
|
124 |
return true; |
|
125 |
} //-- boolean isValid() |
|
126 |
|
|
127 |
/** |
|
128 |
* Method marshal |
|
129 |
* |
|
130 |
* @param out |
|
131 |
*/ |
|
132 |
public void marshal(java.io.Writer out) |
|
133 |
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException |
|
134 |
{ |
|
135 |
|
|
136 |
Marshaller.marshal(this, out); |
|
137 |
} //-- void marshal(java.io.Writer) |
|
138 |
|
|
139 |
/** |
|
140 |
* Method marshal |
|
141 |
* |
|
142 |
* @param handler |
|
143 |
*/ |
|
144 |
public void marshal(org.xml.sax.ContentHandler handler) |
|
145 |
throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException |
|
146 |
{ |
|
147 |
|
|
148 |
Marshaller.marshal(this, handler); |
|
149 |
} //-- void marshal(org.xml.sax.ContentHandler) |
|
150 |
|
|
151 |
/** |
|
152 |
* Sets the value of field 'name'. |
|
153 |
* |
|
154 |
* @param name the value of field 'name'. |
|
155 |
*/ |
|
156 |
public void setName(java.lang.String name) |
|
157 |
{ |
|
158 |
this._name = name; |
|
159 |
} //-- void setName(java.lang.String) |
|
160 |
|
|
161 |
/** |
|
162 |
* Sets the value of field 'value'. |
|
163 |
* |
|
164 |
* @param value the value of field 'value'. |
|
165 |
*/ |
|
166 |
public void setValue(java.lang.String value) |
|
167 |
{ |
|
168 |
this._value = value; |
|
169 |
} //-- void setValue(java.lang.String) |
|
170 |
|
|
171 |
/** |
|
172 |
* Method unmarshal |
|
173 |
* |
|
174 |
* @param reader |
|
175 |
*/ |
|
176 |
public static java.lang.Object unmarshal(java.io.Reader reader) |
|
177 |
throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException |
|
178 |
{ |
|
179 |
return (com.iver.andami.persistence.generate.Property) Unmarshaller.unmarshal(com.iver.andami.persistence.generate.Property.class, reader); |
|
180 |
} //-- java.lang.Object unmarshal(java.io.Reader) |
|
181 |
|
|
182 |
/** |
|
183 |
* Method validate |
|
184 |
*/ |
|
185 |
public void validate() |
|
186 |
throws org.exolab.castor.xml.ValidationException |
|
187 |
{ |
|
188 |
org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator(); |
|
189 |
validator.validate(this); |
|
190 |
} //-- void validate() |
|
191 |
|
|
192 |
} |
|
0 | 193 |
tags/tmp_build/frameworks/_fwAndami/src/com/iver/andami/persistence/generate/ToolBarsDescriptor.java | ||
---|---|---|
1 |
/* |
|
2 |
* This class was automatically generated with |
|
3 |
* <a href="http://www.castor.org">Castor 0.9.5.3</a>, using an XML |
|
4 |
* Schema. |
|
5 |
* $Id$ |
|
6 |
*/ |
|
7 |
|
|
8 |
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana |
|
9 |
* |
|
10 |
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana. |
|
11 |
* |
|
12 |
* This program is free software; you can redistribute it and/or |
|
13 |
* modify it under the terms of the GNU General Public License |
|
14 |
* as published by the Free Software Foundation; either version 2 |
|
15 |
* of the License, or (at your option) any later version. |
|
16 |
* |
|
17 |
* This program is distributed in the hope that it will be useful, |
|
18 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
19 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
20 |
* GNU General Public License for more details. |
|
21 |
* |
|
22 |
* You should have received a copy of the GNU General Public License |
|
23 |
* along with this program; if not, write to the Free Software |
|
24 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA. |
|
25 |
* |
|
26 |
* For more information, contact: |
|
27 |
* |
|
28 |
* Generalitat Valenciana |
|
29 |
* Conselleria d'Infraestructures i Transport |
|
30 |
* Av. Blasco Ib??ez, 50 |
|
31 |
* 46010 VALENCIA |
|
32 |
* SPAIN |
|
33 |
* |
|
34 |
* +34 963862235 |
|
35 |
* gvsig@gva.es |
|
36 |
* www.gvsig.gva.es |
|
37 |
* |
|
38 |
* or |
|
39 |
* |
|
40 |
* IVER T.I. S.A |
|
41 |
* Salamanca 50 |
|
42 |
* 46005 Valencia |
|
43 |
* Spain |
|
44 |
* |
|
45 |
* +34 963163400 |
|
46 |
* dac@iver.es |
|
47 |
*/ |
|
48 |
package com.iver.andami.persistence.generate; |
|
49 |
|
|
50 |
//---------------------------------/ |
|
51 |
//- Imported classes and packages -/ |
|
52 |
//---------------------------------/ |
|
53 |
|
|
54 |
|
|
55 |
/** |
|
56 |
* Class ToolBarsDescriptor. |
|
57 |
* |
|
58 |
* @version $Revision$ $Date$ |
|
59 |
*/ |
|
60 |
public class ToolBarsDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl { |
|
61 |
|
|
62 |
|
|
63 |
//--------------------------/ |
|
64 |
//- Class/Member Variables -/ |
|
65 |
//--------------------------/ |
|
66 |
|
|
67 |
/** |
|
68 |
* Field nsPrefix |
|
69 |
*/ |
|
70 |
private java.lang.String nsPrefix; |
|
71 |
|
|
72 |
/** |
|
73 |
* Field nsURI |
|
74 |
*/ |
|
75 |
private java.lang.String nsURI; |
|
76 |
|
|
77 |
/** |
|
78 |
* Field xmlName |
|
79 |
*/ |
|
80 |
private java.lang.String xmlName; |
|
81 |
|
|
82 |
/** |
|
83 |
* Field identity |
|
84 |
*/ |
|
85 |
private org.exolab.castor.xml.XMLFieldDescriptor identity; |
|
86 |
|
|
87 |
|
|
88 |
//----------------/ |
|
89 |
//- Constructors -/ |
|
90 |
//----------------/ |
|
91 |
|
|
92 |
public ToolBarsDescriptor() { |
|
93 |
super(); |
|
94 |
xmlName = "tool-bars"; |
|
95 |
|
|
96 |
//-- set grouping compositor |
|
97 |
setCompositorAsSequence(); |
|
98 |
org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null; |
|
99 |
org.exolab.castor.xml.XMLFieldHandler handler = null; |
|
100 |
org.exolab.castor.xml.FieldValidator fieldValidator = null; |
|
101 |
//-- initialize attribute descriptors |
|
102 |
|
|
103 |
//-- initialize element descriptors |
|
104 |
|
|
105 |
//-- _toolBarList |
|
106 |
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(com.iver.andami.persistence.generate.ToolBar.class, "_toolBarList", "tool-bar", org.exolab.castor.xml.NodeType.Element); |
|
107 |
handler = (new org.exolab.castor.xml.XMLFieldHandler() { |
|
108 |
public java.lang.Object getValue( java.lang.Object object ) |
|
109 |
throws IllegalStateException |
|
110 |
{ |
|
111 |
ToolBars target = (ToolBars) object; |
|
112 |
return target.getToolBar(); |
|
113 |
} |
|
114 |
public void setValue( java.lang.Object object, java.lang.Object value) |
|
115 |
throws IllegalStateException, IllegalArgumentException |
|
116 |
{ |
|
117 |
try { |
|
118 |
ToolBars target = (ToolBars) object; |
|
119 |
target.addToolBar( (com.iver.andami.persistence.generate.ToolBar) value); |
|
120 |
} |
|
121 |
catch (java.lang.Exception ex) { |
|
122 |
throw new IllegalStateException(ex.toString()); |
|
123 |
} |
|
124 |
} |
|
125 |
public java.lang.Object newInstance( java.lang.Object parent ) { |
|
126 |
return new com.iver.andami.persistence.generate.ToolBar(); |
|
127 |
} |
|
128 |
} ); |
|
129 |
desc.setHandler(handler); |
|
130 |
desc.setRequired(true); |
|
131 |
desc.setMultivalued(true); |
Also available in: Unified diff