Search in sources :

Example 16 with GeoServerNode

use of com.sldeditor.datasource.extension.filesystem.node.geoserver.GeoServerNode in project sldeditor by robward-scisys.

the class GeoServerInput method addConnectionNode.

/**
 * Adds the connection node.
 *
 * @param connection the connection
 */
private void addConnectionNode(GeoServerConnection connection) {
    GeoServerNode node = new GeoServerNode(this, connection);
    getRootGeoServerNode().add(node);
    progress.addNewConnectionNode(connection, node);
}
Also used : GeoServerNode(com.sldeditor.datasource.extension.filesystem.node.geoserver.GeoServerNode)

Example 17 with GeoServerNode

use of com.sldeditor.datasource.extension.filesystem.node.geoserver.GeoServerNode in project sldeditor by robward-scisys.

the class GeoServerNodeTest method testGeoServerLayerNode.

/**
 * Test method for {@link com.sldeditor.datasource.extension.filesystem.node.geoserver.GeoServerLayerNode#GeoServerLayerNode(com.sldeditor.common.filesystem.FileSystemInterface, com.sldeditor.common.data.GeoServerLayer)}.
 */
@Test
public void testGeoServerLayerNode() {
    FileSystemInterface fileHandler = new DummyFileSystemInput();
    GeoServerConnection connection = new GeoServerConnection();
    connection.setConnectionName("test connection");
    connection.setUserName("test user name");
    GeoServerNode node = new GeoServerNode(fileHandler, connection);
    assertEquals(connection, node.getConnection());
    assertEquals(fileHandler, node.getHandler());
    assertEquals(BuiltInDataFlavour.GEOSERVER_DATAITEM_FLAVOUR, node.getDataFlavour());
    assertNull(node.getDestinationText());
}
Also used : FileSystemInterface(com.sldeditor.common.filesystem.FileSystemInterface) GeoServerNode(com.sldeditor.datasource.extension.filesystem.node.geoserver.GeoServerNode) GeoServerConnection(com.sldeditor.common.data.GeoServerConnection) Test(org.junit.Test)

Example 18 with GeoServerNode

use of com.sldeditor.datasource.extension.filesystem.node.geoserver.GeoServerNode in project sldeditor by robward-scisys.

the class GeoServerReadProgressTest method testDisconnect.

/**
 * Test method for
 * {@link com.sldeditor.extension.filesystem.geoserver.GeoServerReadProgress#disconnect(com.sldeditor.common.data.GeoServerConnection)}.
 */
@Test
public void testDisconnect() {
    GeoServerReadProgress progress = new GeoServerReadProgress(null, null);
    GeoServerOverallNode geoServerRootNode = new GeoServerOverallNode(null);
    GeoServerConnection connection = new GeoServerConnection();
    connection.setConnectionName("test connection 1");
    GeoServerNode node = new GeoServerNode(null, connection);
    geoServerRootNode.add(node);
    progress.addNewConnectionNode(connection, node);
    progress.disconnect(null);
    progress.disconnect(connection);
}
Also used : GeoServerOverallNode(com.sldeditor.datasource.extension.filesystem.node.geoserver.GeoServerOverallNode) GeoServerNode(com.sldeditor.datasource.extension.filesystem.node.geoserver.GeoServerNode) GeoServerConnection(com.sldeditor.common.data.GeoServerConnection) GeoServerReadProgress(com.sldeditor.extension.filesystem.geoserver.GeoServerReadProgress) Test(org.junit.Test)

Aggregations

GeoServerNode (com.sldeditor.datasource.extension.filesystem.node.geoserver.GeoServerNode)18 GeoServerConnection (com.sldeditor.common.data.GeoServerConnection)8 Test (org.junit.Test)6 GeoServerOverallNode (com.sldeditor.datasource.extension.filesystem.node.geoserver.GeoServerOverallNode)5 GeoServerReadProgress (com.sldeditor.extension.filesystem.geoserver.GeoServerReadProgress)4 List (java.util.List)3 NodeInterface (com.sldeditor.common.NodeInterface)2 StyleWrapper (com.sldeditor.common.data.StyleWrapper)2 GeoServerWorkspaceNode (com.sldeditor.datasource.extension.filesystem.node.geoserver.GeoServerWorkspaceNode)2 GeoServerClientInterface (com.sldeditor.extension.filesystem.geoserver.client.GeoServerClientInterface)2 HashMap (java.util.HashMap)2 DefaultMutableTreeNode (javax.swing.tree.DefaultMutableTreeNode)2 SLDDataInterface (com.sldeditor.common.SLDDataInterface)1 GeoServerLayer (com.sldeditor.common.data.GeoServerLayer)1 SLDData (com.sldeditor.common.data.SLDData)1 FileSystemInterface (com.sldeditor.common.filesystem.FileSystemInterface)1 SelectedFiles (com.sldeditor.common.filesystem.SelectedFiles)1 FileTreeNode (com.sldeditor.datasource.extension.filesystem.node.file.FileTreeNode)1 GeoServerStyleHeadingNode (com.sldeditor.datasource.extension.filesystem.node.geoserver.GeoServerStyleHeadingNode)1 GeoServerStyleNode (com.sldeditor.datasource.extension.filesystem.node.geoserver.GeoServerStyleNode)1