while ( it.hasNext() )
{
Statement currFailure = it.nextStatement();
Resource subj = currFailure.getSubject();
NodeIterator it2 = repair.listObjectsOfProperty( subj, EYE.repairType );
while ( it2.hasNext() )
{
RDFNode curr = it2.nextNode();
if ( curr.equals( EYE.decreaseNumProperties ) )
{
NodeIterator it3 = repair.listObjectsOfProperty( subj, EYE.statementRemoved );
while ( it3.hasNext() )
{
Resource remStat = (Resource)it3.nextNode();
Resource remS = (Resource)repair.listObjectsOfProperty( remStat, RDF.subject ).nextNode();
Property remP = output.createProperty( repair.listObjectsOfProperty( remStat, RDF.predicate ).nextNode().asNode().getURI() );
RDFNode remO = repair.listObjectsOfProperty( remStat, RDF.object ).nextNode();
output.remove( remS, remP, remO );
}
}
else if ( curr.equals( EYE.increaseNumProperties ) )
{
Resource addStat = (Resource)repair.listObjectsOfProperty( subj, EYE.statementAdded ).nextNode();
Resource addS = (Resource)repair.listObjectsOfProperty( addStat, RDF.subject ).nextNode();
Property addP = output.createProperty( repair.listObjectsOfProperty( addStat, RDF.predicate ).nextNode().asNode().getURI() );
int target = Integer.parseInt( repair.listObjectsOfProperty( repair.createResource( repair.listObjectsOfProperty( subj, EYE.cardinality ).nextNode().asNode().getBlankNodeId() ), EYE.min ).nextNode().asNode().getLiteralLexicalForm() );
int start = Integer.parseInt( repair.listObjectsOfProperty( subj, EYE.numValues ).nextNode().asNode().getLiteralLexicalForm() );
for ( int i = start; i < target; i++ )
output.add( addS, addP, output.createResource() );
}
else if ( curr.equals( EYE.increaseCardinality ) )
{
int target = Integer.parseInt( repair.listObjectsOfProperty( subj, EYE.max ).nextNode().asNode().getLiteralLexicalForm() );
int minCard = Integer.parseInt( repair.listObjectsOfProperty( repair.createResource( repair.listObjectsOfProperty( subj, EYE.cardinality ).nextNode().asNode().getBlankNodeId() ), EYE.min ).nextNode().asNode().getLiteralLexicalForm() );
Resource cName = output.createResource( ((OntModel)output).getBaseModel().listObjectsOfProperty( output.createResource( repair.listObjectsOfProperty( subj, EYE.onType).nextNode().asNode().getURI() ), RDFS.subClassOf ).nextNode().asNode().getBlankNodeId() );
StmtIterator it3 = output.listStatements( cName, OWL.cardinality, (RDFNode)null );
if ( it3.hasNext() )
{
output.remove( it3 );
output.add( cName, OWL.minCardinality, output.createTypedLiteral( "" + minCard, "http://www.w3.org/2001/XMLSchema#integer" ) );
}
else