Class IsoMatcher

java.lang.Object
org.apache.jena.sparql.util.IsoMatcher

public class IsoMatcher extends Object
Simple isomorphism testing for on unordered collections. This code is simple and slow. For graphs, the Graph isomorphism code in Jena is much better (better tested, better performance) This code can work on any tuples of nodes. See Iso for isomorphism for ordered lists. See IsoAlg for the isomorphism algorithm.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    isomorphic(Collection<org.apache.jena.atlas.lib.tuple.Tuple<org.apache.jena.graph.Node>> x1, Collection<org.apache.jena.atlas.lib.tuple.Tuple<org.apache.jena.graph.Node>> x2)
    Collection of tuples isomorphism
    static boolean
    isomorphic(Collection<org.apache.jena.atlas.lib.tuple.Tuple<org.apache.jena.graph.Node>> x1, Collection<org.apache.jena.atlas.lib.tuple.Tuple<org.apache.jena.graph.Node>> x2, EqualityTest nodeTest)
    Collection of tuples isomorphism, with choice of when two nodes are "equal".
    static boolean
    isomorphic(org.apache.jena.graph.Graph g1, org.apache.jena.graph.Graph g2)
    Graph isomorphism
    static boolean
    Dataset isomorphism
    static List<org.apache.jena.atlas.lib.tuple.Tuple<org.apache.jena.graph.Node>>
    Helper - convert to List<Tuple<Node>>

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IsoMatcher

      public IsoMatcher()
  • Method Details

    • isomorphic

      public static boolean isomorphic(org.apache.jena.graph.Graph g1, org.apache.jena.graph.Graph g2)
      Graph isomorphism
    • isomorphic

      public static boolean isomorphic(DatasetGraph dsg1, DatasetGraph dsg2)
      Dataset isomorphism
    • isomorphic

      public static boolean isomorphic(Collection<org.apache.jena.atlas.lib.tuple.Tuple<org.apache.jena.graph.Node>> x1, Collection<org.apache.jena.atlas.lib.tuple.Tuple<org.apache.jena.graph.Node>> x2)
      Collection of tuples isomorphism
    • tuplesQuads

      public static List<org.apache.jena.atlas.lib.tuple.Tuple<org.apache.jena.graph.Node>> tuplesQuads(Iterator<Quad> iter)
      Helper - convert to List<Tuple<Node>>
    • isomorphic

      public static boolean isomorphic(Collection<org.apache.jena.atlas.lib.tuple.Tuple<org.apache.jena.graph.Node>> x1, Collection<org.apache.jena.atlas.lib.tuple.Tuple<org.apache.jena.graph.Node>> x2, EqualityTest nodeTest)
      Collection of tuples isomorphism, with choice of when two nodes are "equal". See also IsoAlg.isIsomorphic(Collection, Collection, org.apache.jena.sparql.util.Iso.Mappable, EqualityTest) for isomorphisms testing for more than just blank nodes.