/** * Create instance triples corresponding towards a Quality Report * * @param computedOn - The resource URI of the dataset computed on * @param problemCollection - A list of quality problem collections * */ public void addToQualityProblemReport(ProblemCollection<?> problemCollection){ this.m.add(new StatementImpl(this.reportURI, QPRO.hasProblem, problemCollection.getProblemURI())); this.m.add(problemCollection.getDataset().getNamedModel(problemCollection.getNamedGraph())); problemCollection.cleanup(); }
/** * Create instance triples corresponding towards a Quality Report * * @param computedOn - The resource URI of the dataset computed on * @param problemCollection - A list of quality problem collections * */ public void addToQualityProblemReport(ProblemCollection<?> problemCollection){ Resource problemURI = problemCollection.getProblemURI(); this.m.add(new StatementImpl(this.reportURI, QPRO.hasProblem, problemURI)); Dataset d = problemCollection.getDataset(); try { d.begin(ReadWrite.READ); problemCollection.getReentrantLock().lock(); Model _m = d.getNamedModel(problemCollection.getNamedGraph()); RDFDataMgr.write(this.serialisationOutput, _m, RDFFormat.TURTLE_PRETTY); } finally { problemCollection.getReentrantLock().unlock(); d.end(); d.close(); } problemCollection.cleanup(); }