Revision 16170 trunk/applications/appCatalogAndGazetteerClient/src/es/gva/cit/catalog/csw/messages/CSWAbstractMessages.java
CSWAbstractMessages.java | ||
---|---|---|
82 | 82 |
NameValuePair nvp2 = new NameValuePair("service", ServerData.SERVER_SUBTYPE_CATALOG_CSW); |
83 | 83 |
NameValuePair nvp3 = new NameValuePair("acceptFormats","text/xml"); |
84 | 84 |
return new NameValuePair[] { nvp1, nvp2, nvp3 }; |
85 |
} |
|
85 |
} |
|
86 |
|
|
87 |
/** |
|
88 |
* The get capabilities operation started with lower case. |
|
89 |
* There are some servers that has this bug |
|
90 |
* @return |
|
91 |
*/ |
|
92 |
public static NameValuePair[] getHTTPGETCapabilitiesLower() { |
|
93 |
NameValuePair nvp1 = new NameValuePair("request", CSWConstants.OPERATION_GETCAPABILITIESToLOWER); |
|
94 |
NameValuePair nvp2 = new NameValuePair("service", ServerData.SERVER_SUBTYPE_CATALOG_CSW); |
|
95 |
NameValuePair nvp3 = new NameValuePair("acceptFormats","text/xml"); |
|
96 |
return new NameValuePair[] { nvp1, nvp2, nvp3 }; |
|
97 |
} |
|
86 | 98 |
|
87 | 99 |
public static NameValuePair[] getHTTPGETDescribeRecord(String version) { |
88 | 100 |
NameValuePair nvp1 = new NameValuePair("request", CSWConstants.OPERATION_DESCRIBERECORD); |
... | ... | |
111 | 123 |
* @param firstRecord |
112 | 124 |
* @return |
113 | 125 |
*/ |
114 |
private String createGetRecordsHeader(int firstRecord){
|
|
126 |
protected String createGetRecordsHeader(int firstRecord){
|
|
115 | 127 |
StringBuffer buffer = new StringBuffer(); |
116 | 128 |
buffer.append(CatalogConstants.XML_HEADER_ENCODING); |
117 | 129 |
buffer.append("<" + CSWConstants.CSW_NAMESPACE + |
... | ... | |
150 | 162 |
* @return Just one String |
151 | 163 |
* @param resultType The array of result types parsed. |
152 | 164 |
*/ |
153 |
private String getResultType(String[] resultType) {
|
|
165 |
protected String getResultType(String[] resultType) {
|
|
154 | 166 |
if (resultType == null) |
155 | 167 |
return "results"; |
156 | 168 |
|
... | ... | |
167 | 179 |
* @return Just one String |
168 | 180 |
* @param outputSchemas |
169 | 181 |
*/ |
170 |
private String getOutputSchema(String[] outputSchemas) {
|
|
182 |
protected String getOutputSchema(String[] outputSchemas) {
|
|
171 | 183 |
if (outputSchemas == null){ |
172 | 184 |
return null; |
173 | 185 |
} |
... | ... | |
178 | 190 |
* @return the Query xml sub tree of the GetRecords |
179 | 191 |
* operation |
180 | 192 |
*/ |
181 |
private String createGetRecordsQuery(){
|
|
193 |
protected String createGetRecordsQuery(){
|
|
182 | 194 |
StringBuffer buffer = new StringBuffer(); |
183 | 195 |
buffer.append("<" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.QUERY + " "); |
184 | 196 |
if (capabilities.getTypeNames() != null){ |
... | ... | |
197 | 209 |
* @param searchType |
198 | 210 |
* @return |
199 | 211 |
*/ |
200 |
private String getElementSetNameLabel(Search searchType) {
|
|
212 |
protected String getElementSetNameLabel(Search searchType) {
|
|
201 | 213 |
StringBuffer buffer = new StringBuffer(); |
202 | 214 |
buffer.append("<" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.ELEMENTSETNAME + ">"); |
203 | 215 |
buffer.append(CSWConstants.FULL); |
... | ... | |
229 | 241 |
protected abstract String getContraintVersion(); |
230 | 242 |
|
231 | 243 |
/** |
244 |
* Creates the filter encoding. It can be |
|
245 |
* overridden by the children classes. |
|
246 |
* @return |
|
247 |
* The filter encoding to use |
|
248 |
*/ |
|
249 |
protected FilterEncoding getFilterEncoding(){ |
|
250 |
return new FilterEncoding(); |
|
251 |
} |
|
252 |
|
|
253 |
/** |
|
232 | 254 |
* Creates the filter encoding query |
233 | 255 |
* @param query |
234 | 256 |
* @return |
235 | 257 |
*/ |
236 |
private String createFilterEncoding(){
|
|
237 |
FilterEncoding filter = new FilterEncoding();
|
|
258 |
protected String createFilterEncoding(){
|
|
259 |
FilterEncoding filter = getFilterEncoding();
|
|
238 | 260 |
if (query.getTitle() != null){ |
239 | 261 |
filter.addClauses(profile.getTitle(), |
240 | 262 |
query.getTitle(), |
... | ... | |
309 | 331 |
* @param coordinatesOption |
310 | 332 |
* @return |
311 | 333 |
*/ |
312 |
private boolean getCoordinatesOption(String coordinatesOption) {
|
|
334 |
protected boolean getCoordinatesOption(String coordinatesOption) {
|
|
313 | 335 |
if ((coordinatesOption.equals(Messages.getText("coordinatesEqual"))) || |
314 | 336 |
(coordinatesOption.equals(Messages.getText("coordinatesContains"))) || |
315 | 337 |
(coordinatesOption.equals(Messages.getText("coordinatesEnclose")))) |
Also available in: Unified diff