You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by il...@apache.org on 2014/03/07 10:09:31 UTC
[42/57] [abbrv] [OLINGO-186] client-side implementation of commons
Edm interfaces completed: some refactoring on server-side performed to
extract common abstract implementation
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bae3d847/odata4-lib/odata4-client-core/src/test/resources/org/apache/olingo/odata4/client/core/v4/northwind-metadata.xml
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-client-core/src/test/resources/org/apache/olingo/odata4/client/core/v4/northwind-metadata.xml b/odata4-lib/odata4-client-core/src/test/resources/org/apache/olingo/odata4/client/core/v4/northwind-metadata.xml
index 4c3c37d..f65815d 100644
--- a/odata4-lib/odata4-client-core/src/test/resources/org/apache/olingo/odata4/client/core/v4/northwind-metadata.xml
+++ b/odata4-lib/odata4-client-core/src/test/resources/org/apache/olingo/odata4/client/core/v4/northwind-metadata.xml
@@ -19,4 +19,453 @@
under the License.
-->
-<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx"><edmx:DataServices><Schema Namespace="NorthwindModel" xmlns="http://docs.oasis-open.org/odata/ns/edm"><EntityType Name="Category"><Key><PropertyRef Name="CategoryID" /></Key><Property Name="CategoryID" Type="Edm.Int32" Nullable="false" p5:StoreGeneratedPattern="Identity" xmlns:p5="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" /><Property Name="Description" Type="Edm.String" MaxLength="max" /><Property Name="Picture" Type="Edm.Binary" MaxLength="max" /><NavigationProperty Name="Products" Type="Collection(NorthwindModel.Product)" Partner="Category" /></EntityType><EntityType Name="CustomerDemographic"><Key><PropertyRef Name="CustomerTypeID" /></Key><Property Name="CustomerTypeID" Type="Edm.String" Nullable="false" MaxLength="10" /><Property Name="CustomerDesc" Type="Edm.String" MaxLength="max" /><NavigationProperty
Name="Customers" Type="Collection(NorthwindModel.Customer)" Partner="CustomerDemographics" /></EntityType><EntityType Name="Customer"><Key><PropertyRef Name="CustomerID" /></Key><Property Name="CustomerID" Type="Edm.String" Nullable="false" MaxLength="5" /><Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" /><Property Name="ContactName" Type="Edm.String" MaxLength="30" /><Property Name="ContactTitle" Type="Edm.String" MaxLength="30" /><Property Name="Address" Type="Edm.String" MaxLength="60" /><Property Name="City" Type="Edm.String" MaxLength="15" /><Property Name="Region" Type="Edm.String" MaxLength="15" /><Property Name="PostalCode" Type="Edm.String" MaxLength="10" /><Property Name="Country" Type="Edm.String" MaxLength="15" /><Property Name="Phone" Type="Edm.String" MaxLength="24" /><Property Name="Fax" Type="Edm.String" MaxLength="24" /><NavigationProperty Name="Orders" Type="Collection(NorthwindModel.Order)" Partner="Customer" /><NavigationProperty Na
me="CustomerDemographics" Type="Collection(NorthwindModel.CustomerDemographic)" Partner="Customers" /></EntityType><EntityType Name="Employee"><Key><PropertyRef Name="EmployeeID" /></Key><Property Name="EmployeeID" Type="Edm.Int32" Nullable="false" p5:StoreGeneratedPattern="Identity" xmlns:p5="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="LastName" Type="Edm.String" Nullable="false" MaxLength="20" /><Property Name="FirstName" Type="Edm.String" Nullable="false" MaxLength="10" /><Property Name="Title" Type="Edm.String" MaxLength="30" /><Property Name="TitleOfCourtesy" Type="Edm.String" MaxLength="25" /><Property Name="BirthDate" Type="Edm.DateTimeOffset" /><Property Name="HireDate" Type="Edm.DateTimeOffset" /><Property Name="Address" Type="Edm.String" MaxLength="60" /><Property Name="City" Type="Edm.String" MaxLength="15" /><Property Name="Region" Type="Edm.String" MaxLength="15" /><Property Name="PostalCode" Type="Edm.String" MaxLength="10" /><Property Na
me="Country" Type="Edm.String" MaxLength="15" /><Property Name="HomePhone" Type="Edm.String" MaxLength="24" /><Property Name="Extension" Type="Edm.String" MaxLength="4" /><Property Name="Photo" Type="Edm.Binary" MaxLength="max" /><Property Name="Notes" Type="Edm.String" MaxLength="max" /><Property Name="ReportsTo" Type="Edm.Int32" /><Property Name="PhotoPath" Type="Edm.String" MaxLength="255" /><NavigationProperty Name="Employees1" Type="Collection(NorthwindModel.Employee)" Partner="Employee1" /><NavigationProperty Name="Employee1" Type="NorthwindModel.Employee" Partner="Employees1"><ReferentialConstraint Property="ReportsTo" ReferencedProperty="EmployeeID" /></NavigationProperty><NavigationProperty Name="Orders" Type="Collection(NorthwindModel.Order)" Partner="Employee" /><NavigationProperty Name="Territories" Type="Collection(NorthwindModel.Territory)" Partner="Employees" /></EntityType><EntityType Name="Order_Detail"><Key><PropertyRef Name="OrderID" /><PropertyRef Name="ProductID
" /></Key><Property Name="OrderID" Type="Edm.Int32" Nullable="false" /><Property Name="ProductID" Type="Edm.Int32" Nullable="false" /><Property Name="UnitPrice" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="Quantity" Type="Edm.Int16" Nullable="false" /><Property Name="Discount" Type="Edm.Single" Nullable="false" /><NavigationProperty Name="Order" Type="NorthwindModel.Order" Nullable="false" Partner="Order_Details"><ReferentialConstraint Property="OrderID" ReferencedProperty="OrderID" /></NavigationProperty><NavigationProperty Name="Product" Type="NorthwindModel.Product" Nullable="false" Partner="Order_Details"><ReferentialConstraint Property="ProductID" ReferencedProperty="ProductID" /></NavigationProperty></EntityType><EntityType Name="Order"><Key><PropertyRef Name="OrderID" /></Key><Property Name="OrderID" Type="Edm.Int32" Nullable="false" p5:StoreGeneratedPattern="Identity" xmlns:p5="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Prop
erty Name="CustomerID" Type="Edm.String" MaxLength="5" /><Property Name="EmployeeID" Type="Edm.Int32" /><Property Name="OrderDate" Type="Edm.DateTimeOffset" /><Property Name="RequiredDate" Type="Edm.DateTimeOffset" /><Property Name="ShippedDate" Type="Edm.DateTimeOffset" /><Property Name="ShipVia" Type="Edm.Int32" /><Property Name="Freight" Type="Edm.Decimal" Precision="19" Scale="4" /><Property Name="ShipName" Type="Edm.String" MaxLength="40" /><Property Name="ShipAddress" Type="Edm.String" MaxLength="60" /><Property Name="ShipCity" Type="Edm.String" MaxLength="15" /><Property Name="ShipRegion" Type="Edm.String" MaxLength="15" /><Property Name="ShipPostalCode" Type="Edm.String" MaxLength="10" /><Property Name="ShipCountry" Type="Edm.String" MaxLength="15" /><NavigationProperty Name="Customer" Type="NorthwindModel.Customer" Partner="Orders"><ReferentialConstraint Property="CustomerID" ReferencedProperty="CustomerID" /></NavigationProperty><NavigationProperty Name="Employee" Type="No
rthwindModel.Employee" Partner="Orders"><ReferentialConstraint Property="EmployeeID" ReferencedProperty="EmployeeID" /></NavigationProperty><NavigationProperty Name="Order_Details" Type="Collection(NorthwindModel.Order_Detail)" Partner="Order" /><NavigationProperty Name="Shipper" Type="NorthwindModel.Shipper" Partner="Orders"><ReferentialConstraint Property="ShipVia" ReferencedProperty="ShipperID" /></NavigationProperty></EntityType><EntityType Name="Product"><Key><PropertyRef Name="ProductID" /></Key><Property Name="ProductID" Type="Edm.Int32" Nullable="false" p5:StoreGeneratedPattern="Identity" xmlns:p5="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" /><Property Name="SupplierID" Type="Edm.Int32" /><Property Name="CategoryID" Type="Edm.Int32" /><Property Name="QuantityPerUnit" Type="Edm.String" MaxLength="20" /><Property Name="UnitPrice" Type="Edm.Decimal" Precision="19" Scale="4" /><Propert
y Name="UnitsInStock" Type="Edm.Int16" /><Property Name="UnitsOnOrder" Type="Edm.Int16" /><Property Name="ReorderLevel" Type="Edm.Int16" /><Property Name="Discontinued" Type="Edm.Boolean" Nullable="false" /><NavigationProperty Name="Category" Type="NorthwindModel.Category" Partner="Products"><ReferentialConstraint Property="CategoryID" ReferencedProperty="CategoryID" /></NavigationProperty><NavigationProperty Name="Order_Details" Type="Collection(NorthwindModel.Order_Detail)" Partner="Product" /><NavigationProperty Name="Supplier" Type="NorthwindModel.Supplier" Partner="Products"><ReferentialConstraint Property="SupplierID" ReferencedProperty="SupplierID" /></NavigationProperty></EntityType><EntityType Name="Region"><Key><PropertyRef Name="RegionID" /></Key><Property Name="RegionID" Type="Edm.Int32" Nullable="false" /><Property Name="RegionDescription" Type="Edm.String" Nullable="false" MaxLength="50" /><NavigationProperty Name="Territories" Type="Collection(NorthwindModel.Territory
)" Partner="Region" /></EntityType><EntityType Name="Shipper"><Key><PropertyRef Name="ShipperID" /></Key><Property Name="ShipperID" Type="Edm.Int32" Nullable="false" p5:StoreGeneratedPattern="Identity" xmlns:p5="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" /><Property Name="Phone" Type="Edm.String" MaxLength="24" /><NavigationProperty Name="Orders" Type="Collection(NorthwindModel.Order)" Partner="Shipper" /></EntityType><EntityType Name="Supplier"><Key><PropertyRef Name="SupplierID" /></Key><Property Name="SupplierID" Type="Edm.Int32" Nullable="false" p5:StoreGeneratedPattern="Identity" xmlns:p5="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" /><Property Name="ContactName" Type="Edm.String" MaxLength="30" /><Property Name="ContactTitle" Type="Edm.String" MaxLength="30" /><Property Name="Address" Type="
Edm.String" MaxLength="60" /><Property Name="City" Type="Edm.String" MaxLength="15" /><Property Name="Region" Type="Edm.String" MaxLength="15" /><Property Name="PostalCode" Type="Edm.String" MaxLength="10" /><Property Name="Country" Type="Edm.String" MaxLength="15" /><Property Name="Phone" Type="Edm.String" MaxLength="24" /><Property Name="Fax" Type="Edm.String" MaxLength="24" /><Property Name="HomePage" Type="Edm.String" MaxLength="max" /><NavigationProperty Name="Products" Type="Collection(NorthwindModel.Product)" Partner="Supplier" /></EntityType><EntityType Name="Territory"><Key><PropertyRef Name="TerritoryID" /></Key><Property Name="TerritoryID" Type="Edm.String" Nullable="false" MaxLength="20" /><Property Name="TerritoryDescription" Type="Edm.String" Nullable="false" MaxLength="50" /><Property Name="RegionID" Type="Edm.Int32" Nullable="false" /><NavigationProperty Name="Region" Type="NorthwindModel.Region" Nullable="false" Partner="Territories"><ReferentialConstraint Property=
"RegionID" ReferencedProperty="RegionID" /></NavigationProperty><NavigationProperty Name="Employees" Type="Collection(NorthwindModel.Employee)" Partner="Territories" /></EntityType><EntityType Name="Alphabetical_list_of_product"><Key><PropertyRef Name="CategoryName" /><PropertyRef Name="Discontinued" /><PropertyRef Name="ProductID" /><PropertyRef Name="ProductName" /></Key><Property Name="ProductID" Type="Edm.Int32" Nullable="false" /><Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" /><Property Name="SupplierID" Type="Edm.Int32" /><Property Name="CategoryID" Type="Edm.Int32" /><Property Name="QuantityPerUnit" Type="Edm.String" MaxLength="20" /><Property Name="UnitPrice" Type="Edm.Decimal" Precision="19" Scale="4" /><Property Name="UnitsInStock" Type="Edm.Int16" /><Property Name="UnitsOnOrder" Type="Edm.Int16" /><Property Name="ReorderLevel" Type="Edm.Int16" /><Property Name="Discontinued" Type="Edm.Boolean" Nullable="false" /><Property Name="CategoryNam
e" Type="Edm.String" Nullable="false" MaxLength="15" /></EntityType><EntityType Name="Category_Sales_for_1997"><Key><PropertyRef Name="CategoryName" /></Key><Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" /><Property Name="CategorySales" Type="Edm.Decimal" Precision="19" Scale="4" /></EntityType><EntityType Name="Current_Product_List"><Key><PropertyRef Name="ProductID" /><PropertyRef Name="ProductName" /></Key><Property Name="ProductID" Type="Edm.Int32" Nullable="false" p5:StoreGeneratedPattern="Identity" xmlns:p5="http://schemas.microsoft.com/ado/2009/02/edm/annotation" /><Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" /></EntityType><EntityType Name="Customer_and_Suppliers_by_City"><Key><PropertyRef Name="CompanyName" /><PropertyRef Name="Relationship" /></Key><Property Name="City" Type="Edm.String" MaxLength="15" /><Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" /><Property Name="Contact
Name" Type="Edm.String" MaxLength="30" /><Property Name="Relationship" Type="Edm.String" Nullable="false" MaxLength="9" Unicode="false" /></EntityType><EntityType Name="Invoice"><Key><PropertyRef Name="CustomerName" /><PropertyRef Name="Discount" /><PropertyRef Name="OrderID" /><PropertyRef Name="ProductID" /><PropertyRef Name="ProductName" /><PropertyRef Name="Quantity" /><PropertyRef Name="Salesperson" /><PropertyRef Name="ShipperName" /><PropertyRef Name="UnitPrice" /></Key><Property Name="ShipName" Type="Edm.String" MaxLength="40" /><Property Name="ShipAddress" Type="Edm.String" MaxLength="60" /><Property Name="ShipCity" Type="Edm.String" MaxLength="15" /><Property Name="ShipRegion" Type="Edm.String" MaxLength="15" /><Property Name="ShipPostalCode" Type="Edm.String" MaxLength="10" /><Property Name="ShipCountry" Type="Edm.String" MaxLength="15" /><Property Name="CustomerID" Type="Edm.String" MaxLength="5" /><Property Name="CustomerName" Type="Edm.String" Nullable="false" MaxLengt
h="40" /><Property Name="Address" Type="Edm.String" MaxLength="60" /><Property Name="City" Type="Edm.String" MaxLength="15" /><Property Name="Region" Type="Edm.String" MaxLength="15" /><Property Name="PostalCode" Type="Edm.String" MaxLength="10" /><Property Name="Country" Type="Edm.String" MaxLength="15" /><Property Name="Salesperson" Type="Edm.String" Nullable="false" MaxLength="31" /><Property Name="OrderID" Type="Edm.Int32" Nullable="false" /><Property Name="OrderDate" Type="Edm.DateTimeOffset" /><Property Name="RequiredDate" Type="Edm.DateTimeOffset" /><Property Name="ShippedDate" Type="Edm.DateTimeOffset" /><Property Name="ShipperName" Type="Edm.String" Nullable="false" MaxLength="40" /><Property Name="ProductID" Type="Edm.Int32" Nullable="false" /><Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" /><Property Name="UnitPrice" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="Quantity" Type="Edm.Int16" Nullable="false" />
<Property Name="Discount" Type="Edm.Single" Nullable="false" /><Property Name="ExtendedPrice" Type="Edm.Decimal" Precision="19" Scale="4" /><Property Name="Freight" Type="Edm.Decimal" Precision="19" Scale="4" /></EntityType><EntityType Name="Order_Details_Extended"><Key><PropertyRef Name="Discount" /><PropertyRef Name="OrderID" /><PropertyRef Name="ProductID" /><PropertyRef Name="ProductName" /><PropertyRef Name="Quantity" /><PropertyRef Name="UnitPrice" /></Key><Property Name="OrderID" Type="Edm.Int32" Nullable="false" /><Property Name="ProductID" Type="Edm.Int32" Nullable="false" /><Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" /><Property Name="UnitPrice" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" /><Property Name="Quantity" Type="Edm.Int16" Nullable="false" /><Property Name="Discount" Type="Edm.Single" Nullable="false" /><Property Name="ExtendedPrice" Type="Edm.Decimal" Precision="19" Scale="4" /></EntityType><EntityType Name="Or
der_Subtotal"><Key><PropertyRef Name="OrderID" /></Key><Property Name="OrderID" Type="Edm.Int32" Nullable="false" /><Property Name="Subtotal" Type="Edm.Decimal" Precision="19" Scale="4" /></EntityType><EntityType Name="Orders_Qry"><Key><PropertyRef Name="CompanyName" /><PropertyRef Name="OrderID" /></Key><Property Name="OrderID" Type="Edm.Int32" Nullable="false" /><Property Name="CustomerID" Type="Edm.String" MaxLength="5" /><Property Name="EmployeeID" Type="Edm.Int32" /><Property Name="OrderDate" Type="Edm.DateTimeOffset" /><Property Name="RequiredDate" Type="Edm.DateTimeOffset" /><Property Name="ShippedDate" Type="Edm.DateTimeOffset" /><Property Name="ShipVia" Type="Edm.Int32" /><Property Name="Freight" Type="Edm.Decimal" Precision="19" Scale="4" /><Property Name="ShipName" Type="Edm.String" MaxLength="40" /><Property Name="ShipAddress" Type="Edm.String" MaxLength="60" /><Property Name="ShipCity" Type="Edm.String" MaxLength="15" /><Property Name="ShipRegion" Type="Edm.String" MaxL
ength="15" /><Property Name="ShipPostalCode" Type="Edm.String" MaxLength="10" /><Property Name="ShipCountry" Type="Edm.String" MaxLength="15" /><Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" /><Property Name="Address" Type="Edm.String" MaxLength="60" /><Property Name="City" Type="Edm.String" MaxLength="15" /><Property Name="Region" Type="Edm.String" MaxLength="15" /><Property Name="PostalCode" Type="Edm.String" MaxLength="10" /><Property Name="Country" Type="Edm.String" MaxLength="15" /></EntityType><EntityType Name="Product_Sales_for_1997"><Key><PropertyRef Name="CategoryName" /><PropertyRef Name="ProductName" /></Key><Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" /><Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" /><Property Name="ProductSales" Type="Edm.Decimal" Precision="19" Scale="4" /></EntityType><EntityType Name="Products_Above_Average_Price"><Key><PropertyRef Name="ProductName" /
></Key><Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" /><Property Name="UnitPrice" Type="Edm.Decimal" Precision="19" Scale="4" /></EntityType><EntityType Name="Products_by_Category"><Key><PropertyRef Name="CategoryName" /><PropertyRef Name="Discontinued" /><PropertyRef Name="ProductName" /></Key><Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" /><Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" /><Property Name="QuantityPerUnit" Type="Edm.String" MaxLength="20" /><Property Name="UnitsInStock" Type="Edm.Int16" /><Property Name="Discontinued" Type="Edm.Boolean" Nullable="false" /></EntityType><EntityType Name="Sales_by_Category"><Key><PropertyRef Name="CategoryID" /><PropertyRef Name="CategoryName" /><PropertyRef Name="ProductName" /></Key><Property Name="CategoryID" Type="Edm.Int32" Nullable="false" /><Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" /><Property N
ame="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" /><Property Name="ProductSales" Type="Edm.Decimal" Precision="19" Scale="4" /></EntityType><EntityType Name="Sales_Totals_by_Amount"><Key><PropertyRef Name="CompanyName" /><PropertyRef Name="OrderID" /></Key><Property Name="SaleAmount" Type="Edm.Decimal" Precision="19" Scale="4" /><Property Name="OrderID" Type="Edm.Int32" Nullable="false" /><Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" /><Property Name="ShippedDate" Type="Edm.DateTimeOffset" /></EntityType><EntityType Name="Summary_of_Sales_by_Quarter"><Key><PropertyRef Name="OrderID" /></Key><Property Name="ShippedDate" Type="Edm.DateTimeOffset" /><Property Name="OrderID" Type="Edm.Int32" Nullable="false" /><Property Name="Subtotal" Type="Edm.Decimal" Precision="19" Scale="4" /></EntityType><EntityType Name="Summary_of_Sales_by_Year"><Key><PropertyRef Name="OrderID" /></Key><Property Name="ShippedDate" Type="Edm.DateTimeOffset" /><P
roperty Name="OrderID" Type="Edm.Int32" Nullable="false" /><Property Name="Subtotal" Type="Edm.Decimal" Precision="19" Scale="4" /></EntityType><Annotations Target="ODataWebExperimental.Northwind.Model.NorthwindEntities"><Annotation Term="Com.Microsoft.OData.Service.Conventions.V1.UrlConventions" String="KeyAsSegment" /></Annotations></Schema><Schema Namespace="ODataWebExperimental.Northwind.Model" xmlns="http://docs.oasis-open.org/odata/ns/edm"><EntityContainer Name="NorthwindEntities" p4:LazyLoadingEnabled="true" xmlns:p4="http://schemas.microsoft.com/ado/2009/02/edm/annotation"><EntitySet Name="Categories" EntityType="NorthwindModel.Category"><NavigationPropertyBinding Path="Products" Target="Products" /></EntitySet><EntitySet Name="CustomerDemographics" EntityType="NorthwindModel.CustomerDemographic"><NavigationPropertyBinding Path="Customers" Target="Customers" /></EntitySet><EntitySet Name="Customers" EntityType="NorthwindModel.Customer"><NavigationPropertyBinding Path="Custom
erDemographics" Target="CustomerDemographics" /><NavigationPropertyBinding Path="Orders" Target="Orders" /></EntitySet><EntitySet Name="Employees" EntityType="NorthwindModel.Employee"><NavigationPropertyBinding Path="Employees1" Target="Employees" /><NavigationPropertyBinding Path="Employee1" Target="Employees" /><NavigationPropertyBinding Path="Orders" Target="Orders" /><NavigationPropertyBinding Path="Territories" Target="Territories" /></EntitySet><EntitySet Name="Order_Details" EntityType="NorthwindModel.Order_Detail"><NavigationPropertyBinding Path="Order" Target="Orders" /><NavigationPropertyBinding Path="Product" Target="Products" /></EntitySet><EntitySet Name="Orders" EntityType="NorthwindModel.Order"><NavigationPropertyBinding Path="Customer" Target="Customers" /><NavigationPropertyBinding Path="Employee" Target="Employees" /><NavigationPropertyBinding Path="Order_Details" Target="Order_Details" /><NavigationPropertyBinding Path="Shipper" Target="Shippers" /></EntitySet><En
titySet Name="Products" EntityType="NorthwindModel.Product"><NavigationPropertyBinding Path="Category" Target="Categories" /><NavigationPropertyBinding Path="Order_Details" Target="Order_Details" /><NavigationPropertyBinding Path="Supplier" Target="Suppliers" /></EntitySet><EntitySet Name="Regions" EntityType="NorthwindModel.Region"><NavigationPropertyBinding Path="Territories" Target="Territories" /></EntitySet><EntitySet Name="Shippers" EntityType="NorthwindModel.Shipper"><NavigationPropertyBinding Path="Orders" Target="Orders" /></EntitySet><EntitySet Name="Suppliers" EntityType="NorthwindModel.Supplier"><NavigationPropertyBinding Path="Products" Target="Products" /></EntitySet><EntitySet Name="Territories" EntityType="NorthwindModel.Territory"><NavigationPropertyBinding Path="Employees" Target="Employees" /><NavigationPropertyBinding Path="Region" Target="Regions" /></EntitySet><EntitySet Name="Alphabetical_list_of_products" EntityType="NorthwindModel.Alphabetical_list_of_produc
t" /><EntitySet Name="Category_Sales_for_1997" EntityType="NorthwindModel.Category_Sales_for_1997" /><EntitySet Name="Current_Product_Lists" EntityType="NorthwindModel.Current_Product_List" /><EntitySet Name="Customer_and_Suppliers_by_Cities" EntityType="NorthwindModel.Customer_and_Suppliers_by_City" /><EntitySet Name="Invoices" EntityType="NorthwindModel.Invoice" /><EntitySet Name="Order_Details_Extendeds" EntityType="NorthwindModel.Order_Details_Extended" /><EntitySet Name="Order_Subtotals" EntityType="NorthwindModel.Order_Subtotal" /><EntitySet Name="Orders_Qries" EntityType="NorthwindModel.Orders_Qry" /><EntitySet Name="Product_Sales_for_1997" EntityType="NorthwindModel.Product_Sales_for_1997" /><EntitySet Name="Products_Above_Average_Prices" EntityType="NorthwindModel.Products_Above_Average_Price" /><EntitySet Name="Products_by_Categories" EntityType="NorthwindModel.Products_by_Category" /><EntitySet Name="Sales_by_Categories" EntityType="NorthwindModel.Sales_by_Category" /><En
titySet Name="Sales_Totals_by_Amounts" EntityType="NorthwindModel.Sales_Totals_by_Amount" /><EntitySet Name="Summary_of_Sales_by_Quarters" EntityType="NorthwindModel.Summary_of_Sales_by_Quarter" /><EntitySet Name="Summary_of_Sales_by_Years" EntityType="NorthwindModel.Summary_of_Sales_by_Year" /></EntityContainer></Schema></edmx:DataServices></edmx:Edmx>
\ No newline at end of file
+<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
+ <edmx:DataServices>
+ <Schema Namespace="NorthwindModel" xmlns="http://docs.oasis-open.org/odata/ns/edm">
+ <EntityType Name="Category">
+ <Key>
+ <PropertyRef Name="CategoryID" />
+ </Key>
+ <Property Name="CategoryID" Type="Edm.Int32" Nullable="false" p5:StoreGeneratedPattern="Identity" xmlns:p5="http://schemas.microsoft.com/ado/2009/02/edm/annotation" />
+ <Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
+ <Property Name="Description" Type="Edm.String" MaxLength="max" />
+ <Property Name="Picture" Type="Edm.Binary" MaxLength="max" />
+ <NavigationProperty Name="Products" Type="Collection(NorthwindModel.Product)" Partner="Category" />
+ </EntityType>
+ <EntityType Name="CustomerDemographic">
+ <Key>
+ <PropertyRef Name="CustomerTypeID" />
+ </Key>
+ <Property Name="CustomerTypeID" Type="Edm.String" Nullable="false" MaxLength="10" />
+ <Property Name="CustomerDesc" Type="Edm.String" MaxLength="max" />
+ <NavigationProperty Name="Customers" Type="Collection(NorthwindModel.Customer)" Partner="CustomerDemographics" />
+ </EntityType>
+ <EntityType Name="Customer">
+ <Key>
+ <PropertyRef Name="CustomerID" />
+ </Key>
+ <Property Name="CustomerID" Type="Edm.String" Nullable="false" MaxLength="5" />
+ <Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
+ <Property Name="ContactName" Type="Edm.String" MaxLength="30" />
+ <Property Name="ContactTitle" Type="Edm.String" MaxLength="30" />
+ <Property Name="Address" Type="Edm.String" MaxLength="60" />
+ <Property Name="City" Type="Edm.String" MaxLength="15" />
+ <Property Name="Region" Type="Edm.String" MaxLength="15" />
+ <Property Name="PostalCode" Type="Edm.String" MaxLength="10" />
+ <Property Name="Country" Type="Edm.String" MaxLength="15" />
+ <Property Name="Phone" Type="Edm.String" MaxLength="24" />
+ <Property Name="Fax" Type="Edm.String" MaxLength="24" />
+ <NavigationProperty Name="Orders" Type="Collection(NorthwindModel.Order)" Partner="Customer" />
+ <NavigationProperty Name="CustomerDemographics" Type="Collection(NorthwindModel.CustomerDemographic)" Partner="Customers" />
+ </EntityType>
+ <EntityType Name="Employee">
+ <Key>
+ <PropertyRef Name="EmployeeID" />
+ </Key>
+ <Property Name="EmployeeID" Type="Edm.Int32" Nullable="false" p5:StoreGeneratedPattern="Identity" xmlns:p5="http://schemas.microsoft.com/ado/2009/02/edm/annotation" />
+ <Property Name="LastName" Type="Edm.String" Nullable="false" MaxLength="20" />
+ <Property Name="FirstName" Type="Edm.String" Nullable="false" MaxLength="10" />
+ <Property Name="Title" Type="Edm.String" MaxLength="30" />
+ <Property Name="TitleOfCourtesy" Type="Edm.String" MaxLength="25" />
+ <Property Name="BirthDate" Type="Edm.DateTimeOffset" />
+ <Property Name="HireDate" Type="Edm.DateTimeOffset" />
+ <Property Name="Address" Type="Edm.String" MaxLength="60" />
+ <Property Name="City" Type="Edm.String" MaxLength="15" />
+ <Property Name="Region" Type="Edm.String" MaxLength="15" />
+ <Property Name="PostalCode" Type="Edm.String" MaxLength="10" />
+ <Property Name="Country" Type="Edm.String" MaxLength="15" />
+ <Property Name="HomePhone" Type="Edm.String" MaxLength="24" />
+ <Property Name="Extension" Type="Edm.String" MaxLength="4" />
+ <Property Name="Photo" Type="Edm.Binary" MaxLength="max" />
+ <Property Name="Notes" Type="Edm.String" MaxLength="max" />
+ <Property Name="ReportsTo" Type="Edm.Int32" />
+ <Property Name="PhotoPath" Type="Edm.String" MaxLength="255" />
+ <NavigationProperty Name="Employees1" Type="Collection(NorthwindModel.Employee)" Partner="Employee1" />
+ <NavigationProperty Name="Employee1" Type="NorthwindModel.Employee" Partner="Employees1">
+ <ReferentialConstraint Property="ReportsTo" ReferencedProperty="EmployeeID" />
+ </NavigationProperty>
+ <NavigationProperty Name="Orders" Type="Collection(NorthwindModel.Order)" Partner="Employee" />
+ <NavigationProperty Name="Territories" Type="Collection(NorthwindModel.Territory)" Partner="Employees" />
+ </EntityType>
+ <EntityType Name="Order_Detail">
+ <Key>
+ <PropertyRef Name="OrderID" />
+ <PropertyRef Name="ProductID" />
+ </Key>
+ <Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
+ <Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
+ <Property Name="UnitPrice" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" />
+ <Property Name="Quantity" Type="Edm.Int16" Nullable="false" />
+ <Property Name="Discount" Type="Edm.Single" Nullable="false" />
+ <NavigationProperty Name="Order" Type="NorthwindModel.Order" Nullable="false" Partner="Order_Details">
+ <ReferentialConstraint Property="OrderID" ReferencedProperty="OrderID" />
+ </NavigationProperty>
+ <NavigationProperty Name="Product" Type="NorthwindModel.Product" Nullable="false" Partner="Order_Details">
+ <ReferentialConstraint Property="ProductID" ReferencedProperty="ProductID" />
+ </NavigationProperty>
+ </EntityType>
+ <EntityType Name="Order">
+ <Key>
+ <PropertyRef Name="OrderID" />
+ </Key>
+ <Property Name="OrderID" Type="Edm.Int32" Nullable="false" p5:StoreGeneratedPattern="Identity" xmlns:p5="http://schemas.microsoft.com/ado/2009/02/edm/annotation" />
+ <Property Name="CustomerID" Type="Edm.String" MaxLength="5" />
+ <Property Name="EmployeeID" Type="Edm.Int32" />
+ <Property Name="OrderDate" Type="Edm.DateTimeOffset" />
+ <Property Name="RequiredDate" Type="Edm.DateTimeOffset" />
+ <Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
+ <Property Name="ShipVia" Type="Edm.Int32" />
+ <Property Name="Freight" Type="Edm.Decimal" Precision="19" Scale="4" />
+ <Property Name="ShipName" Type="Edm.String" MaxLength="40" />
+ <Property Name="ShipAddress" Type="Edm.String" MaxLength="60" />
+ <Property Name="ShipCity" Type="Edm.String" MaxLength="15" />
+ <Property Name="ShipRegion" Type="Edm.String" MaxLength="15" />
+ <Property Name="ShipPostalCode" Type="Edm.String" MaxLength="10" />
+ <Property Name="ShipCountry" Type="Edm.String" MaxLength="15" />
+ <NavigationProperty Name="Customer" Type="NorthwindModel.Customer" Partner="Orders">
+ <ReferentialConstraint Property="CustomerID" ReferencedProperty="CustomerID" />
+ </NavigationProperty>
+ <NavigationProperty Name="Employee" Type="NorthwindModel.Employee" Partner="Orders">
+ <ReferentialConstraint Property="EmployeeID" ReferencedProperty="EmployeeID" />
+ </NavigationProperty>
+ <NavigationProperty Name="Order_Details" Type="Collection(NorthwindModel.Order_Detail)" Partner="Order" />
+ <NavigationProperty Name="Shipper" Type="NorthwindModel.Shipper" Partner="Orders">
+ <ReferentialConstraint Property="ShipVia" ReferencedProperty="ShipperID" />
+ </NavigationProperty>
+ </EntityType>
+ <EntityType Name="Product">
+ <Key>
+ <PropertyRef Name="ProductID" />
+ </Key>
+ <Property Name="ProductID" Type="Edm.Int32" Nullable="false" p5:StoreGeneratedPattern="Identity" xmlns:p5="http://schemas.microsoft.com/ado/2009/02/edm/annotation" />
+ <Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
+ <Property Name="SupplierID" Type="Edm.Int32" />
+ <Property Name="CategoryID" Type="Edm.Int32" />
+ <Property Name="QuantityPerUnit" Type="Edm.String" MaxLength="20" />
+ <Property Name="UnitPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
+ <Property Name="UnitsInStock" Type="Edm.Int16" />
+ <Property Name="UnitsOnOrder" Type="Edm.Int16" />
+ <Property Name="ReorderLevel" Type="Edm.Int16" />
+ <Property Name="Discontinued" Type="Edm.Boolean" Nullable="false" />
+ <NavigationProperty Name="Category" Type="NorthwindModel.Category" Partner="Products">
+ <ReferentialConstraint Property="CategoryID" ReferencedProperty="CategoryID" />
+ </NavigationProperty>
+ <NavigationProperty Name="Order_Details" Type="Collection(NorthwindModel.Order_Detail)" Partner="Product" />
+ <NavigationProperty Name="Supplier" Type="NorthwindModel.Supplier" Partner="Products">
+ <ReferentialConstraint Property="SupplierID" ReferencedProperty="SupplierID" />
+ </NavigationProperty>
+ </EntityType>
+ <EntityType Name="Region">
+ <Key>
+ <PropertyRef Name="RegionID" />
+ </Key>
+ <Property Name="RegionID" Type="Edm.Int32" Nullable="false" />
+ <Property Name="RegionDescription" Type="Edm.String" Nullable="false" MaxLength="50" />
+ <NavigationProperty Name="Territories" Type="Collection(NorthwindModel.Territory)" Partner="Region" />
+ </EntityType>
+ <EntityType Name="Shipper">
+ <Key>
+ <PropertyRef Name="ShipperID" />
+ </Key>
+ <Property Name="ShipperID" Type="Edm.Int32" Nullable="false" p5:StoreGeneratedPattern="Identity" xmlns:p5="http://schemas.microsoft.com/ado/2009/02/edm/annotation" />
+ <Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
+ <Property Name="Phone" Type="Edm.String" MaxLength="24" />
+ <NavigationProperty Name="Orders" Type="Collection(NorthwindModel.Order)" Partner="Shipper" />
+ </EntityType>
+ <EntityType Name="Supplier">
+ <Key>
+ <PropertyRef Name="SupplierID" />
+ </Key>
+ <Property Name="SupplierID" Type="Edm.Int32" Nullable="false" p5:StoreGeneratedPattern="Identity" xmlns:p5="http://schemas.microsoft.com/ado/2009/02/edm/annotation" />
+ <Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
+ <Property Name="ContactName" Type="Edm.String" MaxLength="30" />
+ <Property Name="ContactTitle" Type="Edm.String" MaxLength="30" />
+ <Property Name="Address" Type="Edm.String" MaxLength="60" />
+ <Property Name="City" Type="Edm.String" MaxLength="15" />
+ <Property Name="Region" Type="Edm.String" MaxLength="15" />
+ <Property Name="PostalCode" Type="Edm.String" MaxLength="10" />
+ <Property Name="Country" Type="Edm.String" MaxLength="15" />
+ <Property Name="Phone" Type="Edm.String" MaxLength="24" />
+ <Property Name="Fax" Type="Edm.String" MaxLength="24" />
+ <Property Name="HomePage" Type="Edm.String" MaxLength="max" />
+ <NavigationProperty Name="Products" Type="Collection(NorthwindModel.Product)" Partner="Supplier" />
+ </EntityType>
+ <EntityType Name="Territory">
+ <Key>
+ <PropertyRef Name="TerritoryID" />
+ </Key>
+ <Property Name="TerritoryID" Type="Edm.String" Nullable="false" MaxLength="20" />
+ <Property Name="TerritoryDescription" Type="Edm.String" Nullable="false" MaxLength="50" />
+ <Property Name="RegionID" Type="Edm.Int32" Nullable="false" />
+ <NavigationProperty Name="Region" Type="NorthwindModel.Region" Nullable="false" Partner="Territories">
+ <ReferentialConstraint Property="RegionID" ReferencedProperty="RegionID" />
+ </NavigationProperty>
+ <NavigationProperty Name="Employees" Type="Collection(NorthwindModel.Employee)" Partner="Territories" />
+ </EntityType>
+ <EntityType Name="Alphabetical_list_of_product">
+ <Key>
+ <PropertyRef Name="CategoryName" />
+ <PropertyRef Name="Discontinued" />
+ <PropertyRef Name="ProductID" />
+ <PropertyRef Name="ProductName" />
+ </Key>
+ <Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
+ <Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
+ <Property Name="SupplierID" Type="Edm.Int32" />
+ <Property Name="CategoryID" Type="Edm.Int32" />
+ <Property Name="QuantityPerUnit" Type="Edm.String" MaxLength="20" />
+ <Property Name="UnitPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
+ <Property Name="UnitsInStock" Type="Edm.Int16" />
+ <Property Name="UnitsOnOrder" Type="Edm.Int16" />
+ <Property Name="ReorderLevel" Type="Edm.Int16" />
+ <Property Name="Discontinued" Type="Edm.Boolean" Nullable="false" />
+ <Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
+ </EntityType>
+ <EntityType Name="Category_Sales_for_1997">
+ <Key>
+ <PropertyRef Name="CategoryName" />
+ </Key>
+ <Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
+ <Property Name="CategorySales" Type="Edm.Decimal" Precision="19" Scale="4" />
+ </EntityType>
+ <EntityType Name="Current_Product_List">
+ <Key>
+ <PropertyRef Name="ProductID" />
+ <PropertyRef Name="ProductName" />
+ </Key>
+ <Property Name="ProductID" Type="Edm.Int32" Nullable="false" p5:StoreGeneratedPattern="Identity" xmlns:p5="http://schemas.microsoft.com/ado/2009/02/edm/annotation" />
+ <Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
+ </EntityType>
+ <EntityType Name="Customer_and_Suppliers_by_City">
+ <Key>
+ <PropertyRef Name="CompanyName" />
+ <PropertyRef Name="Relationship" />
+ </Key>
+ <Property Name="City" Type="Edm.String" MaxLength="15" />
+ <Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
+ <Property Name="ContactName" Type="Edm.String" MaxLength="30" />
+ <Property Name="Relationship" Type="Edm.String" Nullable="false" MaxLength="9" Unicode="false" />
+ </EntityType>
+ <EntityType Name="Invoice">
+ <Key>
+ <PropertyRef Name="CustomerName" />
+ <PropertyRef Name="Discount" />
+ <PropertyRef Name="OrderID" />
+ <PropertyRef Name="ProductID" />
+ <PropertyRef Name="ProductName" />
+ <PropertyRef Name="Quantity" />
+ <PropertyRef Name="Salesperson" />
+ <PropertyRef Name="ShipperName" />
+ <PropertyRef Name="UnitPrice" />
+ </Key>
+ <Property Name="ShipName" Type="Edm.String" MaxLength="40" />
+ <Property Name="ShipAddress" Type="Edm.String" MaxLength="60" />
+ <Property Name="ShipCity" Type="Edm.String" MaxLength="15" />
+ <Property Name="ShipRegion" Type="Edm.String" MaxLength="15" />
+ <Property Name="ShipPostalCode" Type="Edm.String" MaxLength="10" />
+ <Property Name="ShipCountry" Type="Edm.String" MaxLength="15" />
+ <Property Name="CustomerID" Type="Edm.String" MaxLength="5" />
+ <Property Name="CustomerName" Type="Edm.String" Nullable="false" MaxLength="40" />
+ <Property Name="Address" Type="Edm.String" MaxLength="60" />
+ <Property Name="City" Type="Edm.String" MaxLength="15" />
+ <Property Name="Region" Type="Edm.String" MaxLength="15" />
+ <Property Name="PostalCode" Type="Edm.String" MaxLength="10" />
+ <Property Name="Country" Type="Edm.String" MaxLength="15" />
+ <Property Name="Salesperson" Type="Edm.String" Nullable="false" MaxLength="31" />
+ <Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
+ <Property Name="OrderDate" Type="Edm.DateTimeOffset" />
+ <Property Name="RequiredDate" Type="Edm.DateTimeOffset" />
+ <Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
+ <Property Name="ShipperName" Type="Edm.String" Nullable="false" MaxLength="40" />
+ <Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
+ <Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
+ <Property Name="UnitPrice" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" />
+ <Property Name="Quantity" Type="Edm.Int16" Nullable="false" />
+ <Property Name="Discount" Type="Edm.Single" Nullable="false" />
+ <Property Name="ExtendedPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
+ <Property Name="Freight" Type="Edm.Decimal" Precision="19" Scale="4" />
+ </EntityType>
+ <EntityType Name="Order_Details_Extended">
+ <Key>
+ <PropertyRef Name="Discount" />
+ <PropertyRef Name="OrderID" />
+ <PropertyRef Name="ProductID" />
+ <PropertyRef Name="ProductName" />
+ <PropertyRef Name="Quantity" />
+ <PropertyRef Name="UnitPrice" />
+ </Key>
+ <Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
+ <Property Name="ProductID" Type="Edm.Int32" Nullable="false" />
+ <Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
+ <Property Name="UnitPrice" Type="Edm.Decimal" Nullable="false" Precision="19" Scale="4" />
+ <Property Name="Quantity" Type="Edm.Int16" Nullable="false" />
+ <Property Name="Discount" Type="Edm.Single" Nullable="false" />
+ <Property Name="ExtendedPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
+ </EntityType>
+ <EntityType Name="Order_Subtotal">
+ <Key>
+ <PropertyRef Name="OrderID" />
+ </Key>
+ <Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
+ <Property Name="Subtotal" Type="Edm.Decimal" Precision="19" Scale="4" />
+ </EntityType>
+ <EntityType Name="Orders_Qry">
+ <Key>
+ <PropertyRef Name="CompanyName" />
+ <PropertyRef Name="OrderID" />
+ </Key>
+ <Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
+ <Property Name="CustomerID" Type="Edm.String" MaxLength="5" />
+ <Property Name="EmployeeID" Type="Edm.Int32" />
+ <Property Name="OrderDate" Type="Edm.DateTimeOffset" />
+ <Property Name="RequiredDate" Type="Edm.DateTimeOffset" />
+ <Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
+ <Property Name="ShipVia" Type="Edm.Int32" />
+ <Property Name="Freight" Type="Edm.Decimal" Precision="19" Scale="4" />
+ <Property Name="ShipName" Type="Edm.String" MaxLength="40" />
+ <Property Name="ShipAddress" Type="Edm.String" MaxLength="60" />
+ <Property Name="ShipCity" Type="Edm.String" MaxLength="15" />
+ <Property Name="ShipRegion" Type="Edm.String" MaxLength="15" />
+ <Property Name="ShipPostalCode" Type="Edm.String" MaxLength="10" />
+ <Property Name="ShipCountry" Type="Edm.String" MaxLength="15" />
+ <Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
+ <Property Name="Address" Type="Edm.String" MaxLength="60" />
+ <Property Name="City" Type="Edm.String" MaxLength="15" />
+ <Property Name="Region" Type="Edm.String" MaxLength="15" />
+ <Property Name="PostalCode" Type="Edm.String" MaxLength="10" />
+ <Property Name="Country" Type="Edm.String" MaxLength="15" />
+ </EntityType>
+ <EntityType Name="Product_Sales_for_1997">
+ <Key>
+ <PropertyRef Name="CategoryName" />
+ <PropertyRef Name="ProductName" />
+ </Key>
+ <Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
+ <Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
+ <Property Name="ProductSales" Type="Edm.Decimal" Precision="19" Scale="4" />
+ </EntityType>
+ <EntityType Name="Products_Above_Average_Price">
+ <Key>
+ <PropertyRef Name="ProductName" />
+ </Key>
+ <Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
+ <Property Name="UnitPrice" Type="Edm.Decimal" Precision="19" Scale="4" />
+ </EntityType>
+ <EntityType Name="Products_by_Category">
+ <Key>
+ <PropertyRef Name="CategoryName" />
+ <PropertyRef Name="Discontinued" />
+ <PropertyRef Name="ProductName" />
+ </Key>
+ <Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
+ <Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
+ <Property Name="QuantityPerUnit" Type="Edm.String" MaxLength="20" />
+ <Property Name="UnitsInStock" Type="Edm.Int16" />
+ <Property Name="Discontinued" Type="Edm.Boolean" Nullable="false" />
+ </EntityType>
+ <EntityType Name="Sales_by_Category">
+ <Key>
+ <PropertyRef Name="CategoryID" />
+ <PropertyRef Name="CategoryName" />
+ <PropertyRef Name="ProductName" />
+ </Key>
+ <Property Name="CategoryID" Type="Edm.Int32" Nullable="false" />
+ <Property Name="CategoryName" Type="Edm.String" Nullable="false" MaxLength="15" />
+ <Property Name="ProductName" Type="Edm.String" Nullable="false" MaxLength="40" />
+ <Property Name="ProductSales" Type="Edm.Decimal" Precision="19" Scale="4" />
+ </EntityType>
+ <EntityType Name="Sales_Totals_by_Amount">
+ <Key>
+ <PropertyRef Name="CompanyName" />
+ <PropertyRef Name="OrderID" />
+ </Key>
+ <Property Name="SaleAmount" Type="Edm.Decimal" Precision="19" Scale="4" />
+ <Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
+ <Property Name="CompanyName" Type="Edm.String" Nullable="false" MaxLength="40" />
+ <Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
+ </EntityType>
+ <EntityType Name="Summary_of_Sales_by_Quarter">
+ <Key>
+ <PropertyRef Name="OrderID" />
+ </Key>
+ <Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
+ <Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
+ <Property Name="Subtotal" Type="Edm.Decimal" Precision="19" Scale="4" />
+ </EntityType>
+ <EntityType Name="Summary_of_Sales_by_Year">
+ <Key>
+ <PropertyRef Name="OrderID" />
+ </Key>
+ <Property Name="ShippedDate" Type="Edm.DateTimeOffset" />
+ <Property Name="OrderID" Type="Edm.Int32" Nullable="false" />
+ <Property Name="Subtotal" Type="Edm.Decimal" Precision="19" Scale="4" />
+ </EntityType>
+ <Annotations Target="ODataWebExperimental.Northwind.Model.NorthwindEntities">
+ <Annotation Term="Com.Microsoft.OData.Service.Conventions.V1.UrlConventions" String="KeyAsSegment" />
+ </Annotations>
+ </Schema>
+ <Schema Namespace="ODataWebExperimental.Northwind.Model" xmlns="http://docs.oasis-open.org/odata/ns/edm">
+ <EntityContainer Name="NorthwindEntities" p4:LazyLoadingEnabled="true" xmlns:p4="http://schemas.microsoft.com/ado/2009/02/edm/annotation">
+ <EntitySet Name="Categories" EntityType="NorthwindModel.Category">
+ <NavigationPropertyBinding Path="Products" Target="Products" />
+ </EntitySet>
+ <EntitySet Name="CustomerDemographics" EntityType="NorthwindModel.CustomerDemographic">
+ <NavigationPropertyBinding Path="Customers" Target="Customers" />
+ </EntitySet>
+ <EntitySet Name="Customers" EntityType="NorthwindModel.Customer">
+ <NavigationPropertyBinding Path="CustomerDemographics" Target="CustomerDemographics" />
+ <NavigationPropertyBinding Path="Orders" Target="Orders" />
+ </EntitySet>
+ <EntitySet Name="Employees" EntityType="NorthwindModel.Employee">
+ <NavigationPropertyBinding Path="Employees1" Target="Employees" />
+ <NavigationPropertyBinding Path="Employee1" Target="Employees" />
+ <NavigationPropertyBinding Path="Orders" Target="Orders" />
+ <NavigationPropertyBinding Path="Territories" Target="Territories" />
+ </EntitySet>
+ <EntitySet Name="Order_Details" EntityType="NorthwindModel.Order_Detail">
+ <NavigationPropertyBinding Path="Order" Target="Orders" />
+ <NavigationPropertyBinding Path="Product" Target="Products" />
+ </EntitySet>
+ <EntitySet Name="Orders" EntityType="NorthwindModel.Order">
+ <NavigationPropertyBinding Path="Customer" Target="Customers" />
+ <NavigationPropertyBinding Path="Employee" Target="Employees" />
+ <NavigationPropertyBinding Path="Order_Details" Target="Order_Details" />
+ <NavigationPropertyBinding Path="Shipper" Target="Shippers" />
+ </EntitySet>
+ <EntitySet Name="Products" EntityType="NorthwindModel.Product">
+ <NavigationPropertyBinding Path="Category" Target="Categories" />
+ <NavigationPropertyBinding Path="Order_Details" Target="Order_Details" />
+ <NavigationPropertyBinding Path="Supplier" Target="Suppliers" />
+ </EntitySet>
+ <EntitySet Name="Regions" EntityType="NorthwindModel.Region">
+ <NavigationPropertyBinding Path="Territories" Target="Territories" />
+ </EntitySet>
+ <EntitySet Name="Shippers" EntityType="NorthwindModel.Shipper">
+ <NavigationPropertyBinding Path="Orders" Target="Orders" />
+ </EntitySet>
+ <EntitySet Name="Suppliers" EntityType="NorthwindModel.Supplier">
+ <NavigationPropertyBinding Path="Products" Target="Products" />
+ </EntitySet>
+ <EntitySet Name="Territories" EntityType="NorthwindModel.Territory">
+ <NavigationPropertyBinding Path="Employees" Target="Employees" />
+ <NavigationPropertyBinding Path="Region" Target="Regions" />
+ </EntitySet>
+ <EntitySet Name="Alphabetical_list_of_products" EntityType="NorthwindModel.Alphabetical_list_of_product" />
+ <EntitySet Name="Category_Sales_for_1997" EntityType="NorthwindModel.Category_Sales_for_1997" />
+ <EntitySet Name="Current_Product_Lists" EntityType="NorthwindModel.Current_Product_List" />
+ <EntitySet Name="Customer_and_Suppliers_by_Cities" EntityType="NorthwindModel.Customer_and_Suppliers_by_City" />
+ <EntitySet Name="Invoices" EntityType="NorthwindModel.Invoice" />
+ <EntitySet Name="Order_Details_Extendeds" EntityType="NorthwindModel.Order_Details_Extended" />
+ <EntitySet Name="Order_Subtotals" EntityType="NorthwindModel.Order_Subtotal" />
+ <EntitySet Name="Orders_Qries" EntityType="NorthwindModel.Orders_Qry" />
+ <EntitySet Name="Product_Sales_for_1997" EntityType="NorthwindModel.Product_Sales_for_1997" />
+ <EntitySet Name="Products_Above_Average_Prices" EntityType="NorthwindModel.Products_Above_Average_Price" />
+ <EntitySet Name="Products_by_Categories" EntityType="NorthwindModel.Products_by_Category" />
+ <EntitySet Name="Sales_by_Categories" EntityType="NorthwindModel.Sales_by_Category" />
+ <EntitySet Name="Sales_Totals_by_Amounts" EntityType="NorthwindModel.Sales_Totals_by_Amount" />
+ <EntitySet Name="Summary_of_Sales_by_Quarters" EntityType="NorthwindModel.Summary_of_Sales_by_Quarter" />
+ <EntitySet Name="Summary_of_Sales_by_Years" EntityType="NorthwindModel.Summary_of_Sales_by_Year" />
+ </EntityContainer>
+ </Schema>
+ </edmx:DataServices>
+</edmx:Edmx>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bae3d847/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/Edm.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/Edm.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/Edm.java
index 3d1e535..26861e3 100644
--- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/Edm.java
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/Edm.java
@@ -28,7 +28,7 @@ import java.util.List;
public interface Edm {
/**
- * Get entity container by full qualified name
+ * Get entity container by full qualified name.
* <br/>
* See {@link EdmEntityContainer} for more information.
*
@@ -38,7 +38,7 @@ public interface Edm {
EdmEntityContainer getEntityContainer(FullQualifiedName name);
/**
- * Get enum type by full qualified name
+ * Get enum type by full qualified name.
* <br/>
* See {@link EdmEnumType} for more information
*
@@ -48,7 +48,7 @@ public interface Edm {
EdmEnumType getEnumType(FullQualifiedName name);
/**
- * Get a type definition by full qualified name
+ * Get a type definition by full qualified name.
* <br/>
* See {@link EdmTypeDefinition} for more information
*
@@ -58,7 +58,7 @@ public interface Edm {
EdmTypeDefinition getTypeDefinition(FullQualifiedName name);
/**
- * Get entity type by full qualified name
+ * Get entity type by full qualified name.
* <br/>
* See {@link EdmEntityType} for more information.
*
@@ -68,7 +68,7 @@ public interface Edm {
EdmEntityType getEntityType(FullQualifiedName name);
/**
- * Get complex type by full qualified name.
+ * Get complex type by full qualified name..
* <br/>
* See {@link EdmComplexType} for more information.
*
@@ -101,7 +101,7 @@ public interface Edm {
Boolean isBindingParameterCollection, List<String> parameterNames);
/**
- * Get service metadata
+ * Get service metadata.
* <br/>
* See {@link EdmServiceMetadata} for more information.
*
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bae3d847/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmActionImportInfo.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmActionImportInfo.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmActionImportInfo.java
new file mode 100644
index 0000000..18f0d74
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmActionImportInfo.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.commons.api.edm;
+
+import java.net.URI;
+
+/**
+ * Objects of this class contain information about one action import inside the EntityDataModel.
+ */
+public interface EdmActionImportInfo extends EdmOperationImportInfo {
+
+ /**
+ * @return the action import name
+ */
+ String getActionImportName();
+
+ /**
+ * We use a {@link URI} object here to ensure the right encoding. If a string representation is needed the
+ * toASCIIString() method can be used.
+ *
+ * @return the uri to this function import
+ */
+ URI getActionImportUri();
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bae3d847/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmComplexType.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmComplexType.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmComplexType.java
index 7b26621..7287228 100644
--- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmComplexType.java
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmComplexType.java
@@ -24,7 +24,7 @@ package org.apache.olingo.odata4.commons.api.edm;
* EdmComplexType holds a set of related information like {@link EdmPrimitiveType} properties and EdmComplexType
* properties.
*/
-public interface EdmComplexType extends EdmStructuralType {
+public interface EdmComplexType extends EdmStructuredType {
@Override
EdmComplexType getBaseType();
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bae3d847/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmEntityType.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmEntityType.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmEntityType.java
index 585f813..b582551 100644
--- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmEntityType.java
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmEntityType.java
@@ -23,7 +23,7 @@ import java.util.List;
/**
* A CSDL EntityType element.
*/
-public interface EdmEntityType extends EdmStructuralType {
+public interface EdmEntityType extends EdmStructuredType {
/**
* Gets all key predicate names. In case an alias is defined for a key predicate this will be returned.
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bae3d847/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmFunctionImportInfo.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmFunctionImportInfo.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmFunctionImportInfo.java
index ac62798..28fc6fa 100644
--- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmFunctionImportInfo.java
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmFunctionImportInfo.java
@@ -23,12 +23,7 @@ import java.net.URI;
/**
* Objects of this class contain information about one function import inside the EntityDataModel.
*/
-public interface EdmFunctionImportInfo {
-
- /**
- * @return the entity container name which contains this function import.
- */
- String getEntityContainerName();
+public interface EdmFunctionImportInfo extends EdmOperationImportInfo {
/**
* @return the function import name
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bae3d847/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmOperationImportInfo.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmOperationImportInfo.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmOperationImportInfo.java
new file mode 100644
index 0000000..1c2c62a
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmOperationImportInfo.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.commons.api.edm;
+
+/**
+ * Objects of this class contain information about one action or function import inside the EntityDataModel.
+ */
+public interface EdmOperationImportInfo {
+
+ /**
+ * @return the entity container name which contains this function import.
+ */
+ String getEntityContainerName();
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bae3d847/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmServiceMetadata.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmServiceMetadata.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmServiceMetadata.java
index bf3a6d6..be6f2c4 100644
--- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmServiceMetadata.java
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmServiceMetadata.java
@@ -48,6 +48,11 @@ public interface EdmServiceMetadata {
List<EdmSingletonInfo> getSingletonInfos();
/**
+ * @return a list of {@link EdmActionImportInfo} objects inside the data model
+ */
+ List<EdmActionImportInfo> getActionImportInfos();
+
+ /**
* @return a list of {@link EdmFunctionImportInfo} objects inside the data model
*/
List<EdmFunctionImportInfo> getFunctionImportInfos();
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bae3d847/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmStructuralType.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmStructuralType.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmStructuralType.java
deleted file mode 100644
index be11391..0000000
--- a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmStructuralType.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.odata4.commons.api.edm;
-
-import java.util.List;
-
-/**
- * EdmStructuralType is the base for a complex type or an entity type.
- *
- * Complex types and entity types are described in the Conceptual Schema Definition of the OData protocol.
- */
-public interface EdmStructuralType extends EdmType {
-
- /**
- * Get property by name.
- *
- * @param name
- * @return simple, complex or navigation property as {@link EdmTyped}
- */
- EdmElement getProperty(String name);
-
- /**
- * Get all simple and complex property names.
- *
- * @return property names as type List<String>
- */
- List<String> getPropertyNames();
-
- /**
- * Get all navigation property names.
- *
- * @return navigation property names as type List<String>
- */
- List<String> getNavigationPropertyNames();
-
- /**
- * Base types are described in the OData protocol specification.
- *
- * @return {@link EdmStructuralType}
- */
- EdmStructuralType getBaseType();
-
- /**
- * Checks if this type is convertible to parameter {@link targetType}
- *
- * @param targetType
- * @return true if this type is compatible to the testType ( i.e. this type is a subtype of targetType )
- */
- boolean compatibleTo(EdmType targetType);
-}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bae3d847/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmStructuredType.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmStructuredType.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmStructuredType.java
new file mode 100644
index 0000000..b515957
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/EdmStructuredType.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.commons.api.edm;
+
+import java.util.List;
+
+/**
+ * EdmStructuralType is the base for a complex type or an entity type.
+ *
+ * Complex types and entity types are described in the Conceptual Schema Definition of the OData protocol.
+ */
+public interface EdmStructuredType extends EdmType {
+
+ /**
+ * Get property by name
+ *
+ * @param name
+ * @return simple, complex or navigation property as {@link EdmTyped}
+ */
+ EdmElement getProperty(String name);
+
+ /**
+ * Get all simple and complex property names.
+ *
+ * @return property names as type List<String>
+ */
+ List<String> getPropertyNames();
+
+ /**
+ * Get structural property by name.
+ *
+ * @param name
+ * @return simple or complex property as {@link EdmTyped}
+ */
+ EdmProperty getStructuralProperty(String name);
+
+ /**
+ * Get navigation property by name.
+ *
+ * @param name
+ * @return navigation property as {@link EdmTyped}
+ */
+ EdmNavigationProperty getNavigationProperty(String name);
+
+ /**
+ * Get all navigation property names.
+ *
+ * @return navigation property names as type List<String>
+ */
+ List<String> getNavigationPropertyNames();
+
+ /**
+ * Base types are described in the OData protocol specification.
+ *
+ * @return {@link EdmStructuredType}
+ */
+ EdmStructuredType getBaseType();
+
+ /**
+ * Checks if this type is convertible to parameter {@link targetType}
+ *
+ * @param targetType
+ * @return true if this type is compatible to the testType ( i.e. this type is a subtype of targetType )
+ */
+ boolean compatibleTo(EdmType targetType);
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bae3d847/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/Target.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/Target.java b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/Target.java
new file mode 100644
index 0000000..5acadc4
--- /dev/null
+++ b/odata4-lib/odata4-commons-api/src/main/java/org/apache/olingo/odata4/commons/api/edm/Target.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.commons.api.edm;
+
+public class Target {
+
+ private String targetName;
+
+ private FullQualifiedName entityContainer;
+
+ public static class Builder {
+
+ private final Target instance;
+
+ public Builder(final String target, final EdmEntityContainer defaultContainer) {
+ final String[] bindingTargetParts = target.split("/");
+
+ instance = new Target();
+ if (bindingTargetParts.length == 1) {
+ instance.
+ setEntityContainer(new FullQualifiedName(defaultContainer.getNamespace(), defaultContainer.getName())).
+ setTargetName(bindingTargetParts[0]);
+ } else {
+ final int idx = bindingTargetParts[0].lastIndexOf('.');
+ instance.
+ setEntityContainer(new FullQualifiedName(
+ bindingTargetParts[0].substring(0, idx), bindingTargetParts[0].substring(idx))).
+ setTargetName(bindingTargetParts[1]);
+ }
+ }
+
+ public Target build() {
+ return instance;
+ }
+ }
+
+ public String getTargetName() {
+ return targetName;
+ }
+
+ public Target setTargetName(final String targetPathName) {
+ targetName = targetPathName;
+ return this;
+ }
+
+ public FullQualifiedName getEntityContainer() {
+ return entityContainer;
+ }
+
+ public Target setEntityContainer(final FullQualifiedName entityContainer) {
+ this.entityContainer = entityContainer;
+ return this;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bae3d847/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/AbstractEdmBindingTarget.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/AbstractEdmBindingTarget.java b/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/AbstractEdmBindingTarget.java
new file mode 100644
index 0000000..6e9df56
--- /dev/null
+++ b/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/AbstractEdmBindingTarget.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.commons.core.edm;
+
+import org.apache.olingo.odata4.commons.api.edm.Edm;
+import org.apache.olingo.odata4.commons.api.edm.EdmBindingTarget;
+import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer;
+import org.apache.olingo.odata4.commons.api.edm.EdmEntityType;
+import org.apache.olingo.odata4.commons.api.edm.EdmException;
+import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName;
+
+public abstract class AbstractEdmBindingTarget extends EdmNamedImpl implements EdmBindingTarget {
+
+ protected final EdmEntityContainer container;
+
+ private final FullQualifiedName type;
+
+ public AbstractEdmBindingTarget(final Edm edm, final EdmEntityContainer container,
+ final String name, final FullQualifiedName type) {
+
+ super(edm, name);
+ this.container = container;
+ this.type = type;
+ }
+
+ @Override
+ public EdmEntityContainer getEntityContainer() {
+ return container;
+ }
+
+ @Override
+ public EdmEntityType getEntityType() {
+ final EdmEntityType entityType = edm.getEntityType(this.type);
+ if (entityType == null) {
+ throw new EdmException("CanĀ“t find entity type: " + type + " for entity set or singleton: " + getName());
+ }
+ return entityType;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bae3d847/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/AbstractEdmComplexType.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/AbstractEdmComplexType.java b/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/AbstractEdmComplexType.java
new file mode 100644
index 0000000..db52f2e
--- /dev/null
+++ b/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/AbstractEdmComplexType.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.commons.core.edm;
+
+import org.apache.olingo.odata4.commons.api.edm.Edm;
+import org.apache.olingo.odata4.commons.api.edm.EdmComplexType;
+import org.apache.olingo.odata4.commons.api.edm.EdmException;
+import org.apache.olingo.odata4.commons.api.edm.EdmStructuredType;
+import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind;
+
+public abstract class AbstractEdmComplexType extends AbstractEdmStructuredType implements EdmComplexType {
+
+ public AbstractEdmComplexType(final Edm edm, final FullQualifiedName fqn, final FullQualifiedName baseTypeName) {
+ super(edm, fqn, EdmTypeKind.COMPLEX, baseTypeName);
+ }
+
+ @Override
+ protected EdmStructuredType buildBaseType(final FullQualifiedName baseTypeName) {
+ EdmComplexType baseType = null;
+ if (baseTypeName != null) {
+ baseType = edm.getComplexType(baseTypeName);
+ if (baseType == null) {
+ throw new EdmException("Can't find base type with name: " + baseTypeName + " for complex type: " + getName());
+ }
+ }
+ return baseType;
+ }
+
+ @Override
+ public EdmComplexType getBaseType() {
+ return (EdmComplexType) baseType;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bae3d847/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/AbstractEdmEntityContainer.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/AbstractEdmEntityContainer.java b/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/AbstractEdmEntityContainer.java
new file mode 100644
index 0000000..d183972
--- /dev/null
+++ b/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/AbstractEdmEntityContainer.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.commons.core.edm;
+
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.olingo.odata4.commons.api.edm.Edm;
+import org.apache.olingo.odata4.commons.api.edm.EdmActionImport;
+import org.apache.olingo.odata4.commons.api.edm.EdmEntityContainer;
+import org.apache.olingo.odata4.commons.api.edm.EdmEntitySet;
+import org.apache.olingo.odata4.commons.api.edm.EdmFunctionImport;
+import org.apache.olingo.odata4.commons.api.edm.EdmSingleton;
+import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName;
+
+public abstract class AbstractEdmEntityContainer extends EdmNamedImpl implements EdmEntityContainer {
+
+ protected final FullQualifiedName entityContainerName;
+
+ private final Map<String, EdmSingleton> singletons = new HashMap<String, EdmSingleton>();
+
+ private final Map<String, EdmEntitySet> entitySets = new HashMap<String, EdmEntitySet>();
+
+ private final Map<String, EdmActionImport> actionImports = new HashMap<String, EdmActionImport>();
+
+ private final Map<String, EdmFunctionImport> functionImports = new HashMap<String, EdmFunctionImport>();
+
+ public AbstractEdmEntityContainer(final Edm edm, final FullQualifiedName entityContainerName) {
+ super(edm, entityContainerName.getName());
+ this.entityContainerName = entityContainerName;
+ }
+
+ @Override
+ public String getNamespace() {
+ return entityContainerName.getNamespace();
+ }
+
+ protected abstract EdmSingleton createSingleton(String singletonName);
+
+ @Override
+ public EdmSingleton getSingleton(final String singletonName) {
+ EdmSingleton singleton = singletons.get(singletonName);
+ if (singleton == null) {
+ singleton = createSingleton(singletonName);
+ singletons.put(singletonName, singleton);
+ }
+ return singleton;
+ }
+
+ protected abstract EdmEntitySet createEntitySet(String entitySetName);
+
+ @Override
+ public EdmEntitySet getEntitySet(final String entitySetName) {
+ EdmEntitySet entitySet = entitySets.get(entitySetName);
+ if (entitySet == null) {
+ entitySet = createEntitySet(entitySetName);
+ entitySets.put(entitySetName, entitySet);
+ }
+ return entitySet;
+ }
+
+ protected abstract EdmActionImport createActionImport(String actionImportName);
+
+ @Override
+ public EdmActionImport getActionImport(final String actionImportName) {
+ EdmActionImport actionImport = actionImports.get(actionImportName);
+ if (actionImport == null) {
+ actionImport = createActionImport(actionImportName);
+ actionImports.put(actionImportName, actionImport);
+ }
+ return actionImport;
+ }
+
+ protected abstract EdmFunctionImport createFunctionImport(String functionImportName);
+
+ @Override
+ public EdmFunctionImport getFunctionImport(final String functionImportName) {
+ EdmFunctionImport functionImport = functionImports.get(functionImportName);
+ if (functionImport == null) {
+ functionImport = createFunctionImport(functionImportName);
+ functionImports.put(functionImportName, functionImport);
+ }
+ return functionImport;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/bae3d847/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/AbstractEdmEntityType.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/AbstractEdmEntityType.java b/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/AbstractEdmEntityType.java
new file mode 100644
index 0000000..75f982f
--- /dev/null
+++ b/odata4-lib/odata4-commons-core/src/main/java/org/apache/olingo/odata4/commons/core/edm/AbstractEdmEntityType.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.odata4.commons.core.edm;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import org.apache.olingo.odata4.commons.api.edm.Edm;
+import org.apache.olingo.odata4.commons.api.edm.EdmEntityType;
+import org.apache.olingo.odata4.commons.api.edm.EdmException;
+import org.apache.olingo.odata4.commons.api.edm.EdmKeyPropertyRef;
+import org.apache.olingo.odata4.commons.api.edm.EdmStructuredType;
+import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.odata4.commons.api.edm.constants.EdmTypeKind;
+
+public abstract class AbstractEdmEntityType extends AbstractEdmStructuredType implements EdmEntityType {
+
+ private final boolean hasStream;
+
+ protected EdmEntityType entityBaseType;
+
+ private final List<String> keyPredicateNames = new ArrayList<String>();
+
+ private final Map<String, EdmKeyPropertyRef> keyPropertyRefs = new LinkedHashMap<String, EdmKeyPropertyRef>();
+
+ private List<EdmKeyPropertyRef> keyPropertyRefsList;
+
+ protected AbstractEdmEntityType(final Edm edm, final FullQualifiedName fqn, final FullQualifiedName baseTypeName,
+ final boolean hashStream) {
+
+ super(edm, fqn, EdmTypeKind.ENTITY, baseTypeName);
+ this.hasStream = hashStream;
+ }
+
+ protected void setEdmKeyPropertyRef(final List<EdmKeyPropertyRef> edmKey) {
+ for (EdmKeyPropertyRef ref : edmKey) {
+ if (ref.getAlias() == null) {
+ keyPredicateNames.add(ref.getKeyPropertyName());
+ keyPropertyRefs.put(ref.getKeyPropertyName(), ref);
+ } else {
+ keyPredicateNames.add(ref.getAlias());
+ keyPropertyRefs.put(ref.getAlias(), ref);
+ }
+ }
+ }
+
+ @Override
+ protected EdmStructuredType buildBaseType(final FullQualifiedName baseTypeName) {
+ EdmEntityType baseType = null;
+ if (baseTypeName != null) {
+ baseType = edm.getEntityType(baseTypeName);
+ if (baseType == null) {
+ throw new EdmException("Cannot find base type with name: " + baseTypeName + " for entity type: " + getName());
+ }
+ }
+ return baseType;
+ }
+
+ @Override
+ public EdmEntityType getBaseType() {
+ return entityBaseType;
+ }
+
+ @Override
+ public List<String> getKeyPredicateNames() {
+ if (keyPredicateNames.isEmpty() && baseType != null) {
+ return entityBaseType.getKeyPredicateNames();
+ }
+ return keyPredicateNames;
+ }
+
+ @Override
+ public List<EdmKeyPropertyRef> getKeyPropertyRefs() {
+ if (keyPropertyRefsList == null) {
+ keyPropertyRefsList = new ArrayList<EdmKeyPropertyRef>(keyPropertyRefs.values());
+ }
+ if (keyPropertyRefsList.isEmpty() && entityBaseType != null) {
+ return entityBaseType.getKeyPropertyRefs();
+ }
+ return keyPropertyRefsList;
+ }
+
+ @Override
+ public EdmKeyPropertyRef getKeyPropertyRef(final String keyPredicateName) {
+ final EdmKeyPropertyRef edmKeyPropertyRef = keyPropertyRefs.get(keyPredicateName);
+ if (edmKeyPropertyRef == null && entityBaseType != null) {
+ return entityBaseType.getKeyPropertyRef(keyPredicateName);
+ }
+ return edmKeyPropertyRef;
+ }
+
+ @Override
+ public boolean hasStream() {
+ return hasStream;
+ }
+}