} else {
p = null;
}
} catch (TrippiException e) {
throw new MelcoeXacmlException("Error creating nodes for trippi query " + e.getMessage(), e);
}
try {
TripleIterator it = RI.findTriples(null, p, o, 0);
while (it.hasNext()) {
Triple t = it.next();
String pred = t.getPredicate().toString();
Set<String> values = rels.get(pred);
if (values == null) {
values = new HashSet<String>();
}
values.add(t.getSubject().stringValue());
rels.put(pred, values);
}
} catch (TrippiException e) {
throw new MelcoeXacmlException("Error finding relationships " + e.getMessage(), e);
}
return rels;
}