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.SerializableWorkspace 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.StringdatabaseThe name of the database where the workspace is connected.java.lang.StringdriverThe name of the driver that uses the ODBC connection.java.lang.StringnameThe name of the workspace in the database.java.lang.StringpasswordAccesses the workspace to connect to the database or file password.java.lang.StringserverDatabase server or workspace file path.java.lang.StringtypeThe type of workspace.java.lang.StringusernameThe user name of the database.
-
Constructor Summary
Constructors Constructor and Description WorkspaceConnectionInfo()WorkspaceConnectionInfo(WorkspaceConnectionInfo workspaceConnectInfo)
-
Method Summary
Methods Modifier and Type Method and Description booleanequals(java.lang.Object another)Judges whether another object is equal.inthashCode()Generates a hash code.static booleanisDatabaseWorkspace(java.lang.String connStr)static WorkspaceConnectionInfoparse(java.lang.String connStr)Parses the workspace connection object according to the connection string.static WorkspaceConnectionInfoparse(java.lang.String connStr, boolean handleUnCanonicalPath)Parses the workspace connection object according to the connection string.static java.lang.StringsafelyHandleUnCanonicalPath(java.lang.String connStr)java.lang.StringtoStandardString()Converts the link information to a string.java.lang.StringtoString()Converts the link information to a string.
-
-
-
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(WorkspaceConnectionInfo workspaceConnectInfo)
-
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:
hashCodein classjava.lang.Object- Returns:
- generated hash code.
-
equals
public boolean equals(java.lang.Object another)
Judges whether another object is equal.
- Overrides:
equalsin classjava.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:
toStringin classjava.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.
-
-