this.input = m;
this.repair = report;
this.output = this.input;
this.config = config;
ResIterator it = repair.listSubjectsWithProperty( EYE.repairType, EYE.replaceNamespace );
while ( it.hasNext() )
{
/*
* We are able to make one or more of the following assumptions;
* (1) o The Prefix is probably desired \\
* (3) o The URI is likely misspelt ===> Work these with the precedence specified
* (2) o The URI is right, but the user mistakenly used a 'reserved' prefix //
*/
Resource curr = it.nextResource();
String prefix = repair.listObjectsOfProperty( curr, EYE.onPrefix ).nextNode().asNode().getLiteralLexicalForm();
String currUri = output.getNsPrefixURI( prefix );
String configsUri = getConfigsUriFromPrefix( prefix );
String configsPre = null;
if ( currUri != null )
configsPre = getConfigsPrefixFromUri( currUri );
if ( configsUri != null ) // Change the URI to a preferred one
changeNsUri( currUri, configsUri );
else if ( configsPre != null ) // Use that URI, but set the prefix according to config
changeNsPrefix( prefix, configsPre );
else // Use the 'expected' URI
output.setNsPrefix( prefix, repair.listObjectsOfProperty( curr, EYE.expected ).nextNode().asNode().getLiteralLexicalForm() );
}
it = repair.listSubjectsWithProperty( EYE.repairType, EYE.removeDuplicatePrefixes );
while ( it.hasNext() )
{
Resource curr = it.nextResource();
NodeIterator it2 = repair.listObjectsOfProperty( curr, EYE.onPrefix );
String uri = repair.listObjectsOfProperty( curr, EYE.multiplePrefixesForNamespace ).nextNode().asNode().getLiteralLexicalForm();
if (it2.hasNext())
{
boolean oneKept = false;