Dario - 2014-07-31

Instead of changing GraphMLReader, let's say you have a particular GraphMLMetadata you want to apply.
After the load, the GraphMLReader has GraphMLMetadata, including a Transformer that can transform a particular object to the String the reader has read. If you have a SettableTransformer you want to use, you can use a method like this (for graph, you can use Collections.singleton(yourGraph))

private <t> void applyMetadata (Map<string, graphmlmetadata\<t="">> readMetadata,
Map<string, graphmlmetadata\<t="">> customMetadata, Collection<t> target){
if (customMetadata == null){
// there's no way to set the elements
return;
}
for (Entry<string, graphmlmetadata\<t="">> entrada : readMetadata.entrySet()){
GraphMLMetadata<t> custom = customMetadata.get(entrada.getKey());
if (custom != null){
// there's metadata for this field
if (custom.transformer instanceof SettableTransformer){
// there's a way to set the information
SettableTransformer<t, string=""> customTransformer = (SettableTransformer<t, string="">) custom.transformer;
Transformer<t, string=""> readedTransformer = entrada.getValue().transformer;</t,></t,></t,></t></string,></t></string,></string,></t>

                for (T t : target){
                    customTransformer.set(t, readedTransformer.transform(t));
                }
            }
        }
    }
}