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,11 +258,9 @@ public class GroupedPropertyList extends BaseTemplateModel {
|
||||||
if (possibleOP == null) {
|
if (possibleOP == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for(ObjectProperty populatedOP : populatedOPs) {
|
if (isInPopulatedOPs(populatedOPs, possibleOP)) {
|
||||||
if (redundant(populatedOP, possibleOP)) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (!vClassUris.contains(possibleOP.getDomainVClassURI())) {
|
if (!vClassUris.contains(possibleOP.getDomainVClassURI())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -288,6 +286,15 @@ public class GroupedPropertyList extends BaseTemplateModel {
|
||||||
return possibleProperties;
|
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
|
* 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.
|
* 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