remove.open();
ClosableIterator<Statement> it = model.iterator();
while(it.hasNext()) {
Statement stmt = it.next();
Resource s = stmt.getSubject();
URI p = stmt.getPredicate();
Node o = stmt.getObject();
boolean match = false;
if(s instanceof URI && s.asURI().toString().startsWith(searchURIPrefix)) {
match = true;
String sURI = s.asURI().toString().replace(searchURIPrefix, replaceURIPrefix);
s = new URIImpl(sURI);
}
if(p.toString().startsWith(searchURIPrefix)) {
match = true;
String pURI = p.toString().replace(searchURIPrefix, replaceURIPrefix);