internal static void run(SpinWrapperDataset model, List <ConstraintViolation> results, List <SPINStatistics> stats, IProgressMonitor monitor) { if (monitor != null) { monitor.setTaskName("Preparing SPIN Constraints"); } Dictionary <IResource, List <CommandWrapper> > class2Query = SPINQueryFinder.GetClass2QueryMap(model.spinProcessor._spinConfiguration, model, SPIN.constraint, true, true); if (monitor != null) { int totalWork = 0; foreach (IResource cls in class2Query.Keys) { List <CommandWrapper> arqs = class2Query[cls]; totalWork += arqs.Count; } monitor.beginTask("Checking SPIN Constraints on " + class2Query.Keys.Count + " classes", totalWork); } foreach (IResource cls in class2Query.Keys) { List <CommandWrapper> arqs = class2Query[cls]; foreach (CommandWrapper arqWrapper in arqs) { QueryWrapper queryWrapper = (QueryWrapper)arqWrapper; //TODO remove references to the SparqlParameterizedString since it will be rewritten on the fly to adapt to the current model situation SparqlParameterizedString arq = queryWrapper.getQuery(); String label = arqWrapper.getLabel(); if (queryWrapper.getSPINQuery() is IAsk) { arq = convertAskToConstruct(arq, queryWrapper.getSPINQuery(), label); } runQueryOnClass(results, arq, queryWrapper.getSPINQuery(), label, model, cls, queryWrapper.getTemplateBinding(), arqWrapper.isThisUnbound(), arqWrapper.isThisDeep(), arqWrapper.getSource(), stats, monitor); if (monitor != null) { monitor.worked(1); if (monitor.isCanceled()) { return; } } } if (monitor != null) { monitor.worked(1); } } }
public virtual void setTaskName(string name) { monitor.setTaskName(name); }
public void setTaskName(String name) { monitor.setTaskName(name); }