Search in sources :

Example 1 with ProcessBriefType

use of net.opengis.wps10.ProcessBriefType in project sldeditor by robward-scisys.

the class RenderTransformationManager method getRenderTransform.

/**
 * Gets the render transform.
 *
 * @param connection the connection
 * @return the render transform
 */
public List<ProcessBriefType> getRenderTransform(GeoServerConnection connection) {
    GeoServerWPSClientInterface client = new GeoServerWPSClient(connection);
    client.getCapabilities();
    List<ProcessBriefType> functionList = client.getRenderTransformations(DataTypeEnum.E_VECTOR);
    functionList = client.getRenderTransformations(DataTypeEnum.E_RASTER);
    return functionList;
}
Also used : GeoServerWPSClient(com.sldeditor.extension.filesystem.geoserver.client.GeoServerWPSClient) GeoServerWPSClientInterface(com.sldeditor.extension.filesystem.geoserver.client.GeoServerWPSClientInterface) ProcessBriefType(net.opengis.wps10.ProcessBriefType)

Example 2 with ProcessBriefType

use of net.opengis.wps10.ProcessBriefType in project sldeditor by robward-scisys.

the class FunctionTableModel method populate.

/**
 * Populate using a custom function.
 *
 * @param selectedFunction the selected function
 */
public void populate(ProcessBriefType selectedFunction) {
    ProcessDescriptionType selectedCustomFunction = (ProcessDescriptionType) selectedFunction;
    this.selectedFunction.setSelectedCustomFunction(selectedCustomFunction);
    valueList = this.selectedFunction.extractParameters();
}
Also used : ProcessDescriptionType(net.opengis.wps10.ProcessDescriptionType)

Example 3 with ProcessBriefType

use of net.opengis.wps10.ProcessBriefType in project sldeditor by robward-scisys.

the class RenderTransformationDialog method displayCustomProcessFunction.

/**
 * Display custom process function, a process function that was read from GeoServer.
 *
 * @param selectedValue the selected value
 */
private void displayCustomProcessFunction(String selectedValue) {
    ProcessBriefType selectedFunction = null;
    for (ProcessBriefType function : availableFunctionList) {
        if (function.getIdentifier().getValue().compareTo(selectedValue) == 0) {
            selectedFunction = function;
            break;
        }
    }
    functionParameterTableModel.populate(selectedFunction);
}
Also used : ProcessBriefType(net.opengis.wps10.ProcessBriefType)

Example 4 with ProcessBriefType

use of net.opengis.wps10.ProcessBriefType in project sldeditor by robward-scisys.

the class RenderTransformationDialog method populateFunctionList.

/**
 * Populate function list.
 *
 * @param selectedItem the selected item
 */
private void populateFunctionList(String selectedItem) {
    GeoServerConnection connection = connectionMap.get(selectedItem);
    String message = String.format("%s : %s", Localisation.getString(RenderTransformationDialog.class, "RenderTransformationDialog.tryingToConnect"), connection.getUrl().toString());
    showMessage(message, false);
    // Make sure the above messages are displayed by trying to connect to
    // a WPS server in a separate thread.
    SwingUtilities.invokeLater(new Runnable() {

        public void run() {
            client = new GeoServerWPSClient(connection);
            if (client.getCapabilities()) {
                availableFunctionList = client.getRenderTransformations(DataTypeEnum.E_VECTOR);
                functionListModel.removeAllElements();
                populateBuiltInProcessFunctions();
                for (ProcessBriefType function : availableFunctionList) {
                    functionListModel.addElement(function.getIdentifier().getValue());
                }
                // Clear info field
                showMessage("", false);
            } else {
                // Show error message
                showMessage(Localisation.getString(RenderTransformationDialog.class, "RenderTransformationDialog.errorFailedToConnect"), true);
            }
            // Make ui available again
            updateButtonState(true);
        }
    });
}
Also used : GeoServerWPSClient(com.sldeditor.extension.filesystem.geoserver.client.GeoServerWPSClient) GeoServerConnection(com.sldeditor.common.data.GeoServerConnection) ProcessBriefType(net.opengis.wps10.ProcessBriefType)

Example 5 with ProcessBriefType

use of net.opengis.wps10.ProcessBriefType in project sldeditor by robward-scisys.

the class GeoServerWPSClient method getRenderTransformations.

/**
 * Gets the render transformations.
 *
 * @param typeOfData the type of data
 * @return the render transformations
 */
@Override
public List<ProcessBriefType> getRenderTransformations(DataTypeEnum typeOfData) {
    List<ProcessBriefType> functionList = new ArrayList<ProcessBriefType>();
    for (ProcessDescriptionType processDescription : processList) {
        boolean outputParameter = getOutputParameter(typeOfData, processDescription.getProcessOutputs());
        boolean inputParameter = true;
        if (inputParameter && outputParameter) {
            functionList.add(processDescription);
        }
    }
    return functionList;
}
Also used : ProcessDescriptionType(net.opengis.wps10.ProcessDescriptionType) ArrayList(java.util.ArrayList) ProcessBriefType(net.opengis.wps10.ProcessBriefType)

Aggregations

ProcessBriefType (net.opengis.wps10.ProcessBriefType)4 GeoServerWPSClient (com.sldeditor.extension.filesystem.geoserver.client.GeoServerWPSClient)2 ProcessDescriptionType (net.opengis.wps10.ProcessDescriptionType)2 GeoServerConnection (com.sldeditor.common.data.GeoServerConnection)1 GeoServerWPSClientInterface (com.sldeditor.extension.filesystem.geoserver.client.GeoServerWPSClientInterface)1 ArrayList (java.util.ArrayList)1