Clarify MaxDistance is an optional parameter in hierarchy filter functions

    • 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
    • Show
      https://github.com/oasis-tcs/odata-vocabularies/pull/78

      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.

            Assignee:
            Unassigned
            Reporter:
            gerald.krause1
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: