Uploaded image for project: 'OASIS Open Data Protocol (OData) TC'
  1. OASIS Open Data Protocol (OData) TC
  2. ODATA-1142

Clarify MaxDistance is an optional parameter in hierarchy filter functions

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: V4.0_CSD03
    • Fix Version/s: V4.0_CSD04
    • Labels:
      None
    • Environment:

      Proposed

    • Proposal:
      Hide

      Extend the current definitions to make the maximum distance parameters optional by assigning the maximum possible distance by default (additions are enclosed in *):

      <Function Name="isdescendant" IsBound="true">
      <Annotation Term="Core.Description" String="Returns true, if and only if the value of the node property of the specified hierarchy is a descendant of the given parent node with a distance of less than or equal to the optionally specified maximum distance"/>
      <Parameter Name="Entity" Type="Edm.EntityType" Nullable="false"/>
      <Parameter Name="Hierarchy" Type="Edm.String" Nullable="false"/>
      <Parameter Name="Node" Type="Edm.PrimitiveType" Nullable="false"/>
      <Parameter Name="MaxDistance" Type="Edm.Int16">

      • <Annotation Term="Core.OptionalParameter">
        <PropertyValue Property="DefaultValue" Int="32767"/>
        </Annotation>

      • </Parameter>
        <ReturnType Type="Edm.Boolean"/>
        </Function>
        <Function Name="isancestor" IsBound="true">
        <Annotation Term="Core.Description" String="Returns true, if and only if the value of the node property of the specified hierarchy is an ancestor of the given child node with a distance of less than or equal to the optionally specified maximum distance"/>
        <Parameter Name="Entity" Type="Edm.EntityType" Nullable="false"/>
        <Parameter Name="Hierarchy" Type="Edm.String" Nullable="false"/>
        <Parameter Name="Node" Type="Edm.PrimitiveType" Nullable="false"/>
        <Parameter Name="MaxDistance" Type="Edm.Int16">

      • <Annotation Term="Core.OptionalParameter">
        <PropertyValue Property="DefaultValue" Int="32767"/>
        </Annotation>

      • </Parameter>
        <ReturnType Type="Edm.Boolean"/>
        </Function>

      Note that term OptionalParameter has become available in the Core vocabulary with the work on OData version 4.01.

      add to this proposal:

      • Use Validation.Minimum on the distance parameter
      • Add meaning of distance to description
      Show
      Extend the current definitions to make the maximum distance parameters optional by assigning the maximum possible distance by default (additions are enclosed in *): <Function Name="isdescendant" IsBound="true"> <Annotation Term="Core.Description" String="Returns true, if and only if the value of the node property of the specified hierarchy is a descendant of the given parent node with a distance of less than or equal to the optionally specified maximum distance"/> <Parameter Name="Entity" Type="Edm.EntityType" Nullable="false"/> <Parameter Name="Hierarchy" Type="Edm.String" Nullable="false"/> <Parameter Name="Node" Type="Edm.PrimitiveType" Nullable="false"/> <Parameter Name="MaxDistance" Type="Edm.Int16"> <Annotation Term="Core.OptionalParameter"> <PropertyValue Property="DefaultValue" Int="32767"/> </Annotation> </Parameter> <ReturnType Type="Edm.Boolean"/> </Function> <Function Name="isancestor" IsBound="true"> <Annotation Term="Core.Description" String="Returns true, if and only if the value of the node property of the specified hierarchy is an ancestor of the given child node with a distance of less than or equal to the optionally specified maximum distance"/> <Parameter Name="Entity" Type="Edm.EntityType" Nullable="false"/> <Parameter Name="Hierarchy" Type="Edm.String" Nullable="false"/> <Parameter Name="Node" Type="Edm.PrimitiveType" Nullable="false"/> <Parameter Name="MaxDistance" Type="Edm.Int16"> <Annotation Term="Core.OptionalParameter"> <PropertyValue Property="DefaultValue" Int="32767"/> </Annotation> </Parameter> <ReturnType Type="Edm.Boolean"/> </Function> Note that term OptionalParameter has become available in the Core vocabulary with the work on OData version 4.01. add to this proposal: Use Validation.Minimum on the distance parameter Add meaning of distance to description

      Description

      Section 6.3.2.1 describes that functions isdescendant and isancestor both include a second parameter for the maximum distance that is ought to be optional.

      The definitions of these functions in the vocabulary describe the parameters as mandatory.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gerald.krause1 Gerald Krause
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: