fixed check for redundant possible object properties (#358)
Co-authored-by: Georgy Litvinov <georgy.litvinov@tib.eu>
This commit is contained in:
parent
a7215cc932
commit
7dabc6b2ab
1 changed files with 11 additions and 4 deletions
|
@ -258,10 +258,8 @@ public class GroupedPropertyList extends BaseTemplateModel {
|
|||
if (possibleOP == null) {
|
||||
continue;
|
||||
}
|
||||
for(ObjectProperty populatedOP : populatedOPs) {
|
||||
if (redundant(populatedOP, possibleOP)) {
|
||||
continue;
|
||||
}
|
||||
if (isInPopulatedOPs(populatedOPs, possibleOP)) {
|
||||
continue;
|
||||
}
|
||||
if (!vClassUris.contains(possibleOP.getDomainVClassURI())) {
|
||||
continue;
|
||||
|
@ -288,6 +286,15 @@ public class GroupedPropertyList extends BaseTemplateModel {
|
|||
return possibleProperties;
|
||||
}
|
||||
|
||||
private boolean isInPopulatedOPs(List<ObjectProperty> populatedOPs, ObjectProperty possibleOP) {
|
||||
for(ObjectProperty populatedOP : populatedOPs) {
|
||||
if (redundant(populatedOP, possibleOP)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Don't know what the real problem is with VIVO-976, but somehow we have the same property
|
||||
* showing up once with a blank node as a domain, and once with null or OWL:Thing as a domain.
|
||||
|
|
Loading…
Add table
Reference in a new issue