protected void addPageMetadata(Context context,
HypermediaControls controller, PrefixMapping prefixes) {
try {
Model metadataModel = ModelFactory.createDefaultModel();
for (Dataset dataset: config.getDatasets()) {
MetadataConfiguration metadata = dataset.getMetadataConfiguration();
Resource document = metadata.addMetadataFromTemplate(metadataModel, controller);
// Replaced the commented line by the following one because the
// RDF graph we want to talk about is a specific representation
// of the data identified by the getDataURL() URI.
// Olaf, May 28, 2010
// context.put("metadata", metadata.getResource(resource.getDataURL()));