diff options
author | David Robillard <d@drobilla.net> | 2011-11-04 23:42:11 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-11-04 23:42:11 +0000 |
commit | f3e182e5e2d57f91f80beefd5200ff85a46b131e (patch) | |
tree | aaa5197645088d996c3680cc658e91007bbb2260 /lv2specgen | |
parent | dd969d2b3a7aa271a0e5a3bce9e55f691d97fa0e (diff) | |
download | lv2-f3e182e5e2d57f91f80beefd5200ff85a46b131e.tar.xz |
Show classes that are subclasses of classes defined in other specs at top level of index.
Diffstat (limited to 'lv2specgen')
-rwxr-xr-x | lv2specgen/lv2specgen.py | 10 |
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): |