public class GraphMatcher extends Object
| Constructor and Description | 
|---|
| GraphMatcher() | 
| Modifier and Type | Method and Description | 
|---|---|
| static Map<BlankNode,BlankNode> | getValidMapping(Graph og1,
               Graph og2)get a mapping from g1 to g2 or null if the graphs are not isomorphic. | 
public static Map<BlankNode,BlankNode> getValidMapping(Graph og1, Graph og2)
BNodes from g1 to one
 of g2. If the graphs are ground graphs the method return an empty map if
 the ImmutableGraph are equals and null otherwise.
 
 NOTE: This method does not returned mapping from blank nodes to grounded
 nodes, a bnode in g1 is not a vraiable that may match any node, but must
 match a bnode in g2.
 
 
 On the algorithm:
 - In a first step it checked if every grounded triple in g1 matches one
 in g2
 - [optional] blank node blind matching
 - in a map mbng1 bnode of g1 is mapped to a set of of its
 properties and inverse properties, this is the predicate and the object
 or subject respectively, analoguosly in mbgn2 every bnode of g2
 - based on the incoming and outgoing properties a hash is calculated for
 each bnode, in the first step when calculating the hash  aconstant value
 is taken for the bnodes that might be subject or object in the (inverse properties)
 - hash-classes:
g1 - g2 - Copyright © 2015–2022 The Apache Software Foundation. All rights reserved.