org.jrdf.graph.global.molecule
Interface MergeSubmolecules

All Known Implementing Classes:
MergeSubmoleculesImpl

public interface MergeSubmolecules

This takes two molecules and merges them. This assumes that they are within a molecule each and the merging is usually done bottom-up (nodes first) and that the first molecule subsumes the second. Molecule subsumption does not require all properties to be subsumed but merely that there are the same or greater number of unique blank nodes as subjects.

Version:
$Id: MergeSubmolecules.java 2894 2009-01-27 21:25:13Z newmana $
Author:
Andrew Newman

Method Summary
 Molecule merge(Molecule molecule1, Molecule molecule2)
          Merge two molecules together.
 Molecule merge(Triple triple, Molecule molecule1, Molecule molecule2)
          Merge two molecules together which share a head triple.
 

Method Detail

merge

Molecule merge(Molecule molecule1,
               Molecule molecule2)
Merge two molecules together.

Parameters:
molecule1 - this is the molecule which subsumes the second.
molecule2 - the molecule to be merged (it may contain additional properties).
Returns:
the merged molecule.

merge

Molecule merge(Triple triple,
               Molecule molecule1,
               Molecule molecule2)
Merge two molecules together which share a head triple.

Parameters:
triple - the shared triple across both molecules.
molecule1 - this is the molecule which subsumes the second.
molecule2 - the molecule to be merged (it may contain additional properties).
Returns:
the merged molecule.