com.supermap.services.providers

Class WorkspaceConnectionInfo

  • java.lang.Object
    • com.supermap.services.providers.WorkspaceConnectionInfo
  • All Implemented Interfaces:
    java.io.Serializable


    public class WorkspaceConnectionInfo
    extends java.lang.Object
    implements java.io.Serializable
    

    Workspace connection information.

    Used to describe workspace-related information, workspace type, user name, password, and so on.

    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      java.lang.String database
      The name of the database where the workspace is connected.
      java.lang.String driver
      The name of the driver that uses the ODBC connection.
      java.lang.String name
      The name of the workspace in the database.
      java.lang.String password
      Accesses the workspace to connect to the database or file password.
      java.lang.String server
      Database server or workspace file path.
      java.lang.String type
      The type of workspace.
      java.lang.String username
      The user name of the database.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object another)
      Judges whether another object is equal.
      int hashCode()
      Generates a hash code.
      static boolean isDatabaseWorkspace(java.lang.String connStr) 
      static WorkspaceConnectionInfo parse(java.lang.String connStr)
      Parses the workspace connection object according to the connection string.
      static WorkspaceConnectionInfo parse(java.lang.String connStr, boolean handleUnCanonicalPath)
      Parses the workspace connection object according to the connection string.
      static java.lang.String safelyHandleUnCanonicalPath(java.lang.String connStr) 
      java.lang.String toStandardString()
      Converts the link information to a string.
      java.lang.String toString()
      Converts the link information to a string.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • server

        public java.lang.String server
        
        Database server or workspace file path.
      • username

        public java.lang.String username
        
        The user name of the database.
      • password

        public java.lang.String password
        
        Accesses the workspace to connect to the database or file password.
      • type

        public java.lang.String type
        
        The type of workspace.
      • database

        public java.lang.String database
        
        The name of the database where the workspace is connected.
      • name

        public java.lang.String name
        
        The name of the workspace in the database.
      • driver

        public java.lang.String driver
        
        The name of the driver that uses the ODBC connection.
    • Constructor Detail

      • WorkspaceConnectionInfo

        public WorkspaceConnectionInfo()
        
    • Method Detail

      • parse

        public static WorkspaceConnectionInfo parse(java.lang.String connStr)
        

        Parses the workspace connection object according to the connection string. String connection format:

        1 server=xx.xx.xx.xx;database=databaseName;driver=oracle;username=xxx;password=xxx

        2 /xx/xx/xx.sxw

        3 /xx/xx/xx.sxwu

        Parameters:
        connStr - connection string.
        Returns:
        workspace connection object.
        Throws:
        java.lang.IllegalArgumentException
      • parse

        public static WorkspaceConnectionInfo parse(java.lang.String connStr,
                                    boolean handleUnCanonicalPath)
        

        Parses the workspace connection object according to the connection string. String connection format:

        1 server=xx.xx.xx.xx;database=databaseName;driver=oracle;username=xxx;password=xxx

        2 /xx/xx/xx.sxw

        3 /xx/xx/xx.sxwu

        Parameters:
        connStr - connection string.
        handleUnCanonicalPath - whether to handle relative paths
        Returns:
        workspace connection object.
      • isDatabaseWorkspace

        public static boolean isDatabaseWorkspace(java.lang.String connStr)
        
      • safelyHandleUnCanonicalPath

        public static java.lang.String safelyHandleUnCanonicalPath(java.lang.String connStr)
        
      • hashCode

        public int hashCode()
        

        Generates a hash code.

        Overrides:
        hashCode in class java.lang.Object
        Returns:
        generated hash code.
      • equals

        public boolean equals(java.lang.Object another)
        

        Judges whether another object is equal.

        Overrides:
        equals in class java.lang.Object
        Parameters:
        another - another object.
        Returns:
        True is equal, and false is not equal.
      • toString

        public java.lang.String toString()
        

        Converts the link information to a string.

        Generated string format:

        server=xx.xx.xx.xx,database=databaseName,driver=oracle,username=xxx,password=xxx

        Overrides:
        toString in class java.lang.Object
        Returns:
        connection information of the converted string.
      • toStandardString

        public java.lang.String toStandardString()
        

        Converts the link information to a string.

        Generated string format:

        server=xx.xx.xx.xx;database=databaseName;driver=oracle;username=xxx;password=xxx

        Returns:
        connection information of the converted string.