Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
situx committed Mar 4, 2024
1 parent cac9719 commit e39959a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
17 changes: 12 additions & 5 deletions tasks/query/enrichment/enrichmentquerytask.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,15 @@ def finished(self, result):
for f in self.layer.getFeatures():
if rowww >= self.resulttable.rowCount():
self.resulttable.insertRow(rowww)
if f[self.idfield] in self.resultmap:
QgsMessageLog.logMessage(str(f[self.idfield]) + " - " + str(self.resultmap[f[self.idfield]]),
MESSAGE_CATEGORY, Qgis.Info)
QgsMessageLog.logMessage(str(self.resultmap), MESSAGE_CATEGORY,
Qgis.Info)
fields=f.fields().names()
counter=0
for current, attr in enumerate(f.fields()):
value=f.attribute(f.fieldNameIndex(attr.name()))
#if f[self.idfield] in self.resultmap:
#QgsMessageLog.logMessage(str(f[self.idfield]) + " - " + str(self.resultmap[f[self.idfield]]),
# MESSAGE_CATEGORY, Qgis.Info)
if self.strategy == "Merge":
newitem = QTableWidgetItem(str(f[self.item]) + str(self.resultmap[f[self.idfield]]))
elif self.strategy == "Keep Local":
Expand All @@ -169,10 +175,11 @@ def finished(self, result):
else:
newitem = QTableWidgetItem(str(self.resultmap[f[self.idfield]]))
else:
newitem = QTableWidgetItem(str(self.resultmap[f[self.idfield]]))
newitem = QTableWidgetItem(str(value))
QgsMessageLog.logMessage(str(rowww) + " - " + str(self.row) + " - " + str(newitem), MESSAGE_CATEGORY,
Qgis.Info)
self.resulttable.setItem(rowww, self.row, newitem)
self.resulttable.setItem(rowww, counter, newitem)
counter+=1
rowww += 1
self.layer.commitChanges()
self.progress.close()
2 changes: 1 addition & 1 deletion util/interlinkutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class InterlinkUtils:
idfieldnames=["ID","IDENTIFIER"]
labelfieldnames=["NAME","TITLE","LABEL"]
descriptorfieldnames = ["DESCRIPTION", "COMMENT", "REMARK", "DEFINITION", "CONTENT","ABSTRACT"]
subclassterms=["TYP","TYPE","SUB"]
subclassterms=["TYP","TYPE","SUB","CATEGORY"]

@staticmethod
def readXMLMappingToDict(filename):
Expand Down

0 comments on commit e39959a

Please sign in to comment.