Next Generation Enterprise Modelling - exercise guide - Dimitris Karagiannis, Robert Buchmann
Assumed requirements
Assumption1: A parking company publishes parking space availability as (3 rd party) Linked Enterprise :. :LegacyData { :ParkingA :availability 2 ; a :ParkingArea. :ParkingB :availability 0 ; a :ParkingArea. :ParkingC :availability 4 ; a :ParkingArea. :ParkingD :availability 0 ; a :ParkingArea. :ParkingE :availability 3 ; a :ParkingArea. } *Data available in provided file thirdpartydata.trig
Assumption2: A courier company requires a modelling tool to define courier tasks and map them to geographical areas (cities)
Query that only uses model information Query that uses both data and models Assumption3: A courier requires an app where he can select a task (assigned by the courier company) and can see, for that task, all available parking spaces (as published by the parking company) in order to make a reservation
Goal of the exercise 1.To create the required modelling tool 2.To enable the creation of the app
Modelling tool requirements
Assumption: modelling requirements evolve Phase1: I want to model what parking areas are available in each city Phase2: I want to model the courier tasks and map them on cities Phase3: I need that app Interoperability requirement
App requirements
Get only enterprise data "Give me all parking areas and their availability"
Get only model information "Give me all courier tasks"
Get enterprise data constrained by model information "Give me all parking areas from cities where I have to go"
Get model information constrained by enterprise data "Give me all tasks for which parking spaces are available"
Get both model information and enterprise data "Give me all cities where my task will take me, and the available parking spaces"
Exercise overview
Part I. Creating the modelling tool (iterative metamodelling)
Iteration I metamodel
Iteration I model sample
Iteration II metamodel
Iteration II model sample
Iteration III metamodel
Iteration III extensions
Part I steps Step1. Create method definition (MML file) – Required Tool: MM-DSL editor Step2. Create ADOxx-specific method library (ABL file) – Tool: MM-DSL editor/compiler Step3. Import library and create models – Tool: ADOxx Dev and Modelling toolkits
Iteration I. Step 1 Edit method definition code (MM-DSL) a.Unzip and open provided Eclipse MM-DSL editor b.Create an Eclipse project (File-New Project) c.Either: a.Import the provided MML file (Method files/CityTransportBasic.mml – see pages in the guide) b.Create an empty MML file and copy-paste the code d.Have a look on the code structure
Iteration I. Step 2 Create ADOxx-specific method library (page 12) a.Open generated ALL file b.Compile c.Refresh explorer d.Look in src-gen folder for ABL file e.Copy-paste ABL file in convenient location
Iteration I. Step 3a Create modelling tool (page 13-14) a. Import ABL file in ADOxx b. Create user *Use provided Method files/CityTransportBasic_output.abl to avoid potential errors from previous step
Iteration I. Step 3b Create models (page 14) a.Login modelling toolkit b.Create models
Iteration II. Step 1 Edit method definition code (MM-DSL) a.Open provided Eclipse MM-DSL editor b.Extend code with new snippets (provided in Extension code file, table Part I) c.Save changes, check for errors d.Have a look at new code Intermediate version of the code available on the Web: (mml code intermediate)
Iteration II. Step 2 Create ADOxx-specific method library (page 12) a.Open generated ALL file b.Compile c.Refresh explorer d.Look in src-gen folder for ABL file e.Copy-paste ABL file in convenient location
Iteration II. Step 3a Create modelling tool (page 13-14) a. Import ABL file in ADOxx b. Create user *Use provided Method files/CityTransportExtension1_output.abl to avoid potential errors from previous step
Iteration II. Step3b Create models (page 16-17)
Iteration III. Step 1 Edit method definition code (MM-DSL) a.Open provided Eclipse MM-DSL editor b.Extend code with snippets (provided in Extension code file, table Part II) c.Save changes, check for errors d.Have a look at new code Final version of the code available on the Web: (mml code final)
Iteration III. Step 2 Create ADOxx-specific method library (page 12) a.Open generated ALL file b.Compile c.Refresh explorer d.Look in src-gen folder for ABL file e.Copy-paste ABL file in convenient location
Iteration III. Step 3a Create modelling tool (page 13-14) a. Import ABL file in ADOxx b. Create user *Use provided Method files/CityTransportExtension2_output.abl to avoid potential errors from previous step
Iteration III. Step3b Test added functionality (page 20) *Works only in ParkingMap model type
Part II. Bridging the technology gap to Linked Data
Part II steps Pre-requisite: Have models prepared Step4. Create enterprise data sample – Tool: any test editor Step5. Create model-data links – Tool: modelling tool Step6. Serialize models in XML – Tool: modelling tool Step7. Serialize metamodel in XML – Tool: ADOxx dev toolkit Step8. Transform metamodel in RDF format – Tool: RDF transformer Step9. Transform models in RDF format – Tool: RDF transformer Step10. Upload metamodel, models and enterprise data in Linked Data repository: – Tool: Step11. Query examples – Tool:
Pre-requisite: prepare models (page 21)
Step4. Create third party data (page :. :LegacyData { :ParkingA :availability 2 ; a :ParkingArea. :ParkingB :availability 0 ; a :ParkingArea. :ParkingC :availability 4 ; a :ParkingArea. :ParkingD :availability 0 ; a :ParkingArea. :ParkingE :availability 3 ; a :ParkingArea. } *Data available in provided file thirdpartydata.trig
Step 5: Create model-data links (page 23) For the 4 parking objects in the Parkings model, fill the URI attribute:
Step6. Serialize models in XML (page 24)
Step7. Serialize metamodel in XML (page 25)
Step8. Transform metamodel in RDF (page 26-27) Use as a prefix! Make sure the URI attribute is turned blue before saving! *Use as input provided metamodel.xml to avoid potential errors from previous step
Step9. Transform models in RDF (page 28) Use as a prefix! *Use as input provided models.xml to avoid potential errors from previous step
Step 10: Upload to Linked Data server (page 29-30) Copy (URL only!) Paste (no spaces!) Use the prepared server: Warning: at first connection, you might need to copy-paste the server URL (see below)
Step 10: Upload to Linked Data server (page 29-30) Create a repository (name it after you, without spaces or special characters)
Step 10: Upload to Linked Data server (page 29-30) Upload thirdpartydata.trig, models.trig, metamodel.trig (*use provided files to avoid errors from previous steps)
Step 11: Run queries (page 29-30) SPARQL Queries are provided in the Queries folder (copy-paste them in Sesame) SPARQL documentation:
Query types Query that only uses model information Query that only uses third party data Query that uses model-data links Query available in Queries/Cities, parkings, spaces for OnDemandTask.txt Query available in Queries/Parking IDs and spaces.txt Query available in Queries/Task names.txt
Final app Query that only uses model information Query that uses model-data links