OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] (ODATA-1136) Allow hierarchy filter functions for ancestors and descendants to return true for starting node


     [ https://issues.oasis-open.org/browse/ODATA-1136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gerald Krause updated ODATA-1136:
---------------------------------

    Proposal: 
To stay downward compatible with the current spec, the parameter default value must be false.

Extend the current definitions (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"/>
*
  <Parameter Name="IncludeParent" Type="Edm.Boolean">
    <Annotation Term="Core.OptionalParameter">
      <PropertyValue Property="DefaultValue" String="false"/>
    </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"/>
  <ReturnType Type="Edm.Boolean"/>
*
  <Parameter Name="IncludeChild" Type="Edm.Boolean">
    <Annotation Term="Core.OptionalParameter">
      <PropertyValue Property="DefaultValue" String="false"/>
    </Annotation>
  </Parameter>
*
</Function>

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

  was:
To stay downward compatible with the current spec, the parameter default value must be false.

Extend the current definitions (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"/>
*
  <Parameter Name="IncludeParent" Type="Edm.Boolean">
    <Annotation Term="Core.OptionalParameter">
      <PropertyValue Property="DefaultValue" String="false"/>
    </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"/>
  <ReturnType Type="Edm.Boolean"/>
*
  <Parameter Name="IncludeChild" Type="Edm.Boolean">
    <Annotation Term="Core.OptionalParameter">
      <PropertyValue Property="DefaultValue" String="false"/>
    </Annotation>
  </Parameter>
*
</Function>



> Allow hierarchy filter functions for ancestors and descendants to return true for starting node
> -----------------------------------------------------------------------------------------------
>
>                 Key: ODATA-1136
>                 URL: https://issues.oasis-open.org/browse/ODATA-1136
>             Project: OASIS Open Data Protocol (OData) TC
>          Issue Type: New Feature
>          Components: Extension for Data Aggregation
>    Affects Versions: V4.0_CSD03
>         Environment: Proposed
>            Reporter: Gerald Krause
>            Priority: Minor
>             Fix For: V4.0_CSD04
>
>
> The current definitions of the two hierarchy filter functions isancestor and isdescendant specify that the functions return true only if the current entity is a strict ancestor/descendant of the given start node.
> Practical applications sometimes require the start node to be included in the result. For this purpose, both functions could be extended by an optional Boolean parameter that allows the OData client to specify, if the start node shall be included in the result. With this, the filter expression $it/Aggregation.isdescendant(Hierarchy='SalesOrgHierarchy',Node='EMEA',IncludeParent=”true”) could avoid the clumsier $it/Aggregation.isdescendant(Hierarchy='SalesOrgHierarchy',Node='EMEA') or ID eq 'EMEA'



--
This message was sent by Atlassian JIRA
(v6.2.2#6258)


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]