org.jrdf.graph.global.molecule
Interface BlankNodeMapper

All Known Implementing Classes:
BlankNodeMapperImpl

public interface BlankNodeMapper

Creates a map of blank nodes from one molecule to another. There must be at least as many blank nodes in the first molecule as in the second one in order for a map to be created. Used in conjunection with GraphDecomposer

Version:
$Id: BlankNodeMapper.java 2894 2009-01-27 21:25:13Z newmana $
Author:
Andrew Newman, Yuan-Fang Li

Method Summary
 Map<BlankNode,BlankNode> createMap(Molecule m1, Molecule m2)
          Given molecules m1 and m2, try to find a blank node map for m2 inside m1, so this method isn't symmetrical.
 

Method Detail

createMap

Map<BlankNode,BlankNode> createMap(Molecule m1,
                                   Molecule m2)
Given molecules m1 and m2, try to find a blank node map for m2 inside m1, so this method isn't symmetrical. If m1's root triple size is smaller than m2's root triple size (m1 doesn't subsumes m2), an empty map is returned.

Potential optimizations: 1. By recording no. of unique blank nodes on each level, the non-subsumption may be detected faster. 2. By recording no. of levels of submolecules, the non-subsumption may be detected faster.

Parameters:
m1 -
m2 -
Returns:
the populated map or empty map if there is no mapping.