跳转至

Save changes to the Ontology(保存对本体论的更改)

Save your changes

Any changes you make in the Ontology Manager are stored locally in a work-in-progress state. For these Ontology changes to be available for others and reflected in user-facing applications, you must save your changes. To save changes:

  1. Select Save from the Application header at the top-right corner of the application.

Save button

  1. Open the Review edits dialog to review all your changes.
  2. Finally, select Save to update the Ontology.

Save button in review dialog

Handle errors and warnings

If the Save button is grayed out, you may have an error that is stopping you from saving. To resolve this, you can:

  • Scroll through your changes and view the error messages in line, or
  • Select the Errors tab at the top of the Review edits dialog to see the errors preventing you from saving.

The Review edits dialog will also show you warnings in-line and in the Warnings tab for changes you are encouraged to make. While errors need to be handled in order to save, warnings will not prevent you from saving.

Review errors

If you receive an error, you can use the open shortcut to navigate to a resource you need to edit before saving.

Navigate to a resource to edit

:::callout{theme="neutral"} Changes to Functions can only be made in the Functions repository, and not in the Ontology Manager. You can navigate to the Functions Repository from the Functions Entity view in the Ontology Manager. :::

Handle updates and merge conflicts

The Save button may also be grayed out if the Ontology has been saved by another user since you began making your changes. You will need to select Update from the top of the Review edits dialog to merge the other user’s changes with your own.

Update Ontology with other edits

It is possible that there are merge conflicts between changes another user has made and the changes in your working state. You will be prompted to resolve them. You can choose between keeping the changes in the latest version of the Ontology or overriding them with the changes in your working state.

Merge conflict in Ontology edits

Discard your changes

Each resource in the Ontology that you edit will have its own entry in the Review edits dialog. You can discard the changes you made to a resource by hovering over the entry in the Review edits dialog and selecting the trash icon.

Discard edits

You can discard all unsaved changes you made to the Ontology at any point by selecting the Discard button in the header at the top right of the application, or by selecting Discard at the bottom of the Review edits dialog.

Discard all edits

Respond to a warning message

As you review your changes in the Review edits dialog, you may get a warning message that prompts you to confirm the warning before saving.

Edits to object types and their properties can have an application-breaking impact on applications relying on those object types. Furthermore, if an object type has writeback enabled, extra caution should be taken when making edits to that object type to ensure that the history of edits made to objects of that type is not removed.

For a full description of which changes can be destructive, read more about potential breaking changes.

Once you have read through the impact of your changes detailed in the warning message and understand the implications of those changes, you can type in the name of the entity you edited to proceed with saving.

Warning message for edits

Troubleshooting when a save fails

If the backend services powering the Ontology encounter a problem when you save, you will receive an error message "toast" (pop-up), as in the image below. At the end of the text explaining why you can’t save, the name of the error message will be printed. The error message name will begin with the prefix OntologyMetadata: or Phonograph2:.

Error message

Throughout the Ontology documentation, there are references to the most common errors associated with different changes made to the Ontology. If you see an error message, search for it in the documentation to see if the error and its remediation are documented.


中文翻译

保存对本体论的更改

保存更改

在本体论管理器(Ontology Manager)中所做的任何更改都会以草稿状态存储在本地。要使这些本体论(Ontology)更改可供他人使用并反映在面向用户的应用程序中,您必须保存更改。保存更改的步骤如下:

  1. 从应用程序右上角的应用程序标题栏中选择保存

保存按钮

  1. 打开审查编辑对话框以查看所有更改。
  2. 最后,选择保存以更新本体论。

审查对话框中的保存按钮

处理错误和警告

如果保存按钮呈灰色,则可能存在阻止您保存的错误。要解决此问题,您可以:

  • 滚动浏览更改并查看内联错误消息,或
  • 选择审查编辑对话框顶部的错误选项卡,查看阻止您保存的错误。

审查编辑对话框还会在行内和警告选项卡中显示建议您进行的更改的警告。虽然需要处理错误才能保存,但警告不会阻止您保存。

审查错误

如果收到错误,您可以使用快捷方式导航到需要在保存前编辑的资源。

导航到要编辑的资源

:::callout{theme="neutral"} 对函数(Functions)的更改只能在函数存储库(Functions repository)中进行,而不能在本体论管理器中进行。您可以从本体论管理器中的函数实体视图(Functions Entity view)导航到函数存储库。 :::

处理更新和合并冲突

如果自您开始进行更改以来,其他用户已保存了本体论,则保存按钮也可能呈灰色。您需要从审查编辑对话框顶部选择更新,以将其他用户的更改与您自己的更改合并。

使用其他编辑更新本体论

其他用户所做的更改与您工作状态中的更改之间可能存在合并冲突。系统会提示您解决这些冲突。您可以选择保留本体论最新版本中的更改,或用您工作状态中的更改覆盖它们。

本体论编辑中的合并冲突

放弃更改

您编辑的本体论中的每个资源在审查编辑对话框中都有各自的条目。您可以通过将鼠标悬停在审查编辑对话框中的条目上并选择垃圾桶图标来放弃对该资源所做的更改。

放弃编辑

您可以随时通过选择应用程序右上角标题栏中的放弃按钮,或选择审查编辑对话框底部的放弃,来放弃对本体论所做的所有未保存更改。

放弃所有编辑

响应警告消息

审查编辑对话框中审查更改时,您可能会收到一条警告消息,提示您在保存前确认该警告。

对对象类型(Object Types)及其属性(Properties)的编辑可能会对依赖这些对象类型的应用程序产生破坏性影响。此外,如果对象类型启用了回写(Writeback),则在编辑该对象类型时应格外小心,以确保不会删除对该类型对象所做的编辑历史记录。

有关哪些更改可能具有破坏性的完整描述,请阅读更多关于潜在破坏性更改的内容。

一旦您阅读了警告消息中详细说明的更改影响并理解了这些更改的含义,您可以输入所编辑实体的名称以继续保存。

编辑的警告消息

保存失败时的故障排除

如果支持本体论的后端服务在您保存时遇到问题,您将收到一条错误消息"提示"(弹出窗口),如下图所示。在解释无法保存原因的文字末尾,将打印错误消息的名称。错误消息名称将以OntologyMetadata:Phonograph2:前缀开头。

错误消息

在整个本体论文档中,都引用了与对本体论所做的不同更改相关的最常见错误。如果您看到错误消息,请在文档中搜索,查看该错误及其解决方法是否已有记录。