Extend an interface(扩展接口(Extend an interface))¶
Extending an interface allows you to compose interfaces together, creating a new, more specific interface. This is particularly useful for constructing abstract object interfaces that implement multiple capability interfaces. An interface inherits the shared properties, link type constraints, and action type constraints of the interface it extends. An interface can extend any number of other interfaces.
To extend an interface, follow the steps below.
-
From Ontology Manager, select the interface you wish to extend to open the interface overview page.
-
From the overview page, select Extension from the left side panel.
-
From the interface extensions page, select Add extension.

- From the dropdown menu, select the interface to extend from your current interface.

-
In the confirmation dialog, review the shared properties, link type constraints, and action type constraints that will be added to the interface extension and select Confirm.
-
Select Save in the upper right corner to add the interface extension to the Ontology.
You can also remove an extension to decouple one interface from another. This action will remove all inherited shared properties from the interface, remove all inherited link type constraints, remove all inherited action type constraints, and disassociate the extending interface from the base interface.

中文翻译¶
扩展接口(Extend an interface)¶
扩展接口允许你将多个接口组合在一起,创建出更具体的新接口。这对于构建实现多个能力接口(capability interfaces)的抽象对象接口(abstract object interfaces)尤为有用。接口会继承其所扩展接口的共享属性(shared properties)、链接类型约束(link type constraints)和操作类型约束(action type constraints)。一个接口可以扩展任意数量的其他接口。
要扩展接口,请按以下步骤操作:
-
在 Ontology Manager 中,选择你想要扩展的接口,打开接口概览页面。
-
在概览页面中,从左侧面板选择扩展(Extension)。
-
在接口扩展页面中,选择添加扩展(Add extension)。

- 从下拉菜单中,选择要从当前接口扩展的目标接口。

-
在确认对话框中,查看将添加到接口扩展中的共享属性、链接类型约束和操作类型约束,然后选择确认(Confirm)。
-
点击右上角的保存(Save),将接口扩展添加到 Ontology 中。
你也可以移除扩展,以解除一个接口与另一个接口的耦合。此操作将移除接口中所有继承的共享属性、所有继承的链接类型约束、所有继承的操作类型约束,并断开扩展接口与基础接口之间的关联。
