private static void runQueryOnClass(List<ConstraintViolation> results, Query arq, org.topbraid.spin.model.Query spinQuery, String label, Model model, Resource cls, Map<String,RDFNode> initialBindings, boolean thisUnbound, Resource source, List<SPINStatistics> stats, ProgressMonitor monitor, SPINModuleRegistry registry) {
		if(thisUnbound || model.contains(null, RDF.type, cls)) {
			QueryExecution qexec = ARQFactory.get().createQueryExecution(arq, model);
			QuerySolutionMap arqBindings = new QuerySolutionMap();
			if(!thisUnbound) {
				arqBindings.add(SPINUtil.TYPE_CLASS_VAR_NAME, cls);
			}
			if(initialBindings != null) {
				for(String varName : initialBindings.keySet()) {
					RDFNode value = initialBindings.get(varName);
					arqBindings.add(varName, value);
				}
			}
			qexec.setInitialBinding(arqBindings);
			
			if(monitor != null) {
				monitor.subTask("Checking SPIN constraint on " + SPINLabels.get().getLabel(cls));
			}
			
			long startTime = System.currentTimeMillis();
			Model cm = ModelFactory.createDefaultModel(ReificationStyle.Minimal);
			qexec.execConstruct(cm);
			qexec.close();
			long endTime = System.currentTimeMillis();
			if(stats != null) {
				long duration = endTime - startTime;
				String queryText = SPINLabels.get().getLabel(spinQuery);
				if(label == null) {
					label = queryText;
				}
				stats.add(new SPINStatistics(label, queryText, duration, startTime, cls.asNode()));
			}
			addConstructedProblemReports(cm, results, model, cls, null, label, source, registry);
		}
	}