StmtIterator it = tplModel.listStatements();
while (it.hasNext()) {
Statement stmt = it.nextStatement();
Resource subj = stmt.getSubject();
Property pred = stmt.getPredicate();
RDFNode obj = stmt.getObject();
try {
if (subj.toString().contains(metadataPlaceholderURIPrefix)){
subj = (Resource) parsePlaceholder(subj, controller, currentTime, currentDocRepr);
if (subj == null) {
// create a unique blank node with a fixed id.
subj = getModel().createResource(new AnonId(String.valueOf(stmt.getSubject().hashCode())));
}
}
if (obj.toString().contains(metadataPlaceholderURIPrefix)){
obj = parsePlaceholder(obj, controller, currentTime, currentDocRepr);
}
// only add statements with some objects
if (obj != null) {