|
@@ -1,9 +1,9 @@
|
|
|
{%- macro attributes(pageindex, page, layerindex, layer, elementindex, element) -%}
|
|
|
{%- for key,value in element.attributes.items() %}
|
|
|
- ci p{{pageindex}}l{{layerindex}}e{{elementindex}}a{{loop.index}} : xournalpp:XMLAttribute [
|
|
|
- xournalpp:hasKey "{{key}}"
|
|
|
- xournalpp:hasValue "{{value}}"
|
|
|
- xournalpp:ofLayerElement p{{pageindex}}l{{layerindex}}e{{elementindex}}
|
|
|
+ ci p{{pageindex}}l{{layerindex}}e{{elementindex}}a{{loop.index}} : xopp:XMLAttribute [
|
|
|
+ xopp:hasKey "{{key}}"
|
|
|
+ xopp:hasValue "{{value}}"
|
|
|
+ xopp:ofLayerElement p{{pageindex}}l{{layerindex}}e{{elementindex}}
|
|
|
object_diagram:inModel model
|
|
|
]
|
|
|
{% endfor %}
|
|
@@ -11,9 +11,9 @@
|
|
|
|
|
|
{%- macro elements(pageindex, page, layerindex, layer) -%}
|
|
|
{% for el in layer.elements %}
|
|
|
- ci p{{pageindex}}l{{layerindex}}e{{loop.index}} : xournalpp:{{el.__class__.__name__}} [
|
|
|
- xournalpp:hasText "{{el.text}}"
|
|
|
- xournalpp:inLayer p{{pageindex}}l{{layerindex}}
|
|
|
+ ci p{{pageindex}}l{{layerindex}}e{{loop.index}} : xopp:{{el.__class__.__name__}} [
|
|
|
+ xopp:hasText "{{el.text}}"
|
|
|
+ xopp:inLayer p{{pageindex}}l{{layerindex}}
|
|
|
object_diagram:inModel model
|
|
|
]
|
|
|
{{ attributes(pageindex, page, layerindex, layer, loop.index, el) -}}
|
|
@@ -22,8 +22,8 @@
|
|
|
|
|
|
{%- macro layers(pageindex, page) -%}
|
|
|
{% for layer in page.layers %}
|
|
|
- ci p{{pageindex}}l{{loop.index}} : xournalpp:Layer [
|
|
|
- xournalpp:inPage p{{pageindex}}
|
|
|
+ ci p{{pageindex}}l{{loop.index}} : xopp:Layer [
|
|
|
+ xopp:inPage p{{pageindex}}
|
|
|
object_diagram:inModel model
|
|
|
]
|
|
|
{{ elements(pageindex, page, loop.index, layer) -}}
|
|
@@ -32,13 +32,13 @@
|
|
|
|
|
|
{%- macro pages(file) -%}
|
|
|
{% for page in file.pages -%}
|
|
|
- ci p{{loop.index}} : xournalpp:Page [
|
|
|
- xournalpp:hasWidth {{ page.width }}
|
|
|
- xournalpp:hasHeight {{ page.height }}
|
|
|
- xournalpp:hasBackgroundType "{{ page.background_type }}"
|
|
|
- xournalpp:hasBackgroundColor "{{ page.background_color }}"
|
|
|
- xournalpp:hasBackgroundStyle "{{ page.background_style }}"
|
|
|
- xournalpp:inFile file
|
|
|
+ ci p{{loop.index}} : xopp:Page [
|
|
|
+ xopp:hasWidth {{ page.width }}
|
|
|
+ xopp:hasHeight {{ page.height }}
|
|
|
+ xopp:hasBackgroundType "{{ page.background_type }}"
|
|
|
+ xopp:hasBackgroundColor "{{ page.background_color }}"
|
|
|
+ xopp:hasBackgroundStyle "{{ page.background_style }}"
|
|
|
+ xopp:inFile file
|
|
|
object_diagram:inModel model
|
|
|
]
|
|
|
{{ layers(loop.index, page) -}}
|
|
@@ -49,17 +49,17 @@
|
|
|
// Generator: https://msdl.uantwerpen.be/git/jexelmans/xopp2py
|
|
|
description <http://flandersmake.be/cdf/description/{{namespace}}#> as {{namespace}} {
|
|
|
|
|
|
- uses <http://flandersmake.be/cdf/vocabulary/xournalpp#> as xournalpp
|
|
|
+ uses <http://flandersmake.be/cdf/vocabulary/xopp#> as xopp
|
|
|
uses <http://flandersmake.be/cdf/vocabulary/object_diagram#> as object_diagram
|
|
|
|
|
|
- ci model : xournalpp:Model []
|
|
|
+ ci model : xopp:Model []
|
|
|
|
|
|
- ci file : xournalpp:File [
|
|
|
- xournalpp:hasCreator "{{ file.creator }}"
|
|
|
- xournalpp:hasFileVersion {{ file.fileversion }}
|
|
|
- xournalpp:hasTitle "{{ file.title }}"
|
|
|
+ ci file : xopp:File [
|
|
|
+ xopp:hasCreator "{{ file.creator }}"
|
|
|
+ xopp:hasFileVersion {{ file.fileversion }}
|
|
|
+ xopp:hasTitle "{{ file.title }}"
|
|
|
{%- if file.preview != None %}
|
|
|
- xournalpp:hasPreview "{{ toBase64(file.preview).decode('utf-8') }}"
|
|
|
+ xopp:hasPreview "{{ toBase64(file.preview).decode('utf-8') }}"
|
|
|
{%- endif %}
|
|
|
object_diagram:inModel model
|
|
|
]
|