public boolean checkChanges(ReadGraph g, IForwardMapping<Domain, Range> map, Domain domainElement, Range rangeElement) throws MappingException {
Domain value = domainAccessor.get(g, domainElement);
Range mappedValue = value == null ? null : map.map(g, value);
- return mappedValue == rangeAccessor.get(rangeElement);
+ return mappedValue != rangeAccessor.get(rangeElement);
}
@Override
public boolean checkChanges(ReadGraph g, IForwardMapping<Domain, Range> map, Domain domainElement, Range rangeElement) throws MappingException {
LOGGER.trace(" MappedElementsRule.updateRange");
ArrayList<Range> mappedValue = getMappedValue(g, map, domainElement);
- return Objects.equals(mappedValue, rangeAccessor.get(rangeElement));
+ return !Objects.equals(mappedValue, rangeAccessor.get(rangeElement));
}
private ArrayList<Range> getMappedValue(ReadGraph g, IForwardMapping<Domain, Range> map, Domain domainElement)
public boolean checkChanges(ReadGraph g, IForwardMapping<Domain, Range> map, Domain domainElement,
Range rangeElement) throws MappingException {
Object value = rangeAccessor.get(rangeElement);
- return Objects.equals(value, domainAccessor.get(g, domainElement));
+ return !Objects.equals(value, domainAccessor.get(g, domainElement));
}
public void createDomain(WriteGraph g, IBackwardMapping<Domain,Range> map, Domain domainElement, Range rangeElement) throws MappingException {