com.hp.hpl.mesa.rdf.jena.rdb
Interface IConstraints

All Known Implementing Classes:
ConstraintsGeneric

public interface IConstraints

Interface for objects which apply a set of additional constraints to a listStatements operation. These are generated by factory methods on the driver IRDBDriver.createConstraints(com.hp.hpl.mesa.rdf.jena.rdb.ModelRDB) since different database layouts may require different constraint implementations.

Version:
$Revision: 1.2 $ on $Date: 2001/11/26 18:20:09 $
Author:
Dave Reynolds

Method Summary
 IConstraints addIntConstraint(java.lang.String op, int constraint)
          Add a constraint that the object field should match the given integer literal using the sql comparison operator op - examples include "≥" and "≤=".
 IConstraints addObjectConstraint(Literal l)
          Add a constraint that the object field should match the given literal exactly
 IConstraints addObjectConstraint(Resource r)
          Add a constraint that the object field should match the given resource
 IConstraints addPropertyConstraint(Resource r)
          Add a constraint that the property field should match the given resource
 IConstraints addStringConstraint(java.lang.String op, java.lang.String constraint)
          Add a constraint that the object field should match the given string literal using the sql comparison operator op - such as "LIKE" or "NOT LIKE"
 IConstraints addSubjectConstraint(Resource r)
          Add a constraint that the subject field should match the given resource
 IConstraints reset()
          Clear all constraints
 ResultSetIterator runQuery(IRDBDriver driver, ModelRDB m)
          Execute the query implied by this set of constraints against the statements in the given model.
 

Method Detail

addSubjectConstraint

public IConstraints addSubjectConstraint(Resource r)
                                  throws RDFException
Add a constraint that the subject field should match the given resource

addPropertyConstraint

public IConstraints addPropertyConstraint(Resource r)
                                   throws RDFException
Add a constraint that the property field should match the given resource

addObjectConstraint

public IConstraints addObjectConstraint(Resource r)
                                 throws RDFException
Add a constraint that the object field should match the given resource

addObjectConstraint

public IConstraints addObjectConstraint(Literal l)
                                 throws RDFException
Add a constraint that the object field should match the given literal exactly

addStringConstraint

public IConstraints addStringConstraint(java.lang.String op,
                                        java.lang.String constraint)
Add a constraint that the object field should match the given string literal using the sql comparison operator op - such as "LIKE" or "NOT LIKE"

addIntConstraint

public IConstraints addIntConstraint(java.lang.String op,
                                     int constraint)
Add a constraint that the object field should match the given integer literal using the sql comparison operator op - examples include "≥" and "≤=".

reset

public IConstraints reset()
Clear all constraints

runQuery

public ResultSetIterator runQuery(IRDBDriver driver,
                                  ModelRDB m)
                           throws RDFException
Execute the query implied by this set of constraints against the statements in the given model.


Copyright 2001 Hewlett-Packard. All Rights Reserved.