共用方式為


DataType 類別

(輸入或輸出) 之資料片段的資料類型。

初始化 DataType。

繼承
builtins.object
DataType

建構函式

DataType(workspace, id, name, description, is_directory, parent_datatype_ids)

參數

workspace
Workspace
必要

此 DataType 所屬的工作區物件。

id
str
必要

資料類型的識別碼。

name
str
必要

資料類型的名稱

description
str
必要

資料類型的描述。

is_directory
bool
必要

指出資料類型是否代表目錄。 如果資料類型代表目錄,則為 True;如果它代表單一檔案,則為 False。

parent_datatype_ids
list
必要

此資料類型衍生自的父資料類型清單。

workspace
Workspace
必要

此 DataType 所屬的工作區物件。

id
str
必要

資料類型的識別碼。

name
str
必要

資料類型的名稱。

description
str
必要

資料類型的描述。

is_directory
bool
必要

指出資料類型是否代表目錄。 如果資料類型代表目錄,則為 True;如果它代表單一檔案,則為 False。

parent_datatype_ids
list
必要

此資料類型衍生自的父資料類型清單。

方法

create_data_type

建立新的 DataType。

list_data_types

列出指定工作區上的現有 DataType。

update

更新此 DataType 的描述或父 DataType。

create_data_type

建立新的 DataType。

static create_data_type(workspace, name, description, is_directory, parent_datatypes=None)

參數

workspace
Workspace
必要

DataType 所屬的工作區物件。

name
str
必要

DataType 的名稱。

description
str
必要

DataType 的描述。

is_directory
bool
必要

指出 DataType 是否代表目錄。 如果 DataType 代表目錄,則為 True;如果 DataType 代表單一檔案,則為 False。

parent_datatypes
list
預設值: None

DataType 衍生自的父 DataType 名稱清單。

傳回

已建立的 DataType。

傳回類型

list_data_types

列出指定工作區上的現有 DataType。

static list_data_types(workspace)

參數

workspace
Workspace
必要

工作區物件。

傳回

DataTypes 的清單。

傳回類型

update

更新此 DataType 的描述或父 DataType。

update(new_description=None, new_parent_datatypes=None)

參數

new_description
str
預設值: None

DataType 的新描述

new_parent_datatypes
list
預設值: None

新父 DataTypes 的清單。 新的清單將會新增至此 DataType 的現有父 DataType 清單。

屬性

description

取得資料類型的描述。

傳回

描述字串。

傳回類型

str

id

取得此資料的識別碼。

傳回

ID。

傳回類型

str

is_directory

如果資料類型代表目錄,則傳回 True;如果資料類型代表單一檔案,則傳回 False。

傳回

是目錄屬性。

傳回類型

name

取得資料類型的名稱。

傳回

名稱。

傳回類型

str

parent_datatype_ids

列出此資料類型衍生自的父資料類型。

傳回

資料類型識別碼的清單。

傳回類型