org.openrdf.sesame.sail
Class SailUtil

java.lang.Object
  extended byorg.openrdf.sesame.sail.SailUtil

public class SailUtil
extends Object

Defines utility methods for working with Sails.

Version:
$Revision: 1.6.4.2 $
Author:
Arjohn Kampman

Constructor Summary
SailUtil()
           
 
Method Summary
static Sail findSailInStack(Sail topSail, Class sailClass)
          Searches a stack of Sails from top to bottom for a Sail that is an instance of the suppied class or interface.
static boolean isSubset(RdfSource rdfSource1, RdfSource rdfSource2)
          Compares the models of two RdfSource objects and returns true if rdfSource1 is a subset of rdfSource2.
static boolean modelsEqual(RdfSource rdfSource1, RdfSource rdfSource2)
          Compares the models of two RdfSource objects and returns true if they are equal.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SailUtil

public SailUtil()
Method Detail

findSailInStack

public static Sail findSailInStack(Sail topSail,
                                   Class sailClass)
Searches a stack of Sails from top to bottom for a Sail that is an instance of the suppied class or interface. The first Sail that matches (i.e. the one closest to the top) is returned.

Parameters:
topSail - The top of the Sail stack.
sailClass - A class or interface.
Returns:
A Sail that is an instance of sailClass, or null if no such Sail was found.

modelsEqual

public static boolean modelsEqual(RdfSource rdfSource1,
                                  RdfSource rdfSource2)
Compares the models of two RdfSource objects and returns true if they are equal. Models are equal if they contain the same set of statements. bNodes IDs are not relevant for model equality, they are mapped from one model to the other by using the attached properties.


isSubset

public static boolean isSubset(RdfSource rdfSource1,
                               RdfSource rdfSource2)
Compares the models of two RdfSource objects and returns true if rdfSource1 is a subset of rdfSource2.



Copyright © 2002-2006 Aduna BV, GNU LGPL License applies.