com.spss.psapi.transform

Interface ProcessorStream

    • Method Detail

      • getID

        java.lang.String getID()
        Returns the temporary session ID of this object. A new ID is allocated each time a new stream is created or opened and the ID is not persisted when the stream is saved. This means that if the same persisted object is re-opened multiple times, each object will have a different ID.
        Returns:
        the temporary session ID of this object
        Since:
        PSAPI 2.0
      • setID

        void setID(java.lang.String id)
        Sets the ID for this stream. The ID is not persisted and is only valid for the current session - re-opening the stream will automatically generate a new ID.
        Parameters:
        id - the stream ID
        Since:
        PSAPI 18.1
        See Also:
        getID()
      • setName

        void setName(java.lang.String name)
        Sets the name for this stream. The name is also used as the label if a separate label has not been set.
        Parameters:
        name - the new stream name
        Since:
        PSAPI 18.1
      • close

        void close()
        Closes the current stream. If the stream is already closed, this method does nothing. No further operations can be applied to a closed stream.
      • isClosed

        boolean isClosed()
        Returns true if the stream has been closed, false otherwise.
        Returns:
        true if the stream has been closed
      • isConnected

        boolean isConnected()
        Returns true if this has a server connection.
        Returns:
        true if this has a server connection
      • isExportable

        boolean isExportable(FileFormat format)
        Returns true if this stream can be exported using the supplied FileFormat or false otherwise.
        Parameters:
        fileFormat - the FileFormat
        Returns:
        true if this stream can be exported using the supplied FileFormat, false otherwise
      • isExecuting

        boolean isExecuting()
        Returns true if this stream is currently executing.
        Returns:
        true if this stream is currently executing
        Since:
        PSAPI 18.1
      • getServerConnectionDescriptor

        ServerConnectionDescriptor getServerConnectionDescriptor()
        Returns the ServerConnectionDescriptor used to connect this stream to a server or null if the stream has not yet been connected or if the owner session was not created using SessionFactory.
        Returns:
        the ServerConnectionDescriptor used to connect this stream to a server or null
      • getConnectedServerInfo

        ConnectedServerInfo getConnectedServerInfo()
        Returns information about the remote server to which this stream is connected, or null if the stream is not connected to a remote server.

        A remote server is connected using a server connection descriptor so if there is no connection descriptor there will be no connected server information.

        Returns:
        information about the server to which this stream is connected
        Since:
        PSAPI 17.0
        See Also:
        getServerConnectionDescriptor()
      • getContentProvider

        ContentProvider getContentProvider()
        Returns the ContentProvider for this stream. The content provider manages additional content on behalf of applications.
        Returns:
        the content provider for this stream
        Since:
        PSAPI 13.0
      • run

        ExecutionHandle run(java.lang.String action,
                          java.util.Map<java.lang.String,?> settings,
                          Processor[] nodes,
                          java.util.Collection results)
                            throws OwnerException,
                                   ObjectLockedException,
                                   ServerConnectionException,
                                   SessionException
        Executes the supplied array of nodes synchronously and waits for them to complete. There must be at least one node in the array. Returns an ExecutionHandle which can be used to access the exit status and any result from the task.
        Parameters:
        action - the action to perform on the nodes
        settings - any parameters of the action
        nodes - the array of Processor objects to be executed
        results - receives the results of a successful execution (if any)
        Returns:
        a handle on the execution task
        Throws:
        OwnerException - if the nodes are not all owned by this stream
        ObjectLockedException - if the stream is locked
        ServerConnectionException - if the stream is not connected to a server
        SessionException - if the session is already running a stream, another task, cannot execute the task or if execution completes in a state other than SUCCESS
        Since:
        PSAPI 18.1
      • spawn

        ExecutionHandle spawn(java.lang.String action,
                            java.util.Map<java.lang.String,?> settings,
                            Processor[] nodes,
                            java.util.Collection results)
                              throws OwnerException,
                                     ObjectLockedException,
                                     ServerConnectionException,
                                     SessionException
        Creates and executes the supplied array of nodes asynchronously and waits for them to complete. There must be at least one node in the array. Returns an ExecutionHandle which can be used to monitor and control the progress of the task. There must be at least one node in the array.
        Parameters:
        action - the action to perform on the nodes
        settings - any parameters of the action
        nodes - the array of Processor objects to be executed
        results - receives the results of a successful execution (if any)
        Returns:
        a handle on the execution task
        Throws:
        OwnerException - if the nodes are not all owned by this stream
        ObjectLockedException - if the stream is locked
        ServerConnectionException - if the stream is not connected to a server
        SessionException - if the session is already running a stream, another task or cannot execute the task
        Since:
        PSAPI 18.1
      • getGlobalValues

        GlobalValues getGlobalValues()
        Returns the global values computed for this stream. Global values are constructed and updated by executing a "setglobals" node.
        Returns:
        the global values for the stream
        Since:
        PSAPI 16.0.0
      • createServerDatabaseConnection

        ServerDatabaseConnection createServerDatabaseConnection(java.lang.String datasourceName,
                                                              java.lang.String userName,
                                                              java.lang.String password,
                                                              java.lang.String catalogName)
                                                                throws ServerConnectionException,
                                                                       ServerResourceException
        Creates a ServerDatabaseConnection. The datasource name must visible to the data mining server.
        Parameters:
        datasourceName - the datasource name
        userName - the user name
        password - the password
        catalogName - the catalog name
        Returns:
        a ServerDatabaseConnection
        Throws:
        ServerConnectionException - if the session is not connected to a server
        ServerResourceException - if the connection task fails.
        Since:
        PSAPI 16.0.2
      • createServerDatabaseConnection

        ServerDatabaseConnection createServerDatabaseConnection(java.util.List<java.lang.Object> driverConnection)
                                                                throws ServerConnectionException,
                                                                       ServerResourceException
        Creates a database connection associated with the supplied server using the supplied information. The driverConnect information is expected to be a list of strings with at least the following values:
        1. database driver name e.g. 'IBM DB2 ODBC DRIVER'
        2. connection information e.g. 'DATABASE=(db);HOSTNAME=(db-host);PORT=(port);PROTOCOL=TCPIP;UID=(user name);PWD=(password);'
        3. user name
        4. password
        Parameters:
        driverConnection - the driver connection information
        Returns:
        server database connection
        Throws:
        ServerConnectionException
        ServerResourceException
        Since:
        PSAPI 18.1
      • getRuntimeName

        java.lang.String getRuntimeName()
        Returns the name of the runtime environment against which this stream will execute. The default value is spss-modeler.
        Returns:
        the target runtime environment for this stream
        Since:
        PSAPI 18.1

(C) Copyright IBM Corp. 1994, 2015. All Rights Reserved.