private void process(ResIterator iter, boolean delete, PrintWriter out) {
Collection removing = new ArrayList();
while (iter.hasNext()) {
Resource currentRelationRes = iter.nextResource();
try {
Relation relation = new ConcreteRelation(currentRelationRes);
relation.getChildStrength();
relation.getChildStrengthReduction();
relation.getCurrentChildStrength();
relation.getComparativeStrength();
Resource target = relation.getTarget();
if (target.isAnon()) {
//TODO this is wrong (agents are anon!), look more detail at osar problem
if (!target.hasProperty(RDF.type, FOAF.Agent)) {
throw new RuntimeException("target is anon and not an Agent");
}
}
relation.getTargetLabel();
relation.getEffectiveDate();
} catch (Exception ex) {
log.info("Exception on "+currentRelationRes+" "+ex+", will remove");
removing.add(currentRelationRes);
}
}