Fixes #40 Fixes #7 
RDFGraph.getSortedTriplesForSubject throws exception in Java7
IllegalArgumentException thrown when serializing to RDF/XML
using JDK 7

The compare method needs revisiting still.