root / trunk / applications / appCatalogAndGazetteerClient / src / es / gva / cit / catalog / schemas / Record.java @ 15558
History | View | Annotate | Download (4.72 KB)
1 |
|
---|---|
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 |
package es.gva.cit.catalog.schemas; |
43 |
import java.awt.image.BufferedImage; |
44 |
import java.net.URI; |
45 |
import java.util.Collection; |
46 |
|
47 |
import es.gva.cit.catalog.metadataxml.XMLNode; |
48 |
|
49 |
/**
|
50 |
* All classes that implement a tag-parser must to implement this
|
51 |
* class. It only has some fields to show in the application form.
|
52 |
*
|
53 |
*
|
54 |
* @author Jorge Piera Llodra (piera_jor@gva.es)
|
55 |
*/
|
56 |
public abstract class Record { |
57 |
private XMLNode node;
|
58 |
private String title; |
59 |
private String abstract_; |
60 |
private String purpose; |
61 |
private String[] keyWords; |
62 |
private BufferedImage image; |
63 |
private String imageURL; |
64 |
private String fileID; |
65 |
private URI uri; |
66 |
private Collection resources = new java.util.ArrayList(); |
67 |
|
68 |
public Record(URI uri, XMLNode node){ |
69 |
this.uri = uri;
|
70 |
this.node = node;
|
71 |
} |
72 |
|
73 |
public Record(){
|
74 |
|
75 |
} |
76 |
|
77 |
/**
|
78 |
* Return true is the XML node is from a type that can be
|
79 |
* parsed
|
80 |
* @param uri
|
81 |
* Server uri
|
82 |
* @param node
|
83 |
* XML node
|
84 |
* @return
|
85 |
* true if the file can be managed or false
|
86 |
*/
|
87 |
public abstract boolean accept(URI uri, XMLNode node); |
88 |
|
89 |
/**
|
90 |
* @return Returns the fileID.
|
91 |
*/
|
92 |
public String getFileID() { |
93 |
return fileID;
|
94 |
} |
95 |
|
96 |
|
97 |
/**
|
98 |
* @param fileID The fileID to set.
|
99 |
*/
|
100 |
public void setFileID(String fileID) { |
101 |
this.fileID = fileID;
|
102 |
} |
103 |
|
104 |
/**
|
105 |
* @return Returns the image.
|
106 |
*/
|
107 |
public BufferedImage getImage() { |
108 |
return image;
|
109 |
} |
110 |
|
111 |
/**
|
112 |
* @param image The image to set
|
113 |
*/
|
114 |
public void setImage(BufferedImage image){ |
115 |
this.image = image;
|
116 |
} |
117 |
|
118 |
/**
|
119 |
* @param image The image address to set.
|
120 |
*/
|
121 |
public void setImageURL(String imageURL) { |
122 |
this.imageURL = imageURL;
|
123 |
} |
124 |
|
125 |
/**
|
126 |
* @return Returns the abstract_.
|
127 |
*/
|
128 |
public String getAbstract_() { |
129 |
return abstract_;
|
130 |
} |
131 |
|
132 |
/**
|
133 |
* @param abstract_ The abstract_ to set.
|
134 |
*/
|
135 |
public void setAbstract_(String abstract_) { |
136 |
this.abstract_ = abstract_;
|
137 |
} |
138 |
|
139 |
/**
|
140 |
* @return Returns the keyWords.
|
141 |
*/
|
142 |
public String[] getKeyWords() { |
143 |
return keyWords;
|
144 |
} |
145 |
|
146 |
/**
|
147 |
* @param keyWords The keyWords to set.
|
148 |
*/
|
149 |
public void setKeyWords(String[] keyWords) { |
150 |
this.keyWords = keyWords;
|
151 |
} |
152 |
|
153 |
/**
|
154 |
* @return Returns the purpose.
|
155 |
*/
|
156 |
public String getPurpose() { |
157 |
return purpose;
|
158 |
} |
159 |
|
160 |
/**
|
161 |
* @param purpose The purpose to set.
|
162 |
*/
|
163 |
public void setPurpose(String purpose) { |
164 |
this.purpose = purpose;
|
165 |
} |
166 |
|
167 |
/**
|
168 |
* @return Returns the title.
|
169 |
*/
|
170 |
public String getTitle() { |
171 |
return title;
|
172 |
} |
173 |
|
174 |
/**
|
175 |
* @param title The title to set.
|
176 |
*/
|
177 |
public void setTitle(String title) { |
178 |
this.title = title;
|
179 |
} |
180 |
|
181 |
/**
|
182 |
* @return Returns the node.
|
183 |
*/
|
184 |
public XMLNode getNode() {
|
185 |
return node;
|
186 |
} |
187 |
|
188 |
/**
|
189 |
* @param node The node to set.
|
190 |
*/
|
191 |
public void setNode(XMLNode node) { |
192 |
this.node = node;
|
193 |
} |
194 |
|
195 |
/**
|
196 |
* @return Returns the resources.
|
197 |
*/
|
198 |
public Resource[] getResources() { |
199 |
Resource[] aux = new Resource[resources.size()]; |
200 |
for (int i=0 ; i<aux.length ; i++){ |
201 |
aux[i] = (Resource)resources.toArray()[i]; |
202 |
} |
203 |
return aux;
|
204 |
} |
205 |
|
206 |
/**
|
207 |
* @param resources The resources to set.
|
208 |
*/
|
209 |
public void setResources(Resource[] resources) { |
210 |
this.resources = new java.util.ArrayList(); |
211 |
if (resources == null){ |
212 |
return;
|
213 |
} |
214 |
for (int i=0 ; i<resources.length ; i++){ |
215 |
this.resources.add(resources[i]);
|
216 |
} |
217 |
} |
218 |
|
219 |
/**
|
220 |
* @return Returns the serverURL.
|
221 |
*/
|
222 |
public URI getURI() { |
223 |
return uri;
|
224 |
} |
225 |
|
226 |
/**
|
227 |
*
|
228 |
*
|
229 |
*
|
230 |
* @param serverURI The serverURL to set.
|
231 |
*/
|
232 |
public void setURI(URI uri) { |
233 |
this.uri = uri;
|
234 |
} |
235 |
|
236 |
public String getImageURL() { |
237 |
return imageURL;
|
238 |
} |
239 |
|
240 |
} |