protected boolean printTemplates(PrintContext p, Property predicate, String keyword, boolean force, Resource graphIRI, SPINModuleRegistry registry) {
		List<RDFNode> nodes = getList(predicate);
		if(!nodes.isEmpty() || force) {
			if(keyword != null) {
				p.printIndentation(p.getIndentation());
				p.printKeyword(keyword);
				p.print(" ");
			}
			p.print(" {");
			p.println();
			if(graphIRI != null) { // Legacy triple
				p.setIndentation(p.getIndentation() + 1);
				p.printIndentation(p.getIndentation());
				p.printKeyword("GRAPH");
				p.print(" ");
				printVarOrResource(p, graphIRI, registry);
				p.print(" {");
				p.println();
			}
			for(RDFNode node : nodes) {
				p.printIndentation(p.getIndentation() + 1);
				if(node.canAs(NamedGraph.class)) {
					NamedGraph namedGraph = node.as(NamedGraph.class);
					p.setIndentation(p.getIndentation() + 1);
					namedGraph.print(p, registry);
					p.setIndentation(p.getIndentation() - 1);
				}
				else {
					TripleTemplate template = node.as(TripleTemplate.class);
					template.print(p, registry);
				}
				p.print(" .");
				p.println();
			}
			if(graphIRI != null) {
				p.printIndentation(p.getIndentation());
				p.setIndentation(p.getIndentation() - 1);
				p.print("}");
				p.println();
			}
			p.printIndentation(p.getIndentation());
			p.print("}");
			return true;
		}
		else {
			return false;
		}
	}