Class TripleOrdering

  • All Implemented Interfaces:
    Comparator<org.apache.jena.graph.Triple>

    public class TripleOrdering
    extends Object
    implements Comparator<org.apache.jena.graph.Triple>
    Comparator to sort a list of Quads by subject, predicate, and object to ensure a consistent order for human-readable output
    Author:
    awoods
    • Constructor Detail

      • TripleOrdering

        public TripleOrdering​(org.apache.jena.shared.PrefixMapping prefixMapping)
        When sorting predicates, take into account the given PrefixMapping
        Parameters:
        prefixMapping - the prefix mapping
    • Method Detail

      • compare

        public int compare​(org.apache.jena.graph.Triple left,
                           org.apache.jena.graph.Triple right)
        Specified by:
        compare in interface Comparator<org.apache.jena.graph.Triple>