return;
}
inverseTrMap.addPredicateObjectMap(invPoMap);
// Add the link to the link set
r2rmlMapping.getAuxInfo().getTriplesMapGraph().addLink(new TriplesMapLink(inverseTrMap, subjTrMap, invPoMap));
}
if (inverseOfPropLabel != null) {
// Create the triples map
// Get the object's triples map
TriplesMap inverseOfTrMap = r2rmlMapping.getTriplesMapIndex().get(poMap.getObject().getId());
PredicateObjectMap invOfPoMap = new PredicateObjectMap(PredicateObjectMap.getNewId(),inverseOfTrMap);
// Create the predicate
Predicate pred = new Predicate(olink.getId()+"+inverseOf");
pred.getTemplate().addTemplateTermToSet(
new StringTemplateTerm(inverseOfPropLabel.getUri(), true));
invOfPoMap.setPredicate(pred);
// Create the object using RefObjMap
RefObjectMap refObjMap = new RefObjectMap(RefObjectMap.getNewRefObjectMapId(), subjTrMap);
ObjectMap invOfObjMap = new ObjectMap(subjMap.getId(), refObjMap);
invOfPoMap.setObject(invOfObjMap);
boolean alreadyExists = doesPredicateAlreadyExist(inverseOfTrMap,
invOfPoMap, refObjMap);
if(alreadyExists)
{
return;
}
inverseOfTrMap.addPredicateObjectMap(invOfPoMap);
// Add the link to the link set
r2rmlMapping.getAuxInfo().getTriplesMapGraph().addLink(new TriplesMapLink(inverseOfTrMap, subjTrMap, invOfPoMap));
}
}