使用指示规则

可译的
All users can create indication rules.

指示规则用于过滤结果集。指示规则不改变数据。They are solely used to read records that are part of a set and filter records out based on conditions.过滤进程的结果是创建的新结果集,它是原始/过滤结果集的子集。See Filtering Sets on the Managing Search Queries and Sets page for more information.

指示规则用于MARC书目记录,XML指示规则用于Dublin Core记录。

以下部分介绍如何创建和测试指示规则,并提供可纳入工作流程的示例:

  • Creating Indication Rules
  • Testing Indication Rules
  • MARC Indication Rules Syntax Examples
  • XML Indication Rules Syntax Examples
  • Form-Based Indication Rules
指示规则只和资源管理内容类型有关。
无法使用指示规则来识别管道(I)的存在。

此外,您可以对使用结果集的其他功能区域设定指示规则:

相同的指示规则不能用于Alma中的所有区域和工作流。

Creating Indication Rules

您可以通过元数据编辑器来创建和维护指示规则。

For Network Zone consortia members, users can control whether to save new rules locally or in a network institution.To make this selection, open the Records or Templates area, and go to New > Placement Options.请注意,该选项根据用户生效。

Backslashes (\) are used as escape characters for Indication Rules and Form-Based Indication Rules, according to the same principles as the Normalization Rules.

创建指示规则:
  1. 打开元数据编辑器。
  2. Select New > Indication.The Indication Rules Properties dialog opens.
    新指示规则。
    模板属性对话框
  3. 指示规则的名称并提供帮助其他用户了解规则用途的描述。
  4. In "Type" , select whether to create the rule as Drool (for MARC bibliographic records) or as XSL (for Dublin Core records).
  5. 指示创建规则为专用或共享。This determines in which folder the indication rule is saved.您可能想要将指示规则保存在专用文件夹并在移动到共享文件夹(通过更改属性)之前进行测试。Private indication rules cannot be used in the "Filter Set" functionality invoked from the Manage Sets page.请注意,共享区文件夹含有供您复制并创建自己的规则的指示规则。
  6. Select Save in the dialog.元数据编辑器编辑面板打开。
  7. 按照以下内容创建规则:
    • If you selected to create an indication rule for MARC records, enter the Drools logic for your indication rule.Refer to the section Normalization Rules – Syntax and Examples for the syntax to use when creating indication rules.下列指示规则在Alma中提供:
      MultiTitleIndication.dslrBriefIndication.dslr
      提供的指示规则(多个题名)
      对该规则,控制字段不存在条件。
      提供的指示规则(简要主题)
      See the Indication Rules Syntax Examples section for more examples.
      尽管在规则中允许使用多个布尔运算符,但当选择大量布尔运算符时会降低运行速度。因此每条规则应包含不超过200个布尔运算符。
    • If you selected to create an XML indication rule for Dublin Core records, enter the indication rule in XML format.
  8. Select Save.

Testing Indication Rules

在运行作业以使用指示规则过滤结果集之前,您可能想要在元数据编辑器中测试规则。

指示和规范化规则均在测试模式下工作。

要测试已创建的指示规则:
  1. 在元数据编辑器中打开一个书目记录。
  2. Select split mode icon.png Split Editor.
  3. Select the Rules tab in the left pane and expand the Indication rules folder.
  4. Locate the rule that you want to test in the Private or Shared(not the Community) folder.点击规则查看操作列表:
    • 编辑
    • 删除
    • 提交到共享区
    • 复制
    • 属性
  5. Select Edit.指示规则将在书目记录旁边的分屏中打开。
    指示规则在分屏中打开
  6. Select Try it.Depending on the results, a pop-up appears with either True or False response indicating that the bibliographic record either met or did not meet the Drool logic in the indication rule.
    Indication_Rule_Try_It_Response_2_NL.png
    指示规则 - 尝试响应

Indication Rules for MARC Records - Syntax Examples

Examples of indication rules syntax are provided below and at Alma Indication Rule Examples.See Conditions for more information.

In rules that search for a certain term, use an asterisk to find the exact term.如果子字段含有任何其他内容,则不会找到,除非有星号。请注意,您只需在结尾插入星号,无需放在开头。

rule "130|a|Bible." when exists "130.a.Bible*" then set indication."true" end

The line exists "130.a.Bible" works as an "Equals" search, thus if the subfield contains anything in addition to the term, it will not find it, unless there is an asterisk..

示例1

识别结果集中在949字段包含$a的记录。

rule "Contains 949 with subfield a" when exists "949.a.*" then set indication."true" end

示例2

识别结果集中在$0(子字段零)中包含1XX或6XX或7XX的记录。

rule "Contains a 1XX or 6XX or 7XX subfield 0" when ((exists "1**.0.*") OR (exists "6**.0.*") OR (exists "7**.0.*")) then set indication."true" end

示例3

识别结果集中含有$0(子字段零)的以65例如650或659开头的字段的记录。

rule "Contains a 65X subfield 0" when exists "65*.0.*" then set indication."true" end
当创建指示规则使用通配符时,对字段标签中的每个数位使用一个星号。

示例4

识别结果集中含有$0(子字段零)的以6例如600、630、650或659开头的字段的记录。

rule "Contains a 6XX subfield 0" when exists "6**.0.*" then set indication."true" end

示例5

检索含有多个300个字段且每个字段都有子字段a的所有记录。

rule "Retrieve all records which contain two subfield a occurrences in 300" when existsMoreThanOnce "300.a" then set indication."true" end

Example 6

创建在字段630和650中有重复子字段x和z的记录的结果集。

rule "Find duplicates 630 and 650" when recordHasDuplicateSubfields "630,650" "xz" ".," then set indication."true" end

See the Alma Indication Rule Examples page in the Developer Network for more examples of indication rules.

都柏林核心记录的XML指示规则 - 语法示例

以下为XML指示规则语法的示例。

示例1

以下为如果记录有dc:subject字段则返回true的XML指示规则:

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"> <xsl:output method="text" encoding="UTF-8"/> <xsl:template match="/"> <xsl:variable name="indication" select = "boolean(//dc:subject)" /> <xsl:value-of select="$indication" /> </xsl:template> </xsl:stylesheet>

示例2

The following is an example of an XSL indication rule that returns False if the record has a dc:subject field that equals Theology:

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"> <xsl:output method="text" encoding="UTF-8"/> <xsl:template match="/"> <xsl:variable name="indication" select = "not(boolean(//dc:subject='Theology'))" /> <xsl:value-of select="$indication" /> </xsl:template> </xsl:stylesheet>

示例3

The following is an example of an XSL indication rule that returns true if the record has a dc:creator field or a dcterms:creator field containing Tolstoy:

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"> <xsl:output method="text" encoding="UTF-8"/> <xsl:template match="/"> <xsl:variable name="indication" select = "boolean(//dc:creator[contains(.,'Tolstoy')] or //dcterms:creator[contains(.,'Tolstoy')])" /> <xsl:value-of select="$indication" /> </xsl:template> </xsl:stylesheet>

基于表单的指示规则

All users can create indication rules.

Ex Libris provides the ability to create indication rules in the MARC format using a structured form, thus making the process easy and intuitive (this new functionality is in addition to the existing abilities to create Drool rules in the MARC format and create XML rules in the DC format manually, both of which remain unchanged).For complete information about indication rules, see Working with Indication Rules.

The structured form allows to enter the different fields and subfields and values in a wizard-like fashion, and provides pop-up assistance when entering tags and tag names.一旦创建了规则,结构性表单使您可以在部署之前测试规则是否有效。

该功能默认禁用。To enable it for your institution, contact Customer Support.

限制

  • Currently you can create only MARC21 and UNIMARC form-based indication rules.
  • The form-based rules can only be used for filtering sets at this time, and the ability to use them in other workflows that use indication rules is on our roadmap and will be added in the future.

新建基于表单的指示规则

指示规则的“表单”类型已介绍。This type has the same rule actions as the other indication rules (New,Edit,Delete,Duplicate,Contribute to CZ, etc.).创建新的基于表单的规则时,规则在元数据编辑器中接收到“表单”标记。

form_badge_on_MDE.png

Creating a Form-Based Indication Rule

要创建基于表单的指示规则:
  1. Open the Metadata Editor >Rules area.
  2. Select  New > Indication.The Indication Rules Properties dialog opens.馆藏记录的表单式指示规则
  3. 在“名称”下,对规则命名,在“描述”(可选)下提供帮助其他用户了解规则用途的描述。
  4. Under "Type", select whether to create the rule as Drool (for MARC bibliographic records), as XML (for Dublin Core records), or as Form.
  5. 在“访问层级”下,指示创建规则为专用或共享。This determines in which folder the indication rule is saved.您也可能想要将指示规则保存在专用文件夹并在移动到共享文件夹(通过更改属性)之前进行测试。Private indication rules cannot be used in the "Filter Set" functionality invoked from the Manage Sets page.请注意,共享区文件夹含有供您复制并创建自己的规则的指示规则。
  6. 在“记录类型”下,选择规则是否用于创建书目、规范或馆藏记录结果集。
  7. 在“格式”下,选择结果集类型。可用选项取决于您的系统中启用的格式。
  8. Select Save in the dialog.元数据编辑器编辑面板打开。
  9. In the right-hand panel of the Metadata Editor, configure your rule as per the Configuring the Indication Rules section below.
  10. Select Save.

Configuring the Indication Rules

一旦创建了基于表单的指示规则,打开面板,可以在其中配置条件。An indication rule can be composed of one or more conditions.MDE indication rule fields breakdown.png

手动或通过系统协助创建指示规则

您可以通过以下方式创建指示规则:

  • 手动输入执行查询的字段信息。
  • Using pop-up assistance to help you select the desired field.The pop-up assistance derives its information from the metadata profile defined in your system (see Configuring Cataloging)
要手动输入信息: 要使用弹窗帮助:
  1. In the first field of the condition, type in the desired field tag.Alma automatically fills in placeholders for the required number of indicators, positions, and sub-fields, in the form of asterisks (*).不同字段的格式有所不同。
  2. Manually replace the asterisks with the desired indicators, positions and sub-fields.For example:filling in form based fields manually.png
  1. In the first field of the condition, click the arrow to the right of the field.
  2. 在打开的下拉列表中,输入标签或名称的部分或完整描述。
  3. 打开弹窗,其中建议与您输入的信息匹配的字段(匹配根据规则的格式和类型使用相关的配置文件完成)。Select the desired field.working_with_popup_assistanc.png
  4. Select Done.

定义基于表单的指示规则的字段

For the different types of fields, different rule syntax is displayed.

要定义指示规则的字段:
  1. 在条件中,如下定义字段:
    字段类型输入该类型的字段
    Control fields 001 / 003 / 005 / 009
    To input a control field 001 / 003 / 005 / 009:
    1. 输入(或选择使用弹窗帮助)字段标签。
    2. 选择所需的比较器。
    3. 输入自由文本。

      inputting_simple_fields.png

    All other control fields
    要输入其他控制字段:
    1. 输入(或选择使用弹窗帮助)字段标签。
    2. If you are inputting the LDR, 006, 007, or 008 field, from the "Positions" dropdown, select the relevant position and select Done.MDE indication rule 008 field wizard.png

      The indication rules for the 007 field require two conditions, one for the "Category of material" and another for the "Specific material designation."

      指示规则示例。

    3. 选择所需的比较器。
    4. 输入自由文本。
    数据字段 — 包括不在元数据配置文件中的字段(例如本地定义的字段)
    要输入数据字段:
    1. 输入(或选择使用弹窗帮助)字段标签。
    2. Select the desired indicators and subfields and select Done.
    3. 选择所需的比较器。
    4. 输入自由文本。

      inputting data fields.png

    • If you do not specify any value for an indicator/subfield in the condition, this is displayed as * and is interpreted by Alma as any value.
    • To indicate an empty (undefined) value for indicators (in the fields that allow it), type in the # value.
    • When you enter text in the Value field, Alma does not attempt to validate the text.This enables you to choose a non-valid value for data correction purposes.
  2. To add more conditions, or groups of conditions,Working with Indication Rules see below.
  3. Select Save on the toolbar to save the indication rule.

Testing a Form-Based Indication Rule

Prior to running a job to filter a set using an indication rule, it may be a good idea to validate that your rule may works as desired; and if it does not, to edit it some more.您可以测试整个规则或者规则中的一组条件。

要测试指示规则:
  • Once you have created and saved your rule, clicktest profile icon.pngabove the rule.Depending on the results, a pop-up appears with either a True or False response, indicating that the bibliographic record either met or did not meet the logic specified in the indication rule.

    New indication rule testing.png

    处理基于表单的指示规则

    选项 描述
    要添加额外的条件到规则
    • Selectplus sign.pngabove the condition to add another condition.
    • Selectcopy icon.pngto the right of the condition and duplicate this condition ; then edit the new condition as necessary.
    要添加一组条件到规则创建指示规则时,您可以添加单个条件或创建条件组。Select plus group sign.png above the condition lines and add as many conditions as necessary.

    However, not that you can only add up to 3 nested levels of conditions in the form-based rules.

    opening a group of fields in indication rule.png

    要更改条件组之间的关系

    Baseline conditions default to an AND relationship, meaning that each condition must be true to retrieve the bibliographic record.添加一组条件时,您可以更改组中的关系为OR。In this case, the bibliographic record will be retrieved when either of these conditions is true.

    请注意,只有包含在规则中的字段用于检索记录。Fields that you did not include in the rule do not affect the retrieval, meaning that records with any values in these fields will be retrieved.

    Click on any Boolean operator between the conditions.AND和OR的旗标会显示在列表顶部。Click a flag to select this type of relationship.To stop displaying these flags, click again on the Boolean operator.changing the type of relationship between groups.png

    While it is permissible to include multiple Boolean Operators in an indication rule, when many of Boolean operators are selected, slower performance is likely to result.因此每条规则应包含不超过200个布尔运算符。

    要移除条件选择条件左侧的X从规则中移除。