this.input = m;
this.repair = report;
this.output = this.input;
boolean didRepair = false;
ResIterator it = repair.listSubjectsWithProperty( EYE.repairType, EYE.setDatatype );
while ( it.hasNext() )
{
Resource curr = it.nextResource();
String literal = repair.listObjectsOfProperty( curr, EYE.onLiteral ).nextNode().asNode().getLiteralLexicalForm();
Resource b = output.createResource( repair.listObjectsOfProperty( curr, EYE.onStatement ).nextNode().asNode().getBlankNodeId() );
Resource subject = output.createResource( repair.listObjectsOfProperty( b, RDF.subject ).nextNode().asNode().getURI() );
Property predicate = output.createProperty( repair.listObjectsOfProperty( b, RDF.predicate ).nextNode().asNode().getURI() );
String oldType = repair.listObjectsOfProperty( curr, EYE.badDatatypeURI ).nextNode().asNode().getLiteralLexicalForm();
String datatype = repair.listObjectsOfProperty( curr, EYE.newValue ).nextNode().asNode().getLiteralLexicalForm();
output.remove( subject, predicate, output.createTypedLiteral( literal, oldType ) );
output.add( subject, predicate, output.createTypedLiteral( literal, datatype ) );
didRepair = true;
}
it = repair.listSubjectsWithProperty( EYE.repairType, EYE.setLanguage );
while ( it.hasNext() )
{
Resource curr = it.nextResource();
String literal = repair.listObjectsOfProperty( curr, EYE.onLiteral ).nextNode().asNode().getLiteralLexicalForm();
Resource b = output.createResource( repair.listObjectsOfProperty( curr, EYE.onStatement ).nextNode().asNode().getBlankNodeId() );
Resource subject = output.createResource( repair.listObjectsOfProperty( b, RDF.subject ).nextNode().asNode().getURI() );
Property predicate = output.createProperty( repair.listObjectsOfProperty( b, RDF.predicate ).nextNode().asNode().getURI() );