From 291d16e6709d88cb202acc042c9395c420fd580d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 27 Oct 2018 17:15:24 +0200 Subject: WIP: Improve validation --- lv2/core/lv2core.ttl | 31 ++++++++++++++++++++++++------- lv2/options/options.ttl | 5 ++--- lv2/presets/presets.ttl | 2 +- lv2/units/units.ttl | 2 -- 4 files changed, 27 insertions(+), 13 deletions(-) (limited to 'lv2') diff --git a/lv2/core/lv2core.ttl b/lv2/core/lv2core.ttl index dd3e6bd..20bcacc 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 """

The class which represents an LV2 plugin.

@@ -162,20 +167,32 @@ e.g. Tape Delay Unit. Use doap:shortdesc or doap:description for more detailed descriptions.

""" . +lv2:PortBase + a rdfs:Class , + owl:Class ; + rdfs:label "Port Base" ; + rdfs:subClassOf [ + a owl:Restriction ; + owl:onProperty lv2:symbol ; + owl:cardinality 1 ; + rdfs:comment "A port MUST have exactly one lv2:symbol." ; + ] ; + lv2:documentation """ +

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.

+""" . + lv2:Port a rdfs:Class , owl:Class ; rdfs:label "Port" ; - rdfs:subClassOf [ + rdfs:subClassOf lv2:PortBase , + [ 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." ; ] , [ a owl:Restriction ; owl:onProperty lv2:name ; @@ -262,7 +279,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/options/options.ttl b/lv2/options/options.ttl index b0f752c..5c5860a 100644 --- a/lv2/options/options.ttl +++ b/lv2/options/options.ttl @@ -10,7 +10,6 @@ rdfs:seeAlso , ; lv2:documentation """ -

This extension defines a facility for options, which are dynamic properties that may be changed at run time.

@@ -79,7 +78,7 @@ be listed as a lv2:optionalFeature.

opts:requiredOption a rdf:Property , owl:ObjectProperty ; - rdfs:range opts:Option ; + rdfs:range rdf:Property ; rdfs:label "required option" ; lv2:documentation """

An option required by the instance to function at all. The host MUST pass a @@ -94,7 +93,7 @@ fall back to a reasonable default value if it is not provided.

opts:supportedOption a rdf:Property , owl:ObjectProperty ; - rdfs:range opts:Option ; + rdfs:range rdf:Property ; rdfs:label "supported option" ; lv2:documentation """

An option supported or understood by the instance. The host SHOULD 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.""" . diff --git a/lv2/units/units.ttl b/lv2/units/units.ttl index e40bef6..aaae520 100644 --- a/lv2/units/units.ttl +++ b/lv2/units/units.ttl @@ -59,8 +59,6 @@ units:Unit units:unit a rdf:Property , owl:ObjectProperty ; - rdfs:domain lv2:Port , - lv2:Parameter ; rdfs:range units:Unit ; rdfs:label "unit" ; rdfs:comment "The unit used by the value of a port or parameter." . -- cgit v1.2.1