Skip to content

Commit 02da987

Browse files
committed
fixes
1 parent f897f71 commit 02da987

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/sparqlunicorn_ontdoc/export/pages/lexiconpage.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class LexiconPage(Page):
1010

1111
@staticmethod
1212
def collectionConstraint():
13-
return ["http://www.w3.org/ns/lemon/lime#Lexicon"]
13+
return ["http://www.w3.org/ns/lemon/lime#Lexicon","http://www.w3.org/ns/lemon/lexicog#LexicographicResource"]
1414

1515
@staticmethod
1616
def pageWidgetConstraint():
@@ -71,8 +71,14 @@ def generatePageWidget(graph,subject,f,onlybody=False):
7171
@staticmethod
7272
def generateCollectionWidget(graph,subject,templates,f):
7373
f.write(f"<table id=\"lexicon\">{LexiconPage.tableheader}<tbody>")
74+
count=0
7475
for lexentry in graph.objects(subject, URIRef("http://www.w3.org/ns/lemon/lexicog#entry"), True):
7576
LexiconPage.generatePageWidget(graph,lexentry,f,True)
77+
count+=1
78+
if count==0:
79+
for lexentry in graph.objects(subject, URIRef("http://www.w3.org/ns/lemon/lime#entry"), True):
80+
LexiconPage.generatePageWidget(graph,lexentry,f,True)
81+
count+=1
7682
f.write("</tbody></table>")
7783

7884
def generatePageView(self,templates,g,f):

0 commit comments

Comments
 (0)