code: public List<Triple> getSortedTriples(final Model model, final Iterator<Triple> it) {
          final List<Triple> triples = newArrayList(it);
          triples.sort(new TripleOrdering(model));
          return triples;
      }
docs: Sort a Iterator of Triples alphabetically by its subject, predicate, and
  object
  
  @param model the model
  @param it the iterator of triples
  @return iterator of alphabetized triples