TripleIteratorFactory.defaultInstance().fromStream(new ByteArrayInputStream(rdf), null,
RDFFormat.RDF_XML);
boolean found = false;
while (it.hasNext()) {
Triple t = it.next();
sb.append(t.getSubject().stringValue() + ", ");
sb.append(t.getPredicate().stringValue() + ", ");
sb.append(t.getObject().stringValue() + "\n");
sb.append("matching: " + s + " " + t.getSubject().stringValue()
+ " " + (s.equals(t.getSubject().stringValue())) + "\n");
sb.append("matching: " + p + " " + t.getPredicate().stringValue()
+ " " + (p.equals(t.getPredicate().stringValue())) + "\n");
sb.append("matching: " + o + " " + t.getObject().stringValue()
+ " " + (o.equals(t.getObject().stringValue())) + "\n");
if (s.equals(t.getSubject().stringValue())
&& p.equals(t.getPredicate().stringValue())
&& o.equals(t.getObject().stringValue())) {
sb.append("Matched\n");
found = true;
}
}