org.daml.rdf.jena.mem
Class SourceStoreMem

java.lang.Object
  |
  +--com.hp.hpl.mesa.rdf.jena.common.StoreCom
        |
        +--org.daml.rdf.jena.mem.StoreMem
              |
              +--org.daml.rdf.jena.mem.SourceStoreMem
All Implemented Interfaces:
SourceStore, com.hp.hpl.mesa.rdf.jena.common.Store
Direct Known Subclasses:
DynamicSourceStoreMem

public class SourceStoreMem
extends StoreMem
implements SourceStore

Implementation of a memory based triple store that keeps track of the source for each statement.


Nested Class Summary
protected  class SourceStoreMem.SourceMap
           
 
Nested classes inherited from class org.daml.rdf.jena.mem.StoreMem
StoreMem.NodeMap
 
Constructor Summary
SourceStoreMem()
           
SourceStoreMem(Source source)
           
 
Method Summary
 void add(com.hp.hpl.mesa.rdf.jena.model.Statement s)
           
 void add(com.hp.hpl.mesa.rdf.jena.model.Statement s, Source source)
          Add a statement associated with a source.
 Source createSource(java.lang.String uri)
          Create a new source.
 Source getDefaultSource()
          Get the default source that is used when adding a statement.
 Source getSource(com.hp.hpl.mesa.rdf.jena.model.Statement s)
          Return the store of a statement.
 java.util.Iterator listBySource(Source source)
          Return an iterator over all the statements with a given source.
 java.util.Iterator listSources()
          Return an iterator over all the sources in the store.
 void remove(com.hp.hpl.mesa.rdf.jena.model.Statement s)
           
 void setDefaultSource(Source source)
          Set the default source that is used when adding a statement.
 void setSource(com.hp.hpl.mesa.rdf.jena.model.Statement s, Source source)
          Change the source of a statement.
 
Methods inherited from class org.daml.rdf.jena.mem.StoreMem
contains, contains, getProperty, getResource, list, list, listByObject, listByPredicate, listBySubject, listNameSpaces, listSubjects, size
 
Methods inherited from class com.hp.hpl.mesa.rdf.jena.common.StoreCom
close, createAlt, createAlt, createBag, createBag, createProperty, createProperty, createResource, createResource, createSeq, createSeq, createStatement, getAlt, getAlt, getBag, getBag, getProperty, getProperty, getSeq, getSeq, getStatement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.hp.hpl.mesa.rdf.jena.common.Store
close, contains, contains, createAlt, createAlt, createBag, createBag, createProperty, createProperty, createResource, createResource, createSeq, createSeq, createStatement, getAlt, getAlt, getBag, getBag, getProperty, getProperty, getProperty, getResource, getSeq, getSeq, getStatement, list, list, listByObject, listByPredicate, listBySubject, listNameSpaces, listSubjects, size
 

Constructor Detail

SourceStoreMem

public SourceStoreMem(Source source)

SourceStoreMem

public SourceStoreMem()
Method Detail

add

public void add(com.hp.hpl.mesa.rdf.jena.model.Statement s,
                Source source)
         throws com.hp.hpl.mesa.rdf.jena.model.RDFException
Add a statement associated with a source. TBD: What to do if statement already belongs to store, but with a different source?

Specified by:
add in interface SourceStore
com.hp.hpl.mesa.rdf.jena.model.RDFException

listBySource

public java.util.Iterator listBySource(Source source)
Return an iterator over all the statements with a given source.

Specified by:
listBySource in interface SourceStore

getSource

public Source getSource(com.hp.hpl.mesa.rdf.jena.model.Statement s)
Return the store of a statement.

Specified by:
getSource in interface SourceStore

listSources

public java.util.Iterator listSources()
Return an iterator over all the sources in the store.

Specified by:
listSources in interface SourceStore

setDefaultSource

public void setDefaultSource(Source source)
Set the default source that is used when adding a statement.

Specified by:
setDefaultSource in interface SourceStore

getDefaultSource

public Source getDefaultSource()
Get the default source that is used when adding a statement.

Specified by:
getDefaultSource in interface SourceStore

setSource

public void setSource(com.hp.hpl.mesa.rdf.jena.model.Statement s,
                      Source source)
Change the source of a statement.

Specified by:
setSource in interface SourceStore

createSource

public Source createSource(java.lang.String uri)
Create a new source.

Specified by:
createSource in interface SourceStore

add

public void add(com.hp.hpl.mesa.rdf.jena.model.Statement s)
         throws com.hp.hpl.mesa.rdf.jena.model.RDFException
Specified by:
add in interface com.hp.hpl.mesa.rdf.jena.common.Store
Overrides:
add in class StoreMem
com.hp.hpl.mesa.rdf.jena.model.RDFException

remove

public void remove(com.hp.hpl.mesa.rdf.jena.model.Statement s)
            throws com.hp.hpl.mesa.rdf.jena.model.RDFException
Specified by:
remove in interface com.hp.hpl.mesa.rdf.jena.common.Store
Overrides:
remove in class StoreMem
com.hp.hpl.mesa.rdf.jena.model.RDFException