www.pudn.com > gvSIG-1_1-rc1-src.zip > CswIDECCapabilitiesParser.java
/* gvSIG. Sistema de Información Geográfica de la Generalitat Valenciana
*
* Copyright (C) 2004 IVER T.I. and Generalitat Valenciana.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,USA.
*
* For more information, contact:
*
* Generalitat Valenciana
* Conselleria d'Infraestructures i Transport
* Av. Blasco Ibáñez, 50
* 46010 VALENCIA
* SPAIN
*
* +34 963862235
* gvsig@gva.es
* www.gvsig.gva.es
*
* or
*
* IVER T.I. S.A
* Salamanca 50
* 46005 Valencia
* Spain
*
* +34 963163400
* dac@iver.es
*/
package es.gva.cit.catalogClient.csw.parsers;
import es.gva.cit.catalogClient.csw.drivers.CSWCatalogServiceDriver;
/**
* This class is used to stablish the IDEC CSW server configuration
* parameters.
*
*
* @author Jorge Piera Llodra (piera_jor@gva.es)
*/
public class CswIDECCapabilitiesParser {
/**
*
*
*/
CSWCatalogServiceDriver driver;
/**
*
*
*
* @param driver
*/
public CswIDECCapabilitiesParser(CSWCatalogServiceDriver driver) {
this.driver = driver;
}
/**
*
*
*
* @return
*/
public boolean parse() {
driver.setOperations(getOperations());
driver.setOutputFormat("text/xml");
driver.setTypeNames(getTypenames());
driver.setElementSetName(getElementSetName());
driver.setResultType(getResultType());
driver.setOutputSchema(getOutputSchema());
return true;
}
/**
* IT returns the supported operations
*
*
* @return
*/
private CswSupportedProtocolOperations getOperations() {
CswSupportedProtocolOperations operations = new CswSupportedProtocolOperations();
String[] s = new String[1];
s[0] = "POST";
operations.setGetRecords(s);
return operations;
}
/**
* It returns the typenames
*
*
* @return
*/
private String[] getTypenames() {
String[] s = new String[4];
s[0] = "Dataset";
s[1] = "Classification";
s[2] = "Association";
s[3] = "Geometry";
return s;
}
/**
* It returns the OutputSchema
*
*
* @return
*/
private String[] getOutputSchema() {
String[] s = new String[1];
s[0] = "http://www.opengis.net/cat/wrs";
return s;
}
/**
* It returns the element set Name
*
*
* @return
*/
private String[] getElementSetName() {
String[] s = new String[1];
s[0] = "summary";
return s;
}
/**
* It returns the result type
*
*
* @return
*/
private String[] getResultType() {
String[] s = new String[1];
s[0] = "results";
return s;
}
}