From f3e182e5e2d57f91f80beefd5200ff85a46b131e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 4 Nov 2011 23:42:11 +0000 Subject: Show classes that are subclasses of classes defined in other specs at top level of index. --- lv2specgen/lv2specgen.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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): -- cgit v1.2.1