VIVO-499 fixes bug in deduping applicable properties
This commit is contained in:
parent
dc58791842
commit
b276cd5049
1 changed files with 18 additions and 13 deletions
|
@ -300,21 +300,26 @@ public class GroupedPropertyList extends BaseTemplateModel {
|
|||
return false;
|
||||
}
|
||||
for (ObjectProperty op : opList) {
|
||||
if (op.getURI() != null && op.getURI().equals(pi.getPropertyURI())) {
|
||||
boolean uriMatches = (op.getURI() != null
|
||||
&& op.getURI().equals(pi.getPropertyURI()));
|
||||
boolean domainMatches = false;
|
||||
boolean rangeMatches = false;
|
||||
if(op.getDomainVClassURI() == null) {
|
||||
if(pi.getDomainClassURI() == null) {
|
||||
return true;
|
||||
domainMatches = true;
|
||||
}
|
||||
} else if (op.getDomainVClassURI().equals(pi.getDomainClassURI())) {
|
||||
return true;
|
||||
domainMatches = true;
|
||||
}
|
||||
if(op.getRangeVClassURI() == null) {
|
||||
if (pi.getDomainClassURI() == null) {
|
||||
return true;
|
||||
rangeMatches = true;
|
||||
}
|
||||
} else if (op.getRangeVClassURI().equals(pi.getRangeClassURI())) {
|
||||
return true;
|
||||
rangeMatches = true;
|
||||
}
|
||||
if (uriMatches && domainMatches && rangeMatches) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue