aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-11-04 23:42:11 +0000
committerDavid Robillard <d@drobilla.net>2011-11-04 23:42:11 +0000
commitf3e182e5e2d57f91f80beefd5200ff85a46b131e (patch)
treeaaa5197645088d996c3680cc658e91007bbb2260
parentdd969d2b3a7aa271a0e5a3bce9e55f691d97fa0e (diff)
downloadlv2-f3e182e5e2d57f91f80beefd5200ff85a46b131e.tar.xz
Show classes that are subclasses of classes defined in other specs at top level of index.
-rwxr-xr-xlv2specgen/lv2specgen.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py
index 13422d2..822f539 100755
--- a/lv2specgen/lv2specgen.py
+++ b/lv2specgen/lv2specgen.py
@@ -658,8 +658,16 @@ def buildIndex(m, classlist, proplist, instalist=None):
for c in classlist:
if c in shown:
continue
- if findOne(m, c, rdfs.subClassOf, None):
+
+ # Skip classes that are subclasses of classes defined in this spec
+ local_subclass = False
+ for p in findStatements(m, c, rdfs.subClassOf, None):
+ parent = str(p[2])
+ if parent[0:len(spec_ns_str)] == spec_ns_str:
+ local_subclass = True
+ if local_subclass:
continue
+
shown[c] = True
name = termName(m, c)
if name.startswith(spec_ns_str):