Class SClient4WPSSession

    • Field Detail

      • processDescriptions

        public HashMap<String,​net.opengis.wps.x100.ProcessDescriptionsDocument> processDescriptions
    • Constructor Detail

      • SClient4WPSSession

        public SClient4WPSSession​(String user,
                                  String password)
        Initializes a WPS client session.
        Parameters:
        user - user
        password - password
    • Method Detail

      • connect

        public boolean connect​(String url)
                        throws org.n52.wps.client.WPSClientException
        Connects to a WPS and retrieves Capabilities plus puts all available Descriptions into cache.
        Parameters:
        url - the entry point for the service. This is used as id for further identification of the service.
        Returns:
        true, if connect succeeded, false else.
        Throws:
        org.n52.wps.client.WPSClientException - WPSClientException
      • connect

        public boolean connect​(String url,
                               boolean refresh)
                        throws org.n52.wps.client.WPSClientException
        Throws:
        org.n52.wps.client.WPSClientException
      • connectForMonitoring

        public boolean connectForMonitoring​(String url)
                                     throws org.n52.wps.client.WPSClientException
        Connects to a WPS and retrieves Capabilities plus puts all available Descriptions into cache.
        Parameters:
        url - the entry point for the service. This is used as id for further identification of the service.
        Returns:
        true, if connect succeeded, false else.
        Throws:
        org.n52.wps.client.WPSClientException - WPSClientException
      • disconnect

        public void disconnect​(String url)
        removes a service from the session
        Parameters:
        url - url
      • getLoggedServices

        public List<String> getLoggedServices()
        returns the serverIDs of all loggedServices
        Returns:
        list of server ids
      • descriptionsAvailableInCache

        public boolean descriptionsAvailableInCache​(String serverID)
        informs you if the descriptions for the specified service is already in the session. in normal case it should return true :)
        Parameters:
        serverID - server id
        Returns:
        success
      • getProcessDescription

        public net.opengis.wps.x100.ProcessDescriptionType getProcessDescription​(String serverID,
                                                                                 String processID)
                                                                          throws IOException
        Parameters:
        serverID - server id
        processID - process id
        Returns:
        a ProcessDescription for a specific process from Cache.
        Throws:
        IOException - IOException
      • getAllProcessDescriptions

        public net.opengis.wps.x100.ProcessDescriptionType[] getAllProcessDescriptions​(String wpsUrl)
                                                                                throws IOException
        Delivers all ProcessDescriptions from a WPS
        Parameters:
        wpsUrl - the URL of the WPS
        Returns:
        An Array of ProcessDescriptions
        Throws:
        IOException - IOException
      • serviceAlreadyRegistered

        public boolean serviceAlreadyRegistered​(String serverID)
        looks up, if the service exists already in session.
        Parameters:
        serverID - server id
        Returns:
        true if registered
      • getWPSCaps

        public net.opengis.wps.x100.CapabilitiesDocument getWPSCaps​(String url)
        provides you the cached capabilities for a specified service.
        Parameters:
        url - url
        Returns:
        CapabilitiesDocument
      • describeAllProcesses

        public net.opengis.wps.x100.ProcessDescriptionsDocument describeAllProcesses​(String url)
                                                                              throws org.n52.wps.client.WPSClientException
        retrieves all current available ProcessDescriptions of a WPS. Mention: to get the current list of all processes, which will be requested, the cached capabilities will be used. Please keep that in mind. the retrieved descriptions will not be cached, so only transient information!
        Parameters:
        url - url
        Returns:
        process descriptions document
        Throws:
        org.n52.wps.client.WPSClientException - WPSClientException
      • describeProcess

        public net.opengis.wps.x100.ProcessDescriptionsDocument describeProcess​(String[] processIDs,
                                                                                String serverID)
                                                                         throws org.n52.wps.client.WPSClientException
        retrieves the desired description for a service. the retrieved information will not be held in cache!
        Parameters:
        processIDs - one or more processIDs
        serverID - server id
        Returns:
        process description document
        Throws:
        org.n52.wps.client.WPSClientException - WPSClientExpcetion
      • execute

        public Object execute​(String serverID,
                              net.opengis.wps.x100.ExecuteDocument execute)
                       throws org.n52.wps.client.WPSClientException
        Executes a process at a WPS
        Parameters:
        serverID - server id
        execute - exceute document
        Returns:
        either an ExecuteResponseDocument or an InputStream if asked for RawData or an Exception Report
        Throws:
        org.n52.wps.client.WPSClientException - WPSClientException
      • retrievesSingleDescription

        protected List<String> retrievesSingleDescription​(InputStream is)
                                                   throws org.n52.wps.client.WPSClientException
        Throws:
        org.n52.wps.client.WPSClientException
      • executeViaGET

        public Object executeViaGET​(String urlString,
                                    String executeAsGETString)
                             throws org.n52.wps.client.WPSClientException
        Executes a process at a WPS
        Parameters:
        urlString - url of server not the entry additionally defined in the caps.
        executeAsGETString - KVP Execute request
        Returns:
        either an ExecuteResponseDocument or an InputStream if asked for RawData or an Exception Report
        Throws:
        org.n52.wps.client.WPSClientException - WSPClientException
      • cancelComputation

        public String cancelComputation​(String url,
                                        String computationId)
                                 throws org.n52.wps.client.WPSClientException
        Throws:
        org.n52.wps.client.WPSClientException