Revision 102 org.gvsig.gazetteer/trunk/org.gvsig.gazetteer/org.gvsig.gazetteer.lib/src/main/java/org/gvsig/gazetteer/GazetteerManager.java

View differences:

GazetteerManager.java
2 2
*
3 3
* Copyright (C) 2007-2008 Infrastructures and Transports Department
4 4
* of the Valencian Government (CIT)
5
* 
5
*
6 6
* This program is free software; you can redistribute it and/or
7 7
* modify it under the terms of the GNU General Public License
8 8
* as published by the Free Software Foundation; either version 2
9 9
* of the License, or (at your option) any later version.
10
* 
10
*
11 11
* This program is distributed in the hope that it will be useful,
12 12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13 13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 14
* GNU General Public License for more details.
15
* 
15
*
16 16
* You should have received a copy of the GNU General Public License
17 17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 19
* MA  02110-1301, USA.
20
* 
20
*
21 21
*/
22 22

  
23 23
/*
24 24
* AUTHORS (In addition to CIT):
25 25
* 2009 {Iver T.I.}   {Task}
26 26
*/
27
 
27

  
28 28
package org.gvsig.gazetteer;
29 29

  
30
import java.util.Map;
31

  
30 32
import org.gvsig.gazetteer.drivers.IGazetteerServiceDriver;
31 33

  
32 34
/**
33 35
 * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a>
34 36
 */
35 37
public interface GazetteerManager {
36
	
37 38
	/**
38
	 * It is used to retrieve a driver that supports a concrete 
39
	 * It is used to retrieve a driver that supports a concrete
39 40
	 * protocol
40 41
	 * @param protocol
41 42
	 * Gazetteer protocol
......
43 44
	 * The concrete gazatteer service driver
44 45
	 */
45 46
	public IGazetteerServiceDriver getDriver(String protocol);
46
	
47

  
47 48
	/**
48 49
	 * @return a list with all the gazetteer drivers
49 50
	 */
50 51
	public IGazetteerServiceDriver[] getDrivers();
51
	
52

  
52 53
	/**
53
	 * This method is used to register a new gazetter driver 
54
	 * This method is used to register a new gazetter driver
54 55
	 * that manage a concrete protocol
55 56
	 * @param driver
56 57
	 * Gazetteer driver to register
57 58
	 */
58 59
	public void register(String name, Class driver);
60

  
61
	/**
62
	 * Returns username for a given protocol
63
	 * @param protocol
64
	 * @return
65
	 */
66
	public String getUsername(String protocol);
67

  
68
	/**
69
	 * Saves username for a given protocol
70
	 * @param protocol
71
	 * @param username
72
	 */
73
	public void setUsername(String protocol, String username);
74

  
75
	/**
76
	 * Receives Map with the saved usernames for the different protocols
77
	 * @param usernames
78
	 */
79
	public void setUsernames(Map usernames);
80

  
59 81
}
60 82

  

Also available in: Unified diff