Search in sources :

Example 1 with DatabaseInput

use of com.sldeditor.extension.filesystem.database.DatabaseInput in project sldeditor by robward-scisys.

the class FileSystemExtensionFactory method populateExtensions.

/**
 * Populate default file extensions.
 *
 * @param toolMgr the tool manager
 */
private static void populateExtensions(ToolSelectionInterface toolMgr) {
    geoServerInput = new GeoServerInput(toolMgr);
    geoServerInput.readPropertyFile();
    extensionList.add(geoServerInput);
    databaseInput = new DatabaseInput(toolMgr);
    databaseInput.readPropertyFile();
    extensionList.add(databaseInput);
    fileSystemInput = new FileSystemInput(toolMgr);
    extensionList.add(fileSystemInput);
}
Also used : GeoServerInput(com.sldeditor.extension.filesystem.geoserver.GeoServerInput) DatabaseInput(com.sldeditor.extension.filesystem.database.DatabaseInput) FileSystemInput(com.sldeditor.extension.filesystem.file.FileSystemInput)

Example 2 with DatabaseInput

use of com.sldeditor.extension.filesystem.database.DatabaseInput in project sldeditor by robward-scisys.

the class DatabaseInputTest method testTreeExpanded.

/**
 * Test method for {@link com.sldeditor.extension.filesystem.database.DatabaseInput#treeExpanded(java.lang.Object)}.
 */
@Test
public void testTreeExpanded() {
    DatabaseInput input = new DatabaseInput(null);
    assertFalse(input.treeExpanded(null));
}
Also used : DatabaseInput(com.sldeditor.extension.filesystem.database.DatabaseInput) Test(org.junit.Test)

Example 3 with DatabaseInput

use of com.sldeditor.extension.filesystem.database.DatabaseInput in project sldeditor by robward-scisys.

the class DatabaseInputTest method testSetFolder.

/**
 * Test method for
 * {@link com.sldeditor.extension.filesystem.database.DatabaseInput#setFolder(com.sldeditor.common.data.DatabaseConnection, boolean)}.
 */
@Test
public void testSetFolder() {
    DatabaseInput input = new DatabaseInput(null);
    // Add some database connections
    DatabaseConnection connection1 = DatabaseConnectionFactory.createGeoPackage();
    Map<String, String> connectionDataMap = new HashMap<String, String>();
    connectionDataMap.put(GeoPkgDataStoreFactory.DATABASE.key, "test.gpkg");
    connection1.setConnectionDataMap(connectionDataMap);
    input.setFolder(connection1, true);
}
Also used : HashMap(java.util.HashMap) DatabaseInput(com.sldeditor.extension.filesystem.database.DatabaseInput) DatabaseConnection(com.sldeditor.common.data.DatabaseConnection) Test(org.junit.Test)

Example 4 with DatabaseInput

use of com.sldeditor.extension.filesystem.database.DatabaseInput in project sldeditor by robward-scisys.

the class DatabaseInputTest method testRightMouseButton.

/**
 * Test method for
 * {@link com.sldeditor.extension.filesystem.database.DatabaseInput#rightMouseButton(javax.swing.JPopupMenu, java.lang.Object, java.awt.event.MouseEvent)}.
 */
@Test
public void testRightMouseButton() {
    DatabaseInput input = new DatabaseInput(null);
    input.rightMouseButton(null, null, null);
}
Also used : DatabaseInput(com.sldeditor.extension.filesystem.database.DatabaseInput) Test(org.junit.Test)

Example 5 with DatabaseInput

use of com.sldeditor.extension.filesystem.database.DatabaseInput in project sldeditor by robward-scisys.

the class DatabaseInputTest method testGetDestinationText.

/**
 * Test method for {@link com.sldeditor.extension.filesystem.database.DatabaseInput#getDestinationText(com.sldeditor.common.NodeInterface)}.
 */
@Test
public void testGetDestinationText() {
    DatabaseInput input = new DatabaseInput(null);
    assertEquals("Unknown", input.getDestinationText(null));
}
Also used : DatabaseInput(com.sldeditor.extension.filesystem.database.DatabaseInput) Test(org.junit.Test)

Aggregations

DatabaseInput (com.sldeditor.extension.filesystem.database.DatabaseInput)14 Test (org.junit.Test)13 DatabaseConnection (com.sldeditor.common.data.DatabaseConnection)7 HashMap (java.util.HashMap)6 ArrayList (java.util.ArrayList)5 SLDDataInterface (com.sldeditor.common.SLDDataInterface)2 NodeInterface (com.sldeditor.common.NodeInterface)1 SelectedFiles (com.sldeditor.common.filesystem.SelectedFiles)1 FSTree (com.sldeditor.datasource.extension.filesystem.node.FSTree)1 DatabaseFeatureClassNode (com.sldeditor.datasource.extension.filesystem.node.database.DatabaseFeatureClassNode)1 DatabaseNode (com.sldeditor.datasource.extension.filesystem.node.database.DatabaseNode)1 FileTreeNode (com.sldeditor.datasource.extension.filesystem.node.file.FileTreeNode)1 FileSystemInput (com.sldeditor.extension.filesystem.file.FileSystemInput)1 GeoServerInput (com.sldeditor.extension.filesystem.geoserver.GeoServerInput)1 File (java.io.File)1 FileNotFoundException (java.io.FileNotFoundException)1 DefaultMutableTreeNode (javax.swing.tree.DefaultMutableTreeNode)1 DefaultTreeModel (javax.swing.tree.DefaultTreeModel)1