RDFNode numValsR = repair.listObjectsOfProperty( curr, EYE.numValues ).nextNode();
int maxCard = strToInt( maxCardR.asNode().getLiteralLexicalForm() );
int numVals = strToInt( numValsR.asNode().getLiteralLexicalForm() );
NodeIterator it1b = m.listObjectsOfProperty( m.createResource( type.asNode().getURI() ), RDFS.subClassOf );
while (it1b.hasNext() )
{
b = it1b.nextNode();
try
{
if ( b.isAnon() )
{
if ( m.listObjectsOfProperty( m.createResource( b.asNode().getBlankNodeId() ), OWL.onProperty ).nextNode().equals( prop ) )
break;
}
else
if ( m.listObjectsOfProperty( m.createResource( b.asNode().getURI() ), OWL.onProperty ).nextNode().equals( prop ) )
break;
}
catch (java.util.NoSuchElementException e)
{ // Not all statements returned are going to match the search above;
} // don't complain / warn about it!
}
// This looks misleading, but it will not be called if numVals > maxCard and owl:maxCardinality is not specified in the model!
if ( numVals > maxCard )
{ // Increase owl:maxCardinality as needed, unless we can remove some invalid type declarations...
// Get the rdfs:members of this failure's eye:values eye:Set
List<String> types = new ArrayList<String>();
List<Integer> typeCount = new ArrayList<Integer>();
NodeIterator it1c = repair.listObjectsOfProperty( repair.createResource( repair.listObjectsOfProperty( curr, EYE.values ).nextNode().asNode().getBlankNodeId() ), RDFS.member);
String defaultURI = "http://www.w3.org/2001/XMLSchema#String"; // This will be used later too (config file it??)
while ( it1c.hasNext() )
{
RDFNode member = it1c.nextNode();
String uri = member.asNode().getLiteralDatatypeURI();
if ( uri == null )
uri = defaultURI; // Default datatype URI
if ( types.contains( uri ) )
{