private void createBackLinkViolation(String subjectURI, String resource) { Model m = ModelFactory.createDefaultModel(); Resource subject = m.createResource(resource); m.add(new StatementImpl(subject, QPRO.exceptionDescription, DQM.NoBackLink)); RDFNode violatedTriple = Commons.generateRDFBlankNode(); m.add( new StatementImpl(violatedTriple.asResource(), RDF.subject, m.createResource(subjectURI))); m.add(new StatementImpl(subject, DQM.hasViolatingTriple, violatedTriple)); this._problemList.add(m); }
private void createViolatingTriple(Statement stmt, String resource) { Model m = ModelFactory.createDefaultModel(); Resource subject = m.createResource(resource); m.add(new StatementImpl(subject, QPRO.exceptionDescription, DQM.ViolatingTriple)); RDFNode violatedTriple = Commons.generateRDFBlankNode(); m.add(new StatementImpl(violatedTriple.asResource(), RDF.type, RDF.Statement)); m.add(new StatementImpl(violatedTriple.asResource(), RDF.subject, stmt.getSubject())); m.add(new StatementImpl(violatedTriple.asResource(), RDF.predicate, stmt.getPredicate())); m.add(new StatementImpl(violatedTriple.asResource(), RDF.object, stmt.getObject())); m.add(new StatementImpl(subject, DQM.hasViolatingTriple, violatedTriple)); this._problemList.add(m); }