Statistics
| Revision:

gvsig-catalog / trunk / appCatalog / src / org / gvsig / catalog / csw / messages / CSWMessages0_9_0.java @ 6

History | View | Annotate | Download (3.03 KB)

1
package org.gvsig.catalog.csw.messages;
2

    
3
import org.gvsig.catalog.csw.drivers.profiles.CSWAbstractProfile;
4
import org.gvsig.catalog.csw.parsers.CSWConstants;
5
import org.gvsig.catalog.languages.FilterEncoding;
6

    
7
/* gvSIG. Sistema de Informaci?n Geogr?fica de la Generalitat Valenciana
8
 *
9
 * Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
10
 *
11
 * This program is free software; you can redistribute it and/or
12
 * modify it under the terms of the GNU General Public License
13
 * as published by the Free Software Foundation; either version 2
14
 * of the License, or (at your option) any later version.
15
 *
16
 * This program is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU General Public License
22
 * along with this program; if not, write to the Free Software
23
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,USA.
24
 *
25
 * For more information, contact:
26
 *
27
 *  Generalitat Valenciana
28
 *   Conselleria d'Infraestructures i Transport
29
 *   Av. Blasco Ib??ez, 50
30
 *   46010 VALENCIA
31
 *   SPAIN
32
 *
33
 *      +34 963862235
34
 *   gvsig@gva.es
35
 *      www.gvsig.gva.es
36
 *
37
 *    or
38
 *
39
 *   IVER T.I. S.A
40
 *   Salamanca 50
41
 *   46005 Valencia
42
 *   Spain
43
 *
44
 *   +34 963163400
45
 *   dac@iver.es
46
 */
47
/* CVS MESSAGES:
48
 *
49
 * $Id$
50
 * $Log$
51
 *
52
 */
53
/**
54
 * @author Jorge Piera LLodr? (jorge.piera@iver.es)
55
 */
56
public class CSWMessages0_9_0 extends CSWAbstractMessages{
57
        private static final String TYPENAMES = "Dataset";
58
        private static final String ESCAPECHAR = "escape";
59
        
60
        public CSWMessages0_9_0(CSWAbstractProfile profile) {
61
                super(profile);                
62
        }
63

    
64
        /*
65
         * (non-Javadoc)
66
         * @see es.gva.cit.catalog.csw.messages.CSWAbstractMessages#getContraintVersion()
67
         */
68
        protected String getContraintVersion() {
69
                return CSWConstants.CONSTRAINT_VERSION_0_9_0;
70
        }
71
        
72
        /*
73
         * (non-Javadoc)
74
         * @see es.gva.cit.catalog.csw.messages.CSWAbstractMessages#createGetRecordsQuery()
75
         */
76
        protected String createGetRecordsQuery(){
77
                StringBuffer buffer = new StringBuffer();
78
                buffer.append("<" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.QUERY + " ");
79
                buffer.append(CSWConstants.TYPENAMES + "=\"" + TYPENAMES + "\"");
80
                buffer.append(">");
81
                buffer.append("<" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.ELEMENTSETNAME + " ");
82
                buffer.append(CSWConstants.TYPENAMES + "=\"" + TYPENAMES + "\"");
83
                buffer.append(">");
84
                buffer.append(CSWConstants.FULL);
85
                buffer.append("</" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.ELEMENTSETNAME + ">");
86
                buffer.append(createGetRecordsConstraint());
87
                buffer.append("</" + CSWConstants.CSW_NAMESPACE + ":" + CSWConstants.QUERY + ">");
88
                return buffer.toString();
89
        }
90
        
91
        /*
92
         * (non-Javadoc)
93
         * @see es.gva.cit.catalog.csw.messages.CSWAbstractMessages#getFilterEncoding()
94
         */
95
        protected FilterEncoding getFilterEncoding(){
96
                FilterEncoding filter = super.getFilterEncoding();
97
                filter.setEscapeCharLabel(ESCAPECHAR);
98
                return filter;
99
        }
100

    
101
}