Browse Source

Add XOPP vocabulary and example description

Joeri Exelmans 2 years ago
parent
commit
e8515a454c

+ 63 - 9
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/description/artifacts/my_drawio.oml

@@ -1,8 +1,8 @@
-// Warning: Gemerated code! Do not edit!
+// Warning: Generated code! Do not edit!
 // Input file: 'test/data/overview.drawio'
 // Input file: 'test/data/overview.drawio'
 // Generator: https://msdl.uantwerpen.be/git/rparedis/DrawioConvert/src/library
 // Generator: https://msdl.uantwerpen.be/git/rparedis/DrawioConvert/src/library
 
 
-description <http://ua.be/sdo2l/description/artifacts//my_drawio#> as my_drawio {
+description <http://ua.be/sdo2l/description/artifacts/my_drawio#> as my_drawio {
 
 
   uses <http://ua.be/sdo2l/vocabulary/formalisms/drawio#> as drawio
   uses <http://ua.be/sdo2l/vocabulary/formalisms/drawio#> as drawio
   uses <http://ua.be/sdo2l/vocabulary/formalisms/object_diagram#> as object_diagram
   uses <http://ua.be/sdo2l/vocabulary/formalisms/object_diagram#> as object_diagram
@@ -110,6 +110,8 @@ description <http://ua.be/sdo2l/description/artifacts//my_drawio#> as my_drawio
     drawio:ofPage p0
     drawio:ofPage p0
     object_diagram:inModel model
     object_diagram:inModel model
   ]
   ]
+
+  
   ci p0_c0 : drawio:Cell [
   ci p0_c0 : drawio:Cell [
     
     
     drawio:hasDrawioId "0"
     drawio:hasDrawioId "0"
@@ -118,6 +120,9 @@ description <http://ua.be/sdo2l/description/artifacts//my_drawio#> as my_drawio
   ]
   ]
 
 
   
   
+
+  
+
   
   
   
   
   ci p0_c1 : drawio:Cell [
   ci p0_c1 : drawio:Cell [
@@ -128,21 +133,28 @@ description <http://ua.be/sdo2l/description/artifacts//my_drawio#> as my_drawio
   ]
   ]
 
 
   
   
+
+  
+
   
   
   
   
   ci p0_c2 : drawio:Cell [
   ci p0_c2 : drawio:Cell [
     drawio:hasCellGeometry drawio:CellGeometry [
     drawio:hasCellGeometry drawio:CellGeometry [
+      
       drawio:hasX 330
       drawio:hasX 330
       drawio:hasY 180
       drawio:hasY 180
       drawio:hasWidth 120
       drawio:hasWidth 120
       drawio:hasHeight 60
       drawio:hasHeight 60
     ]
     ]
-    drawio:hasDrawioId "qRJj-DUdr-XVhgo4Xc_a-1"drawio:hasValue "Python in-memory abstract syntax of Draw.io"
+    
+    drawio:hasDrawioId "qRJj-DUdr-XVhgo4Xc_a-1"
+    drawio:hasValue "Python in-memory abstract syntax of Draw.io"
     drawio:hasParent p0_c1
     drawio:hasParent p0_c1
     object_diagram:inModel model
     object_diagram:inModel model
   ]
   ]
 
 
   
   
+
   
   
   ci p0_c2_sty_rounded : drawio:CellStyleEntry [
   ci p0_c2_sty_rounded : drawio:CellStyleEntry [
     dict:hasKey "rounded"
     dict:hasKey "rounded"
@@ -162,6 +174,8 @@ description <http://ua.be/sdo2l/description/artifacts//my_drawio#> as my_drawio
     drawio:styleEntryOf p0_c2
     drawio:styleEntryOf p0_c2
     object_diagram:inModel model
     object_diagram:inModel model
   ]
   ]
+
+  
   ci p0_c2_attr_vertex : drawio:CellAttribute [
   ci p0_c2_attr_vertex : drawio:CellAttribute [
     dict:hasKey "vertex"
     dict:hasKey "vertex"
     dict:hasValue "1"
     dict:hasValue "1"
@@ -171,17 +185,21 @@ description <http://ua.be/sdo2l/description/artifacts//my_drawio#> as my_drawio
   
   
   ci p0_c3 : drawio:Cell [
   ci p0_c3 : drawio:Cell [
     drawio:hasCellGeometry drawio:CellGeometry [
     drawio:hasCellGeometry drawio:CellGeometry [
+      
       drawio:hasX 120
       drawio:hasX 120
       drawio:hasY 180
       drawio:hasY 180
       drawio:hasWidth 120
       drawio:hasWidth 120
       drawio:hasHeight 60
       drawio:hasHeight 60
     ]
     ]
-    drawio:hasDrawioId "qRJj-DUdr-XVhgo4Xc_a-2"drawio:hasValue ".drawio file"
+    
+    drawio:hasDrawioId "qRJj-DUdr-XVhgo4Xc_a-2"
+    drawio:hasValue ".drawio file"
     drawio:hasParent p0_c1
     drawio:hasParent p0_c1
     object_diagram:inModel model
     object_diagram:inModel model
   ]
   ]
 
 
   
   
+
   
   
   ci p0_c3_sty_rounded : drawio:CellStyleEntry [
   ci p0_c3_sty_rounded : drawio:CellStyleEntry [
     dict:hasKey "rounded"
     dict:hasKey "rounded"
@@ -201,6 +219,8 @@ description <http://ua.be/sdo2l/description/artifacts//my_drawio#> as my_drawio
     drawio:styleEntryOf p0_c3
     drawio:styleEntryOf p0_c3
     object_diagram:inModel model
     object_diagram:inModel model
   ]
   ]
+
+  
   ci p0_c3_attr_vertex : drawio:CellAttribute [
   ci p0_c3_attr_vertex : drawio:CellAttribute [
     dict:hasKey "vertex"
     dict:hasKey "vertex"
     dict:hasValue "1"
     dict:hasValue "1"
@@ -210,17 +230,21 @@ description <http://ua.be/sdo2l/description/artifacts//my_drawio#> as my_drawio
   
   
   ci p0_c4 : drawio:Cell [
   ci p0_c4 : drawio:Cell [
     drawio:hasCellGeometry drawio:CellGeometry [
     drawio:hasCellGeometry drawio:CellGeometry [
+      
       drawio:hasX 530
       drawio:hasX 530
       drawio:hasY 180
       drawio:hasY 180
       drawio:hasWidth 120
       drawio:hasWidth 120
       drawio:hasHeight 60
       drawio:hasHeight 60
     ]
     ]
-    drawio:hasDrawioId "qRJj-DUdr-XVhgo4Xc_a-4"drawio:hasValue "OML"
+    
+    drawio:hasDrawioId "qRJj-DUdr-XVhgo4Xc_a-4"
+    drawio:hasValue "OML"
     drawio:hasParent p0_c1
     drawio:hasParent p0_c1
     object_diagram:inModel model
     object_diagram:inModel model
   ]
   ]
 
 
   
   
+
   
   
   ci p0_c4_sty_rounded : drawio:CellStyleEntry [
   ci p0_c4_sty_rounded : drawio:CellStyleEntry [
     dict:hasKey "rounded"
     dict:hasKey "rounded"
@@ -240,6 +264,8 @@ description <http://ua.be/sdo2l/description/artifacts//my_drawio#> as my_drawio
     drawio:styleEntryOf p0_c4
     drawio:styleEntryOf p0_c4
     object_diagram:inModel model
     object_diagram:inModel model
   ]
   ]
+
+  
   ci p0_c4_attr_vertex : drawio:CellAttribute [
   ci p0_c4_attr_vertex : drawio:CellAttribute [
     dict:hasKey "vertex"
     dict:hasKey "vertex"
     dict:hasValue "1"
     dict:hasValue "1"
@@ -249,17 +275,21 @@ description <http://ua.be/sdo2l/description/artifacts//my_drawio#> as my_drawio
   
   
   ci p0_c5 : drawio:Cell [
   ci p0_c5 : drawio:Cell [
     drawio:hasCellGeometry drawio:CellGeometry [
     drawio:hasCellGeometry drawio:CellGeometry [
+      
       drawio:hasX 240
       drawio:hasX 240
       drawio:hasY 240
       drawio:hasY 240
       drawio:hasWidth 90
       drawio:hasWidth 90
       drawio:hasHeight 30
       drawio:hasHeight 30
     ]
     ]
-    drawio:hasDrawioId "qRJj-DUdr-XVhgo4Xc_a-7"drawio:hasValue "bidirectional"
+    
+    drawio:hasDrawioId "qRJj-DUdr-XVhgo4Xc_a-7"
+    drawio:hasValue "bidirectional"
     drawio:hasParent p0_c1
     drawio:hasParent p0_c1
     object_diagram:inModel model
     object_diagram:inModel model
   ]
   ]
 
 
   
   
+
   
   
   ci p0_c5_sty_shape : drawio:CellStyleEntry [
   ci p0_c5_sty_shape : drawio:CellStyleEntry [
     dict:hasKey "shape"
     dict:hasKey "shape"
@@ -315,6 +345,8 @@ description <http://ua.be/sdo2l/description/artifacts//my_drawio#> as my_drawio
     drawio:styleEntryOf p0_c5
     drawio:styleEntryOf p0_c5
     object_diagram:inModel model
     object_diagram:inModel model
   ]
   ]
+
+  
   ci p0_c5_attr_vertex : drawio:CellAttribute [
   ci p0_c5_attr_vertex : drawio:CellAttribute [
     dict:hasKey "vertex"
     dict:hasKey "vertex"
     dict:hasValue "1"
     dict:hasValue "1"
@@ -324,17 +356,21 @@ description <http://ua.be/sdo2l/description/artifacts//my_drawio#> as my_drawio
   
   
   ci p0_c6 : drawio:Cell [
   ci p0_c6 : drawio:Cell [
     drawio:hasCellGeometry drawio:CellGeometry [
     drawio:hasCellGeometry drawio:CellGeometry [
+      
       drawio:hasX 450
       drawio:hasX 450
       drawio:hasY 240
       drawio:hasY 240
       drawio:hasWidth 70
       drawio:hasWidth 70
       drawio:hasHeight 30
       drawio:hasHeight 30
     ]
     ]
-    drawio:hasDrawioId "qRJj-DUdr-XVhgo4Xc_a-8"drawio:hasValue "one-way"
+    
+    drawio:hasDrawioId "qRJj-DUdr-XVhgo4Xc_a-8"
+    drawio:hasValue "one-way"
     drawio:hasParent p0_c1
     drawio:hasParent p0_c1
     object_diagram:inModel model
     object_diagram:inModel model
   ]
   ]
 
 
   
   
+
   
   
   ci p0_c6_sty_shape : drawio:CellStyleEntry [
   ci p0_c6_sty_shape : drawio:CellStyleEntry [
     dict:hasKey "shape"
     dict:hasKey "shape"
@@ -390,6 +426,8 @@ description <http://ua.be/sdo2l/description/artifacts//my_drawio#> as my_drawio
     drawio:styleEntryOf p0_c6
     drawio:styleEntryOf p0_c6
     object_diagram:inModel model
     object_diagram:inModel model
   ]
   ]
+
+  
   ci p0_c6_attr_vertex : drawio:CellAttribute [
   ci p0_c6_attr_vertex : drawio:CellAttribute [
     dict:hasKey "vertex"
     dict:hasKey "vertex"
     dict:hasValue "1"
     dict:hasValue "1"
@@ -397,22 +435,29 @@ description <http://ua.be/sdo2l/description/artifacts//my_drawio#> as my_drawio
     object_diagram:inModel model
     object_diagram:inModel model
   ]
   ]
   
   
+
+  
   ci p0_e0 : drawio:Edge [
   ci p0_e0 : drawio:Edge [
     drawio:hasEdgeGeometry drawio:EdgeGeometry [
     drawio:hasEdgeGeometry drawio:EdgeGeometry [
       drawio:hasSourcePoint drawio:Point [
       drawio:hasSourcePoint drawio:Point [
+        
         drawio:hasX 190
         drawio:hasX 190
         drawio:hasY 390
         drawio:hasY 390
-      ]drawio:hasTargetPoint drawio:Point [
+      ]
+      drawio:hasTargetPoint drawio:Point [
+        
         drawio:hasX 290
         drawio:hasX 290
         drawio:hasY 290
         drawio:hasY 290
       ]
       ]
     ]
     ]
+    
     drawio:hasDrawioId "qRJj-DUdr-XVhgo4Xc_a-3"
     drawio:hasDrawioId "qRJj-DUdr-XVhgo4Xc_a-3"
     drawio:hasParent p0_c1
     drawio:hasParent p0_c1
     object_diagram:inModel model
     object_diagram:inModel model
   ]
   ]
 
 
   
   
+
   
   
   ci p0_e0_sty_shape : drawio:CellStyleEntry [
   ci p0_e0_sty_shape : drawio:CellStyleEntry [
     dict:hasKey "shape"
     dict:hasKey "shape"
@@ -444,23 +489,30 @@ description <http://ua.be/sdo2l/description/artifacts//my_drawio#> as my_drawio
     drawio:styleEntryOf p0_e0
     drawio:styleEntryOf p0_e0
     object_diagram:inModel model
     object_diagram:inModel model
   ]
   ]
+
+  
   
   
   ci p0_e1 : drawio:Edge [
   ci p0_e1 : drawio:Edge [
     drawio:hasEdgeGeometry drawio:EdgeGeometry [
     drawio:hasEdgeGeometry drawio:EdgeGeometry [
       drawio:hasSourcePoint drawio:Point [
       drawio:hasSourcePoint drawio:Point [
+        
         drawio:hasX 450
         drawio:hasX 450
         drawio:hasY 390
         drawio:hasY 390
-      ]drawio:hasTargetPoint drawio:Point [
+      ]
+      drawio:hasTargetPoint drawio:Point [
+        
         drawio:hasX 500
         drawio:hasX 500
         drawio:hasY 340
         drawio:hasY 340
       ]
       ]
     ]
     ]
+    
     drawio:hasDrawioId "qRJj-DUdr-XVhgo4Xc_a-5"
     drawio:hasDrawioId "qRJj-DUdr-XVhgo4Xc_a-5"
     drawio:hasParent p0_c1
     drawio:hasParent p0_c1
     object_diagram:inModel model
     object_diagram:inModel model
   ]
   ]
 
 
   
   
+
   
   
   ci p0_e1_sty_shape : drawio:CellStyleEntry [
   ci p0_e1_sty_shape : drawio:CellStyleEntry [
     dict:hasKey "shape"
     dict:hasKey "shape"
@@ -486,6 +538,8 @@ description <http://ua.be/sdo2l/description/artifacts//my_drawio#> as my_drawio
     drawio:styleEntryOf p0_e1
     drawio:styleEntryOf p0_e1
     object_diagram:inModel model
     object_diagram:inModel model
   ]
   ]
+
+  
   
   
 
 
 }
 }

File diff suppressed because it is too large
+ 201 - 0
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/description/artifacts/my_xopp.oml


+ 2 - 0
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/description/bundle.oml

@@ -1,3 +1,5 @@
 description bundle <http://ua.be/sdo2l/description/bundle#> as ^bundle {
 description bundle <http://ua.be/sdo2l/description/bundle#> as ^bundle {
 	uses <http://ua.be/sdo2l/vocabulary/bundle#>
 	uses <http://ua.be/sdo2l/vocabulary/bundle#>
+	includes <http://ua.be/sdo2l/description/artifacts/my_drawio#>
+	includes <http://ua.be/sdo2l/description/artifacts/my_xopp#>
 }
 }

+ 137 - 0
examples/oml/SystemDesignOntology2Layers/src/oml/ua.be/sdo2l/vocabulary/formalisms/xopp.oml

@@ -0,0 +1,137 @@
+// Vocabulary for the Xournal++ file format
+vocabulary <http://ua.be/sdo2l/vocabulary/formalisms/xopp#> as xopp {
+
+	extends <http://ua.be/sdo2l/vocabulary/formalisms/object_diagram#> as object_diagram
+	extends <http://ua.be/sdo2l/vocabulary/formalisms/dict#> as dict
+	extends <http://www.w3.org/2001/XMLSchema#> as xsd
+
+	aspect element :> object_diagram:Object []
+	
+	aspect LayerElement :> element [
+		restricts relation inLayer to exactly 1
+		restricts scalar property hasText to exactly 1
+	]
+	scalar property hasText :> object_diagram:hasField [
+		domain LayerElement
+		range xsd:string
+		functional
+	]
+
+	relation entity HasXMLAttribute :> object_diagram:Link [
+		from LayerElement
+		to XMLAttribute
+		forward hasAttribute
+		reverse ofLayerElement
+		inverse functional
+	]
+	
+	concept XMLAttribute :> element, dict:DictEntry [
+		restricts relation ofLayerElement to exactly 1
+	]
+	
+	concept Text :> LayerElement []
+	concept Stroke :> LayerElement []
+	
+	concept Layer :> element [
+		restricts relation inPage to exactly 1
+	]
+	
+	relation entity HasLayerElement :> object_diagram:Link [
+		from Layer
+		to LayerElement
+		forward hasElement
+		reverse inLayer
+		inverse functional
+		asymmetric
+		irreflexive
+	]
+	
+	concept Page :> element [
+		restricts relation inFile to exactly 1
+		restricts scalar property hasWidth to exactly 1
+		restricts scalar property hasHeight to exactly 1
+		restricts scalar property hasBackgroundType to exactly 1
+		restricts scalar property hasBackgroundColor to exactly 1
+		restricts scalar property hasBackgroundStyle to exactly 1
+	]
+
+	scalar property hasWidth :> object_diagram:hasField [
+		domain Page
+		range xsd:decimal
+		functional
+	]
+	scalar property hasHeight :> object_diagram:hasField [
+		domain Page
+		range xsd:decimal
+		functional
+	]
+	scalar property hasBackgroundType :> object_diagram:hasField [
+		domain Page
+		range xsd:string
+		functional
+	]
+	scalar property hasBackgroundColor :> object_diagram:hasField [
+		domain Page
+		range xsd:string
+		functional
+	]
+	scalar property hasBackgroundStyle :> object_diagram:hasField [
+		domain Page
+		range xsd:string
+		functional
+	]
+	relation entity HasLayer :> object_diagram:Link [
+		from Page
+		to Layer
+		forward hasLayer
+		reverse inPage
+		inverse functional
+		asymmetric
+		irreflexive
+	]
+	
+	concept File :> element [
+		restricts relation hasPage to min 1
+		
+		restricts scalar property hasCreator to exactly 1
+		restricts scalar property hasFileVersion to exactly 1
+		restricts scalar property hasTitle to exactly 1
+	]
+	
+	scalar property hasCreator :> object_diagram:hasField [
+		domain File
+		range xsd:string
+		functional
+	]
+	scalar property hasFileVersion :> object_diagram:hasField [
+		domain File
+		range xsd:integer
+		functional
+	]
+	scalar property hasTitle :> object_diagram:hasField [
+		domain File
+		range xsd:string
+		functional
+	]
+	scalar property hasPreview :> object_diagram:hasField [
+		domain File
+//		range xsd:base64Binary // PNG-encoded // Doesn't seem to be working, workaround below
+		range xsd:string // Workaround
+		functional
+	]	
+	
+	relation entity HasPage :> object_diagram:Link [
+		from File
+		to Page
+		forward hasPage
+		reverse inFile
+		asymmetric
+		irreflexive
+		inverse functional
+	]
+	
+	// A Xournal++ file:
+	concept Model :> object_diagram:Model [
+		restricts all relation object_diagram:hasObject to element
+	]
+}