Revision 37818
branches/v2_0_0_prep/extensions/extCatalog/src/org/gvsig/catalog/CatalogClientExtension.java | ||
---|---|---|
44 | 44 |
import java.util.Date; |
45 | 45 |
import java.util.GregorianCalendar; |
46 | 46 |
|
47 |
import org.slf4j.Logger; |
|
48 |
import org.slf4j.LoggerFactory; |
|
49 |
|
|
47 | 50 |
import org.gvsig.andami.PluginServices; |
48 | 51 |
import org.gvsig.andami.persistence.serverData.ServerDataPersistence; |
49 | 52 |
import org.gvsig.andami.plugins.Extension; |
50 | 53 |
import org.gvsig.app.project.documents.view.gui.AbstractViewPanel; |
51 | 54 |
import org.gvsig.catalog.gui.ConnectDialog; |
52 |
//import org.gvsig.catalog.impl.DefaultCatalogLibrary; |
|
53 | 55 |
import org.gvsig.catalog.loaders.ARCIMSLayerLoader; |
54 | 56 |
import org.gvsig.catalog.loaders.LinkLoader; |
55 | 57 |
import org.gvsig.catalog.loaders.PostgisLayerLoader; |
... | ... | |
60 | 62 |
import org.gvsig.tools.ToolsLocator; |
61 | 63 |
import org.gvsig.tools.extensionpoint.ExtensionPointManager; |
62 | 64 |
import org.gvsig.utils.swing.jcomboServer.ServerData; |
63 |
import org.slf4j.Logger; |
|
64 |
import org.slf4j.LoggerFactory; |
|
65 | 65 |
|
66 | 66 |
|
67 | 67 |
|
... | ... | |
72 | 72 |
* @author Luis W. Sevilla |
73 | 73 |
*/ |
74 | 74 |
public class CatalogClientExtension extends Extension { |
75 |
private static final Logger logger = LoggerFactory.getLogger(CatalogClientExtension.class); |
|
76 |
public static final String CATALOGLAYERS = "CatalogLayers"; |
|
77 |
// private CatalogLibrary catalogLibrary = null; |
|
78 |
// private DefaultCatalogLibrary defaultCatalogLibrary = null; |
|
75 |
private static final Logger LOG = LoggerFactory.getLogger(CatalogClientExtension.class); |
|
76 |
private static final String CATALOGLAYERS = "CatalogLayers"; |
|
79 | 77 |
|
80 |
/* (non-Javadoc) |
|
81 |
* @see com.iver.andami.plugins.Extension#inicializar() |
|
82 |
*/ |
|
83 | 78 |
public void initialize() { |
84 |
// catalogLibrary = new CatalogLibrary(); |
|
85 |
// catalogLibrary.initialize(); |
|
86 |
// |
|
87 |
// defaultCatalogLibrary = new DefaultCatalogLibrary(); |
|
88 |
// defaultCatalogLibrary.initialize(); |
|
89 |
|
|
90 | 79 |
ExtensionPointManager extensionPointManager = ToolsLocator |
91 |
.getExtensionPointManager(); |
|
80 |
.getExtensionPointManager();
|
|
92 | 81 |
extensionPointManager.add(CATALOGLAYERS, "List of possible layers that can be loaded from a catalog"); |
93 | 82 |
registerIcons(); |
94 | 83 |
} |
... | ... | |
120 | 109 |
); |
121 | 110 |
} |
122 | 111 |
|
123 |
/* |
|
124 |
* (non-Javadoc) |
|
125 |
* @see com.iver.andami.plugins.Extension#postInitialize() |
|
126 |
*/ |
|
127 | 112 |
public void postInitialize(){ |
128 |
// catalogLibrary.postInitialize(); |
|
129 |
// defaultCatalogLibrary.postInitialize(); |
|
130 |
|
|
131 | 113 |
//Initialazing the layer loaders |
132 | 114 |
CatalogManager catalogManager = CatalogLocator.getCatalogManager(); |
133 | 115 |
catalogManager.addLayerLoader(Resource.WMS, WMSLayerLoader.class); |
... | ... | |
140 | 122 |
catalogManager.addLayerLoader(Resource.ARCIMS_VECTORIAL, ARCIMSLayerLoader.class); |
141 | 123 |
} |
142 | 124 |
|
143 |
/* (non-Javadoc) |
|
144 |
* @see com.iver.andami.plugins.Extension#execute(java.lang.String) |
|
145 |
*/ |
|
146 | 125 |
public void execute(String actionCommand) { |
147 | 126 |
actionConnectDialogStart(); |
148 | 127 |
} |
... | ... | |
206 | 185 |
Calendar cal = new GregorianCalendar(); |
207 | 186 |
Date date = cal.getTime(); |
208 | 187 |
|
209 |
|
|
210 | 188 |
servers[0] = new ServerData("http://delta.icc.es/indicio/csw", date, date, ServerData.SERVER_TYPE_CATALOG, ServerData.SERVER_SUBTYPE_CATALOG_CSW); |
211 | 189 |
servers[1] = new ServerData("mapas.euitto.upm.es:2100", date, date, ServerData.SERVER_TYPE_CATALOG, ServerData.SERVER_SUBTYPE_CATALOG_Z3950); |
212 | 190 |
servers[2] = new ServerData("193.43.36.137:2100", date, date, ServerData.SERVER_TYPE_CATALOG, ServerData.SERVER_SUBTYPE_CATALOG_Z3950); |
... | ... | |
214 | 192 |
return servers; |
215 | 193 |
} |
216 | 194 |
|
217 |
/* (non-Javadoc) |
|
218 |
* @see com.iver.andami.plugins.Extension#isEnabled() |
|
219 |
*/ |
|
220 | 195 |
public boolean isEnabled() { |
221 | 196 |
return true; |
222 | 197 |
} |
223 | 198 |
|
224 |
/* (non-Javadoc) |
|
225 |
* @see com.iver.andami.plugins.Extension#isVisible() |
|
226 |
*/ |
|
227 | 199 |
public boolean isVisible() { |
228 | 200 |
org.gvsig.andami.ui.mdiManager.IWindow f = PluginServices.getMDIManager() |
229 | 201 |
.getActiveWindow(); |
Also available in: Unified diff