com.hp.hpl.mesa.rdf.jena.bdb
Class ModelBdb

java.lang.Object
  |
  +--com.hp.hpl.mesa.rdf.jena.common.ModelCom
        |
        +--com.hp.hpl.mesa.rdf.jena.bdb.ModelBdb
All Implemented Interfaces:
Model, ModelCon, ModelI, RDFReaderF, RDFWriterF

public class ModelBdb
extends ModelCom
implements Model, ModelI

A BerkeleyDB implemenation of an RDF model.

This implementation of the RDF API stores its all its data in a Berkeley DB store

Version:
Release='$Name: $' Revision='$Revision: 1.2 $' Date='$Date: 2001/09/25 14:52:09 $'
Author:
bwm

Constructor Summary
ModelBdb(StoreFactory sf)
          Construct an RDF model based based a Berkeley DB store.
 
Method Summary
 Model difference(Model model)
          Create a new model containing all the statements in this model which are not in another.
 Model intersection(Model model)
          Create a new model containing all the statements which are in both this model and another.
 Model query(Selector selector)
          Create a new model containing the statements matching a query.
 boolean supportsSetOperations()
          Determine whether this model supports set operations.
 boolean supportsTransactions()
          Determine whether this model supports transactions.
 Model union(Model model)
          Create a new model containing all the statements in this model together with all of those in another given model.
 
Methods inherited from class com.hp.hpl.mesa.rdf.jena.common.ModelCom
abort, add, add, add, add, add, add, add, add, add, add, add, add, add, add, begin, close, commit, containerContains, containerIndexOf, containerSize, contains, contains, contains, contains, contains, contains, contains, contains, contains, contains, contains, containsAll, containsAll, containsAny, containsAny, convert, convert, convert, createAlt, createAlt, createBag, createBag, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createProperty, createProperty, createResource, createResource, createResource, createResource, createResource, createResource, createSeq, createSeq, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, equals, getAlt, getAlt, getBag, getBag, getProperty, getProperty, getProperty, getReader, getReader, getResource, getResource, getSeq, getSeq, getWriter, getWriter, independent, isReified, listContainerMembers, listNameSpaces, listObjects, listObjectsOfProperty, listObjectsOfProperty, listReifiedStatements, listStatements, listStatements, listSubjects, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, read, read, read, read, remove, remove, remove, setReaderClassName, setWriterClassName, size, write, write, write
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.hp.hpl.mesa.rdf.jena.model.Model
abort, add, add, add, begin, close, commit, contains, contains, contains, containsAll, containsAll, containsAny, containsAny, createLiteral, createLiteral, createProperty, createResource, createResource, createStatement, equals, getProperty, getProperty, getResource, independent, isReified, listNameSpaces, listObjects, listObjectsOfProperty, listObjectsOfProperty, listReifiedStatements, listStatements, listStatements, listSubjects, listSubjectsWithProperty, listSubjectsWithProperty, read, read, read, read, remove, size, write, write, write
 
Methods inherited from interface com.hp.hpl.mesa.rdf.jena.model.ModelCon
add, add, add, add, add, add, add, add, add, add, add, contains, contains, contains, contains, contains, contains, contains, contains, createAlt, createAlt, createBag, createBag, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createProperty, createResource, createResource, createResource, createResource, createSeq, createSeq, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, getAlt, getAlt, getBag, getBag, getProperty, getResource, getSeq, getSeq, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, remove, remove
 
Methods inherited from interface com.hp.hpl.mesa.rdf.jena.model.RDFReaderF
getReader, getReader, setReaderClassName
 
Methods inherited from interface com.hp.hpl.mesa.rdf.jena.model.RDFWriterF
getWriter, getWriter, setWriterClassName
 
Methods inherited from interface com.hp.hpl.mesa.rdf.jena.common.ModelI
containerContains, containerIndexOf, containerSize, convert, convert, convert, listContainerMembers
 

Constructor Detail

ModelBdb

public ModelBdb(StoreFactory sf)
         throws RDFException
Construct an RDF model based based a Berkeley DB store.
Parameters:
sf - A factory object which will be called once to return a Berkeley DB store which the model will use to store its data.
Throws:
RDFException - A generic RDF exception should anything go wrong.
Method Detail

supportsTransactions

public boolean supportsTransactions()
Description copied from interface: Model
Determine whether this model supports transactions.
Specified by:
supportsTransactions in interface Model
Following copied from interface: com.hp.hpl.mesa.rdf.jena.model.Model
Returns:
true if this model supports transactions.

supportsSetOperations

public boolean supportsSetOperations()
Description copied from interface: Model
Determine whether this model supports set operations.
Specified by:
supportsSetOperations in interface Model
Following copied from interface: com.hp.hpl.mesa.rdf.jena.model.Model
Returns:
true if this model supports set operations.

query

public Model query(Selector selector)
            throws RDFException
Description copied from interface: Model
Create a new model containing the statements matching a query.

A statment is considered to match if the test method of s returns true when called on s.

Specified by:
query in interface Model
Following copied from interface: com.hp.hpl.mesa.rdf.jena.model.Model
Parameters:
s - A selector object.
Returns:
an iterator over the matching statements
Throws:
RDFException - Generic RDF exception.

union

public Model union(Model model)
            throws RDFException
Description copied from interface: Model
Create a new model containing all the statements in this model together with all of those in another given model.
Specified by:
union in interface Model
Following copied from interface: com.hp.hpl.mesa.rdf.jena.model.Model
Parameters:
model - The other model whose statements are to be included.
Returns:
A new model containing all the statements that are in either model
Throws:
RDFException - Generic RDF Exception

intersection

public Model intersection(Model model)
                   throws RDFException
Description copied from interface: Model
Create a new model containing all the statements which are in both this model and another. As models are sets of statements, a statement contained in both models will only appear once in the resulting model.
Specified by:
intersection in interface Model
Following copied from interface: com.hp.hpl.mesa.rdf.jena.model.Model
Parameters:
model - The other model.
Returns:
A new model containing all the statements that are in both models.
Throws:
RDFException - Generic RDF Exception

difference

public Model difference(Model model)
                 throws RDFException
Description copied from interface: Model
Create a new model containing all the statements in this model which are not in another.
Specified by:
difference in interface Model
Following copied from interface: com.hp.hpl.mesa.rdf.jena.model.Model
Parameters:
model - the other model whose statements are to be excluded.
Returns:
a new model containing all the statements in this model that are not in the given model.
Throws:
RDFException - Generic RDF Exception


Copyright 2001 Hewlett-Packard. All Rights Reserved.