Types reference(类型参考)¶
When you define your Ontology, you can use a wide variety of types to represent real-world definitions of the data you brought into Foundry. The types used in Foundry are categorized as Ontology types or data types:
- Ontology types are used to model a real-world domain into an Ontology.
- Data types are used to represent data values. Data types in Foundry are inspired by similar concepts in RDF ↗, OWL ↗ and XSD ↗.
Ontology resources¶
The following types are available to build and define your Ontology.
Object type¶
An object type is a schema definition of a real-world entity or event, comprised of individual objects. For example, both JFK and LHR can be objects of an Airport object type.
Learn more about object types.
Property¶
A property of an object type is a characteristic that informs a real-world entity or event. For example, if LHR is an object type of Airports, name and country are properties of Airports. For the LHR object, the property values would be the following:
- name: LHR
- country: United Kingdom
Shared property¶
A shared property is a property that can be used on multiple object types in your Ontology. Shared properties allow for consistent data modeling across object types and centralized management of property metadata.
Learn more about shared properties.
Link type¶
A link type is the schema definition of a relationship between two object types. A link refers to a single instance of that relationship between two objects.
Action type¶
An action type is the schema definition of a set of changes or edits to objects, property values, and links that a user can make all at once. Action types also include the side effect behaviors that happen when an Action occurs. Once an action type is configured in the Ontology, end users can make changes to objects by applying Actions.
Learn more about action types.
Object type groups¶
Object type groups are a classification primitive that helps users better search and explore their ontology.
Learn more about object type groups.
Interfaces¶
An interface is an Ontology type that describes the shape of an object type and its capabilities. Interfaces provide object type polymorphism, allowing for consistent modeling of and interaction with object types that share a common shape.
Learn more about interfaces.
Difference between object types and objects¶
To clarify the difference between object types and objects, examples are provided below. Note that the same distinction applies to link types and links.
Object type definitions¶
Object type definitions, sometimes just referred to as "object types", refer to type-level information about ontology entities such as object types, link types, and action types. For example, the metadata for an object type may include display name, property names, property data types, and description. Metadata does not refer to the actual data or values of an object type’s properties or primary key; these are considered ontology data.
Object instances¶
Object instances, sometimes just referred to as "objects", are the actual primary key and property values for specific instances of an ontology entity. For example, an Airplane object type can have an object instance with a Plane ID property having the value my_plane_id1, and a Maximum Occupancy property having value 240.
Value types¶
Value types are semantic wrappers around a field type comprised of metadata and constraints that can enhance type safety, improve expressiveness, and provide additional context. Value types encapsulate domain-specific data types and enforce data validation in a manner reusable across the platform. Commonly used value types include email addresses, URLs, UUIDs, and enumerations.
While field types and base types are defined statically, value types are customized within the context of a given space. As a result, users cannot create new field types or base types but are able to create value types dynamically.
中文翻译¶
类型参考¶
在定义本体(Ontology)时,您可以使用多种类型来表示导入到 Foundry 中数据的真实世界定义。Foundry 中使用的类型分为本体类型和数据类型:
- 本体类型(Ontology types) 用于将真实世界领域建模为本体。
- 数据类型(Data types) 用于表示数据值。Foundry 中的数据类型借鉴了 RDF ↗、OWL ↗ 和 XSD ↗ 中的类似概念。
本体资源¶
以下类型可用于构建和定义您的本体。
对象类型(Object type)¶
对象类型是对真实世界实体或事件的模式定义,由单个对象组成。例如,JFK 和 LHR 都可以是 Airport 对象类型的对象。
属性(Property)¶
对象类型的属性是描述真实世界实体或事件的特征。例如,如果 LHR 是 Airports 对象类型的一个对象,那么 name 和 country 就是 Airports 的属性。对于 LHR 对象,属性值如下:
- name: LHR
- country: United Kingdom
共享属性(Shared property)¶
共享属性是一种可以在本体中多个对象类型上使用的属性。共享属性允许跨对象类型实现一致的数据建模,并集中管理属性元数据。
链接类型(Link type)¶
链接类型是两个对象类型之间关系的模式定义。链接指的是两个对象之间该关系的单个实例。
操作类型(Action type)¶
操作类型是对对象、属性值和链接的一组更改或编辑的模式定义,用户可以一次性完成这些更改。操作类型还包括操作发生时产生的副作用行为。一旦在本体中配置了操作类型,最终用户就可以通过应用操作来更改对象。
对象类型组(Object type groups)¶
对象类型组是一种分类原语,帮助用户更好地搜索和探索其本体。
接口(Interfaces)¶
接口是一种本体类型,描述对象类型的形状及其能力。接口提供对象类型多态性,允许对共享相同形状的对象类型进行一致的建模和交互。
了解更多关于接口的信息。
对象类型与对象的区别¶
为澄清对象类型与对象之间的区别,以下提供示例。请注意,同样的区别也适用于链接类型和链接。
对象类型定义¶
对象类型定义(有时简称为"对象类型")指的是关于本体实体的类型级信息,如对象类型、链接类型和操作类型。例如,对象类型的元数据可能包括显示名称、属性名称、属性数据类型和描述。元数据不涉及对象类型属性或主键的实际数据或值;这些被视为本体数据。
对象实例¶
对象实例(有时简称为"对象")是本体实体特定实例的实际主键和属性值。例如,一个 Airplane 对象类型可以有一个对象实例,其 Plane ID 属性值为 my_plane_id1,Maximum Occupancy 属性值为 240。
值类型(Value types)¶
值类型是围绕字段类型(field type)的语义包装器,由元数据和约束组成,可以增强类型安全性、提高表达能力并提供额外上下文。值类型封装了领域特定的数据类型,并以可跨平台复用的方式强制执行数据验证。常用的值类型包括电子邮件地址、URL、UUID 和枚举。
虽然字段类型和基础类型(base types)是静态定义的,但值类型是在特定空间的上下文中自定义的。因此,用户无法创建新的字段类型或基础类型,但可以动态创建值类型。