DataType 类

数据段的数据类型(输入或输出)。

继承
builtins.object
DataType

构造函数

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

参数

workspace
Workspace
必需

此 DataType 所属的工作区对象。

id
str
必需

数据类型的 ID。

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;如果表示单个文件,则为 False。

parent_datatypes
list
默认值: None

此 DataType 派生自的父 DataType 名称的列表。

返回

创建的 DataType。

返回类型

list_data_types

列出给定工作区中现有的 DataType。

static list_data_types(workspace)

参数

workspace
Workspace
必需

工作区对象。

返回

DataType 的列表。

返回类型

update

更新此 DataType 的说明或父 DataType。

update(new_description=None, new_parent_datatypes=None)

参数

new_description
str
默认值: None

DataType 的新说明

new_parent_datatypes
list
默认值: None

新父级 DataType 的列表。 新列表将添加到此 DataType 的父 DataType 的现有列表中。

属性

description

获取数据类型的说明。

返回

说明字符串。

返回类型

str

id

获取此数据的 ID。

返回

ID。

返回类型

str

is_directory

如果数据类型表示目录,则返回 True;如果数据类型表示单个文件,则返回 False。

返回

是目录属性。

返回类型

name

获取数据类型的名称。

返回

名称。

返回类型

str

parent_datatype_ids

列出此数据类型派生自的父数据类型。

返回

数据类型 ID 的列表。

返回类型