Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

A UML profile for OData Web APIs


Published on

Generate an OData implementation for your data based on an initial UML domain model. Refine the model with OData information for a more precise generation.

Published in: Software
  • Be the first to comment

  • Be the first to like this

A UML profile for OData Web APIs

  1. 1. A UML Profile for OData Web APIs Hamza Ed-douibi, Javier Luis Cánovas Izquierdo, Jordi Cabot June 7, 2017 ICWE 2017, Rome, Italy.
  2. 2. REST APIs2 Health Demography Transport Government
  3. 3. REST APIs description formats ▹ REST is a style, not a standard 3 API Blueprint
  4. 4. OData in a nutshell ▹ OData is a standardized protocol for creating and consuming data APIs ▹ Key features: ▸ Resources are defined in a data model ▸ URIs to identify resources and query data 4 GET$top=20&$orderby=Name XML/AtomJSON Resource query
  5. 5. but…5 Developer OData schema { } Serialization deserialization Query resolution
  6. 6. What we propose6 UML Class diagram OData profile OData API OData clients 2 1
  7. 7. A UML profile? ▹ Profile is a lightweight extension mechanism to the UML standard ▹ A profile consists of a set of stereotypes, tagged values and constraints ▹ Stereotypes are formal extensions of existing model elements within the UML metamodel 7
  8. 8. Running example8 <edmx:Edmx Version="4.0"> <edmx:DataServices> <Schema Namespace="com.example.ODataDemo" Alias="ODataDemo"> <EntityType Name="Product"> <Key><PropertyRef Name="ID"/></Key> <Property Name="ID" Type="Edm.Int32" Nullable="false"/> <Property Name= “Name" Type="Edm.String" Nullable="false"/>... <NavigationProperty Name=“Cotegories" Type= “Collection(Category)“ Nullable="false“ Partner= “Categories"/>... </EntityType> <EntityContainer Name="ODataDemoService"> <EntitySet Name="Products" EntityType="ODataDemo.Product"> <NavigationPropertyBinding Path="Categories" Target="Categories"/> </EntitySet> </EntityContainer> </Schema> </edmx:DataServices> </edmx:Edmx>
  9. 9. OData service9
  10. 10. EntityType, EntitySet10
  11. 11. Key, Property11
  12. 12. NavigationProperty, NavigationPropertyBinding12
  13. 13. And More ▹ Stereotypes: • Enumerations • Complex types • Annotations • Singletons ▹ OCL constraints to validate the profile 13
  14. 14. Automatic application of the profile14 UML Class diagram OData profile 2 1 Product <<ODEntityType>> <<ODEntitySet>> name = Product … name = Products …
  15. 15. Implementation15
  16. 16. Conclusion
  17. 17. Conclusion ▹ A UML profile to model OData Web APIs ▹ Automatic application of OData profile 17 Profile Tuning Functions Actions … Future work Reverse- engineering ER models Databases … Code generation OData APIs OData clients … Integration with other modeling languages IFML BPMN …
  18. 18. Thank you! A UML profile for OData Web APIs Hamza Ed-douibi, Javier Luis Cánovas Izquierdo, Jordi Cabot 18 ▹Check it out at: ▹ contact: Icons credits: CC 3.0 Freepik, Maxim Basinski , Madebyoliver from UML Class diagram OData profile OData API OData clients 2 1