Base types(基础类型)¶
Property base types define the kind of data that can be stored in a property. For a complete reference of all supported property base types, see the properties overview.
Base types are used to define properties on objects. The base type of a property determines the set of operations available for that property in user applications. All field types are valid base types except for Map and Binary types.
Base types also include the following advanced types:
- Vector: A type for storing vectors on objects for use in a semantic search.
Geopoint: A type for defining properties that represent geographic points.Geoshape: A type for defining properties that represent geographic shapes.- Attachment: A type for storing files on objects for use with functions on objects.
- Time series: A type for defining a property as a time series.
- Media reference: A type for defining a reference to a media file.
- Cipher text: A type for storing a string value encoded with Cipher.
- Struct: A type for defining schema-based properties with multiple fields.
All base types may be used in arrays to represent multiple values for a property, excluding the Vector and Time series types.
Complex property base types¶
Some property base types require additional configuration or have specific use cases. Refer to the sections below for information on the following property base types:
- Media references: Reference media items stored in media sets.
- Struct types: Complex structured data with multiple fields.
Media references¶
A media reference property type allows you to have media on your objects, such as images, videos, audio files, and documents. A media reference points to a specific media item within a media set. The media reference contains information about the media file, which means Foundry can display the media wherever the media reference is used.
Media reference format¶
Below is an example media reference:
{
"mimeType": "image/png",
"reference": {
"type": "mediaSetViewItem",
"mediaSetViewItem": {
"mediaSetRid": "ri.mio.main.media-set.00000000-0000-0000-0000-00000000000",
"mediaSetViewRid": "ri.mio.main.view.00000000-0000-0000-0000-00000000000",
"mediaItemRid": "ri.mio.main.media-item.00000000-0000-0000-0000-00000000000"
}
}
}
The media reference includes the following:
mimeType: The file's media type.reference: A reference containing the media set RID, view RID, and specific media item RID.
Configure media reference properties¶
Object types with media reference properties are backed by a dataset. The backing dataset must include a media reference column, which will map to the media reference property. This column type is specifically designed to store media reference values and ensures proper integration between your ontology objects and media sets.

Additionally, a media reference property must have a media source, which can be configured in the Capabilities tab of the object type. This media source should be the media set that the media references point to.

Structs¶
A struct is an ontology property base type that allows users to create schema-based properties with multiple fields. Struct properties are created from struct type dataset columns. To learn more about structs, refer to the complete struct documentation.
中文翻译¶
基础类型¶
属性基础类型(Base types)定义了属性可存储的数据种类。如需查看所有支持的属性基础类型的完整参考,请参阅属性概述。
基础类型用于定义对象上的属性。属性的基础类型决定了该属性在用户应用程序中可用的操作集。除Map和Binary类型外,所有字段类型均为有效的基础类型。
基础类型还包括以下高级类型:
- 向量(Vector): 一种用于在对象上存储向量的类型,适用于语义搜索。
Geopoint: 一种用于定义表示地理点的属性的类型。Geoshape: 一种用于定义表示地理形状的属性的类型。- 附件(Attachment): 一种用于在对象上存储文件的类型,适用于对象函数。
- 时间序列(Time series): 一种用于将属性定义为时间序列的类型。
- 媒体引用(Media reference): 一种用于定义媒体文件引用的类型。
- 密文(Cipher text): 一种用于存储经Cipher编码的字符串值的类型。
- 结构体(Struct): 一种用于定义包含多个字段的基于模式的属性的类型。
所有基础类型(不包括Vector和Time series类型)均可用于数组中,以表示属性的多个值。
复杂属性基础类型¶
某些属性基础类型需要额外配置或具有特定用例。请参阅以下各节,了解以下属性基础类型的信息:
媒体引用¶
媒体引用属性类型允许您在对象上存储媒体内容,例如图像、视频、音频文件和文档。媒体引用指向媒体集中的特定媒体项。媒体引用包含媒体文件的相关信息,这意味着Foundry可以在使用该媒体引用的任何位置显示该媒体。
媒体引用格式¶
以下是一个媒体引用示例:
{
"mimeType": "image/png",
"reference": {
"type": "mediaSetViewItem",
"mediaSetViewItem": {
"mediaSetRid": "ri.mio.main.media-set.00000000-0000-0000-0000-00000000000",
"mediaSetViewRid": "ri.mio.main.view.00000000-0000-0000-0000-00000000000",
"mediaItemRid": "ri.mio.main.media-item.00000000-0000-0000-0000-00000000000"
}
}
}
媒体引用包含以下内容:
mimeType: 文件的媒体类型。reference: 包含媒体集RID、视图RID和特定媒体项RID的引用。
配置媒体引用属性¶
具有媒体引用属性的对象类型由数据集支持。该支持数据集必须包含一个媒体引用列,该列将映射到媒体引用属性。此列类型专为存储媒体引用值而设计,确保本体对象与媒体集之间的正确集成。

此外,媒体引用属性必须具有媒体源,可在对象类型的功能(Capabilities) 选项卡中进行配置。此媒体源应为媒体引用所指向的媒体集。

结构体¶
结构体是一种本体属性基础类型,允许用户创建包含多个字段的基于模式的属性。结构体属性由结构体类型数据集列创建。要了解更多关于结构体的信息,请参阅完整的结构体文档。