aboutsummaryrefslogtreecommitdiffstats
path: root/lv2
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-10-28 09:28:36 +0100
committerDavid Robillard <d@drobilla.net>2018-10-28 09:28:50 +0100
commit693450ca902a2faf2f0e197353e43c29603e0159 (patch)
treebdbc1ec50fbd3500007c3339bd5376dee262365e /lv2
parentd9885bc878c1e2c4f877e409ea11667bc14a05aa (diff)
downloadlv2-693450ca902a2faf2f0e197353e43c29603e0159.tar.xz
Rework port restrictions so that presets can be validated
Diffstat (limited to 'lv2')
-rw-r--r--lv2/core/lv2core.doap.ttl4
-rw-r--r--lv2/core/lv2core.ttl32
-rw-r--r--lv2/presets/presets.ttl2
3 files changed, 26 insertions, 12 deletions
diff --git a/lv2/core/lv2core.doap.ttl b/lv2/core/lv2core.doap.ttl
index 2f90f31..af2a983 100644
--- a/lv2/core/lv2core.doap.ttl
+++ b/lv2/core/lv2core.doap.ttl
@@ -17,11 +17,13 @@
doap:maintainer <http://drobilla.net/drobilla#me> ;
doap:release [
doap:revision "15.0" ;
- doap:created "2017-03-19" ;
+ doap:created "2018-10-28" ;
dcs:blame <http://drobilla.net/drobilla#me> ;
dcs:changeset [
dcs:item [
rdfs:label "Add lv2:MIDIPlugin class."
+ ] , [
+ rdfs:label "Rework port restrictions so that presets can be validated."
]
]
] , [
diff --git a/lv2/core/lv2core.ttl b/lv2/core/lv2core.ttl
index 7dc0afd..b6e5a7c 100644
--- a/lv2/core/lv2core.ttl
+++ b/lv2/core/lv2core.ttl
@@ -146,6 +146,11 @@ lv2:Plugin
owl:onProperty doap:name ;
owl:someValuesFrom rdf:PlainLiteral ;
rdfs:comment "A plugin MUST have at least one untranslated doap:name." ;
+ ] , [
+ a owl:Restriction ;
+ owl:onProperty lv2:port ;
+ owl:allValuesFrom lv2:Port ;
+ rdfs:comment "All ports on a plugin MUST be fully specified lv2:Port instances." ;
] ;
lv2:documentation """
<p>The class which represents an LV2 plugin.</p>
@@ -162,25 +167,32 @@ e.g. <q>Tape Delay Unit</q>. Use doap:shortdesc or doap:description for more
detailed descriptions.</p>
""" .
-lv2:Port
+lv2:PortBase
a rdfs:Class ,
owl:Class ;
- rdfs:label "Port" ;
+ rdfs:label "Port Base" ;
rdfs:subClassOf [
a owl:Restriction ;
- owl:onProperty lv2:index ;
- owl:cardinality 1 ;
- rdfs:comment "A port MUST have exactly one lv2:index." ;
- ] , [
- a owl:Restriction ;
owl:onProperty lv2:symbol ;
owl:cardinality 1 ;
rdfs:comment "A port MUST have exactly one lv2:symbol." ;
- ] , [
+ ] ;
+ lv2:documentation """
+<p>Similar to lv2:PluginBase, an abstract port-like resource that MAY not
+actually be a fully specified LV2 port. For example, this is used for preset
+"ports" which do not specify an index.</p>
+""" .
+
+lv2:Port
+ a rdfs:Class ,
+ owl:Class ;
+ rdfs:label "Port" ;
+ rdfs:subClassOf lv2:PortBase ;
+ rdfs:subClassOf [
a owl:Restriction ;
owl:onProperty lv2:name ;
owl:minCardinality 1 ;
- rdfs:comment "A port MUST have at least one lv2:name." ;
+ rdfs:comment "A port MUST have at least one lv2:name."
] ;
lv2:documentation """
<p>The class which represents an LV2 port.</p>
@@ -262,7 +274,7 @@ lv2:port
a rdf:Property ,
owl:ObjectProperty ;
rdfs:domain lv2:PluginBase ;
- rdfs:range lv2:Port ;
+ rdfs:range lv2:PortBase ;
rdfs:label "port" ;
rdfs:comment "A port (input or output) on this plugin." .
diff --git a/lv2/presets/presets.ttl b/lv2/presets/presets.ttl
index da7e9bb..a32347b 100644
--- a/lv2/presets/presets.ttl
+++ b/lv2/presets/presets.ttl
@@ -89,7 +89,7 @@ pset:bank
pset:value
a rdf:Property ;
- rdfs:domain lv2:Port ;
+ rdfs:domain lv2:PortBase ;
rdfs:label "value" ;
rdfs:comment """Specifies the value of a Port on some Preset. This property is used in a similar way to e.g. lv2:default.""" .