root / trunk / applications / appCatalogAndGazetteerClient / src / es / gva / cit / catalog / csw / messages / CSWMessages0_9_0.java @ 16170
History | View | Annotate | Download (3.08 KB)
1 |
package es.gva.cit.catalog.csw.messages; |
---|---|
2 |
|
3 |
import es.gva.cit.catalog.csw.drivers.profiles.CSWAbstractProfile; |
4 |
import es.gva.cit.catalog.csw.parsers.CSWConstants; |
5 |
import es.gva.cit.catalog.languages.FilterEncoding; |
6 |
import es.gva.cit.catalog.utils.Strings; |
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 |
/* CVS MESSAGES:
|
49 |
*
|
50 |
* $Id$
|
51 |
* $Log$
|
52 |
*
|
53 |
*/
|
54 |
/**
|
55 |
* @author Jorge Piera LLodr? (jorge.piera@iver.es)
|
56 |
*/
|
57 |
public class CSWMessages0_9_0 extends CSWAbstractMessages{ |
58 |
private static final String TYPENAMES = "Dataset"; |
59 |
private static final String ESCAPECHAR = "escape"; |
60 |
|
61 |
public CSWMessages0_9_0(CSWAbstractProfile profile) {
|
62 |
super(profile);
|
63 |
} |
64 |
|
65 |
/*
|
66 |
* (non-Javadoc)
|
67 |
* @see es.gva.cit.catalog.csw.messages.CSWAbstractMessages#getContraintVersion()
|
68 |
*/
|
69 |
protected String getContraintVersion() { |
70 |
return CSWConstants.CONSTRAINT_VERSION_0_9_0;
|
71 |
} |
72 |
|
73 |
/*
|
74 |
* (non-Javadoc)
|
75 |
* @see es.gva.cit.catalog.csw.messages.CSWAbstractMessages#createGetRecordsQuery()
|
76 |
*/
|
77 |
protected String createGetRecordsQuery(){ |
78 |
StringBuffer buffer = new StringBuffer(); |
79 |
buffer.append("<" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.QUERY + " "); |
80 |
buffer.append(CSWConstants.TYPENAMES + "=\"" + TYPENAMES + "\""); |
81 |
buffer.append(">");
|
82 |
buffer.append("<" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.ELEMENTSETNAME + " "); |
83 |
buffer.append(CSWConstants.TYPENAMES + "=\"" + TYPENAMES + "\""); |
84 |
buffer.append(">");
|
85 |
buffer.append(CSWConstants.FULL); |
86 |
buffer.append("</" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.ELEMENTSETNAME + ">"); |
87 |
buffer.append(createGetRecordsConstraint()); |
88 |
buffer.append("</" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.QUERY + ">"); |
89 |
return buffer.toString();
|
90 |
} |
91 |
|
92 |
/*
|
93 |
* (non-Javadoc)
|
94 |
* @see es.gva.cit.catalog.csw.messages.CSWAbstractMessages#getFilterEncoding()
|
95 |
*/
|
96 |
protected FilterEncoding getFilterEncoding(){
|
97 |
FilterEncoding filter = super.getFilterEncoding();
|
98 |
filter.setEscapeCharLabel(ESCAPECHAR); |
99 |
return filter;
|
100 |
} |
101 |
|
102 |
} |