www.pudn.com > gvSIG-1_1-rc1-src.zip > ICatalogServiceDriver.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.drivers;
import es.gva.cit.catalogClient.querys.Query;
import java.net.URL;
import java.util.Collection;
/**
* This interface has to be implemented by all the classes that implement
* a catalog protocol. It describes all the common operations.
*
*
* @author Jorge Piera Llodra (piera_jor@gva.es)
*/
public interface ICatalogServiceDriver {
/**
* It have to prove if the specified protocol is supported.
*
*
* @return true if is supported, false if it isn't supported
* @param url Server URL
*/
public boolean isProtocolSupported(URL url);
/**
* It try to discover the server capabilities.
*
*
* @return Node with the server answer.
* @param url Server URL
*/
public Collection getCapabilities(URL url);
/**
* It send a request with a query to retrieve the server records
*
*
* @return Node array with the retrieved records
* @param url Server URL
* @param query It contains the values to do the query (title="XXX",abstract="YYY",...)
* @param firstRecord Number of the first record to retrieve
*/
public Collection getRecords(URL url, Query query, int firstRecord);
/**
* This method is used to update the client parameters
*
*
* @return true if the it's possible to update the server
* @param nodes Node with the parameters to update
* @param url Server URL
*/
public boolean setParameters(Collection nodes, URL url);
/**
* It return a message to write in the server connection frame
*
*
* @return It is/isn't the supported protocol
*/
public String getServerAnswerReady();
/**
* It returns the profile to create the query. Examples of profiles are:
* ISO19115
* DUBLINCORE
* EBRIM
*
*
* @return String
*/
public String getQueryProfile();
}