Class OrderThenPathLocalNameComparator

java.lang.Object
org.topbraid.shacl.util.OrderThenPathLocalNameComparator
All Implemented Interfaces:
Comparator<org.apache.jena.rdf.model.Resource>

public class OrderThenPathLocalNameComparator extends Object implements Comparator<org.apache.jena.rdf.model.Resource>
A Comparator that uses sh:order triples of the given resources in ascending order (defaulting to 0). If the order is identical, it compares the local names of the sh:path values. This is commonly used to sort sh:Parameters.
Author:
Holger Knublauch
  • Constructor Details

    • OrderThenPathLocalNameComparator

      public OrderThenPathLocalNameComparator()
  • Method Details

    • get

      public static OrderThenPathLocalNameComparator get()
    • compare

      public int compare(org.apache.jena.rdf.model.Resource subject1, org.apache.jena.rdf.model.Resource subject2)
      Specified by:
      compare in interface Comparator<org.apache.jena.rdf.model.Resource>