<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
  <edmx:Reference Uri="http://docs.oasis-open.org/odata/odata/v4.0/csd02/vocabularies/Org.OData.Core.V1.xml">
    <edmx:Include Alias="Core" Namespace="Org.OData.Core.V1" />
  </edmx:Reference>
  <edmx:Reference
    Uri="http://docs.oasis-open.org/odata/odata-data-aggregation-ext/v4.0/csd01/vocabularies/Org.OData.Aggregation.V1.xml"
  >
    <edmx:Include Alias="Aggregation" Namespace="Org.OData.Aggregation.V1" />
  </edmx:Reference>

  <edmx:DataServices>
    <Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="com.sap.vocabularies.Analytics.v1" Alias="Analytics">
      <Annotation Term="Core.Description">
        <String>Terms for annotating analytical resources</String>
      </Annotation>
      <Annotation Term="Core.Description" Qualifier="Published">
        <String>2013-10-16 © Copyright 2013 SAP AG. All rights reserved</String>
      </Annotation>

      <Term Name="Dimension" Type="Analytics.DimensionType" AppliesTo="Property">
        <Annotation Term="Core.Description"
          String="A groupable property in an analytical context may contain attributes and be related to a hierarchy" />
      </Term>
      <ComplexType Name="DimensionType">
        <Property Type="Collection(Edm.PropertyPath)" Name="Attributes" />
        <Property Type="Edm.String" Name="RelatedHierarchy" Nullable="true" />
      </ComplexType>

      <Term Name="Measure" Type="Analytics.MeasureType" AppliesTo="Property">
        <Annotation Term="Core.Description" String="An aggregatable property in an analytical context" />
      </Term>
      <ComplexType Name="MeasureType">
        <Property Type="Edm.PropertyPath" Name="FormattedValue" Nullable="true" />
      </ComplexType>

      <Term Name="RolledUpPropertyCount" Type="Edm.Int16"> <!-- instance annotation -->
        <Annotation Term="Core.Description" String="Number of properties in the entity instance that have been aggregated away" />
      </Term>

      <!-- Ralf does not like this because it is redundant.
        <Term Name="RecursiveHierarchyNodeDimensionProperty" Type="Edm.PropertyPath" AppliesTo="Property">
        <Annotation Term="Core.Description" String="Dimension property for which the annotated property acts as a hierarchy
        node ID" />
        </Term>
      -->


      <Term Name="DrillURL" Type="Edm.String" AppliesTo="EntityType"> <!-- metadata annotation that can also appear as instance annotation -->
        <Annotation Term="Core.Description">
          <String>
            URL to retrieve more detailed data related to a node of a recursive hierarchy.
            Annotations with this term MUST include a qualifier to select the hierarchy for which the drill URL is provided.
          </String>
        </Annotation>
        <Annotation Term="Core.IsURL" />
      </Term>

      <Term Name="PlanningFunction" Type="Core.Tag" AppliesTo="FunctionImport">
        <!-- TODO: We could add infos about entity sets affected by the side effects of the function -->
        <Annotation Term="Core.Description" String="Processes or generates plan data. Its logic may have side-effects on entity sets" />
      </Term>

    </Schema>
  </edmx:DataServices>
</edmx:Edmx>