org.ontoware.rdf2go.model
Interface ModelAddRemove

All Superinterfaces:
ClosableIterable<Statement>, java.lang.Iterable<Statement>, Lockable, ModelWriter
All Known Subinterfaces:
Diff, Model, ModelRemovePatterns

public interface ModelAddRemove
extends ClosableIterable<Statement>, ModelWriter, Lockable

Can remove statements and apply diffs in one atomic operation.

Author:
voelkel

Method Summary
 Diff getDiff(java.util.Iterator<? extends Statement> statements)
           
 void removeAll()
          Removes all statements from this model.
 void removeAll(java.util.Iterator<? extends Statement> statements)
          Removes all statements contained in 'other' from this model = 'difference'
 void removeStatement(Resource subject, URI predicate, Node object)
          remove a (subject, property ,object)-statement from the model
 void removeStatement(Resource subject, URI predicate, java.lang.String literal)
           
 void removeStatement(Resource subject, URI predicate, java.lang.String literal, java.lang.String languageTag)
          remove a (subject, property ,literal, language tag)-statement from the model
 void removeStatement(Resource subject, URI predicate, java.lang.String literal, URI datatypeURI)
          remove a (subject, property ,literal, datatype)-statement from the model datatype often is an uri for a xml schema datatype (xsd)
 void removeStatement(Statement statement)
          remove a rdf2go-statement from the model
 void removeStatement(java.lang.String subjectURIString, URI predicate, java.lang.String literal)
           
 void removeStatement(java.lang.String subjectURIString, URI predicate, java.lang.String literal, java.lang.String languageTag)
          remove a (subject, property ,literal, language tag)-statement from the model
 void removeStatement(java.lang.String subjectURIString, URI predicate, java.lang.String literal, URI datatypeURI)
          remove a (subject, property ,literal, datatype)-statement from the model datatype often is an uri for a xml schema datatype (xsd)
 void update(Diff diff)
          Deprecated. 
 void update(DiffReader diff)
          Apply the changes given by this diff in one atomic operation Implementations must check that all statements to be removed are still in the Model.
 
Methods inherited from interface org.ontoware.aifbcommons.collection.ClosableIterable
iterator
 
Methods inherited from interface org.ontoware.rdf2go.model.ModelWriter
addAll, addStatement, addStatement, addStatement, addStatement, addStatement, addStatement, addStatement, addStatement
 
Methods inherited from interface org.ontoware.rdf2go.model.Lockable
isLocked, lock, unlock
 

Method Detail

update

void update(DiffReader diff)
            throws ModelRuntimeException
Apply the changes given by this diff in one atomic operation Implementations must check that all statements to be removed are still in the Model. Otherwise an exception is thrown. First all triples to be removed are removed, then triples to be added are added.

Parameters:
diff -
Throws:
ModelRuntimeException

update

@Deprecated
void update(Diff diff)
            throws ModelRuntimeException
Deprecated. 

use update(DiffReader diff) instead

Throws:
ModelRuntimeException

getDiff

Diff getDiff(java.util.Iterator<? extends Statement> statements)
             throws ModelRuntimeException
Parameters:
statements -
Returns:
a Diff between this model and the statements given in the iterator
Throws:
ModelRuntimeException

removeAll

void removeAll()
               throws ModelRuntimeException
Removes all statements from this model.

Throws:
ModelRuntimeException

removeAll

void removeAll(java.util.Iterator<? extends Statement> statements)
               throws ModelRuntimeException
Removes all statements contained in 'other' from this model = 'difference'

Parameters:
other - another RDF2GO model
Throws:
ModelRuntimeException

removeStatement

void removeStatement(Resource subject,
                     URI predicate,
                     Node object)
                     throws ModelRuntimeException
remove a (subject, property ,object)-statement from the model

Parameters:
subject - URI or Object (= blankNode)
predicate -
object - URI or String (=plainLiteral) or BlankNode (=blankNode) or TypedLiteral or LanguageTagLiteral
Throws:
ModelRuntimeException

removeStatement

void removeStatement(Resource subject,
                     URI predicate,
                     java.lang.String literal)
                     throws ModelRuntimeException
Throws:
ModelRuntimeException

removeStatement

void removeStatement(Resource subject,
                     URI predicate,
                     java.lang.String literal,
                     java.lang.String languageTag)
                     throws ModelRuntimeException
remove a (subject, property ,literal, language tag)-statement from the model

Parameters:
subject -
predicate -
literal -
languageTag -
Throws:
ModelRuntimeException

removeStatement

void removeStatement(Resource subject,
                     URI predicate,
                     java.lang.String literal,
                     URI datatypeURI)
                     throws ModelRuntimeException
remove a (subject, property ,literal, datatype)-statement from the model datatype often is an uri for a xml schema datatype (xsd)

Parameters:
subject -
predicate -
literal -
datatypeURI -
Throws:
ModelRuntimeException

removeStatement

void removeStatement(Statement statement)
                     throws ModelRuntimeException
remove a rdf2go-statement from the model

Parameters:
statement -
Throws:
ModelRuntimeException

removeStatement

void removeStatement(java.lang.String subjectURIString,
                     URI predicate,
                     java.lang.String literal)
                     throws ModelRuntimeException
Throws:
ModelRuntimeException

removeStatement

void removeStatement(java.lang.String subjectURIString,
                     URI predicate,
                     java.lang.String literal,
                     java.lang.String languageTag)
                     throws ModelRuntimeException
remove a (subject, property ,literal, language tag)-statement from the model

Parameters:
subject -
predicate -
literal -
languageTag -
Throws:
ModelRuntimeException

removeStatement

void removeStatement(java.lang.String subjectURIString,
                     URI predicate,
                     java.lang.String literal,
                     URI datatypeURI)
                     throws ModelRuntimeException
remove a (subject, property ,literal, datatype)-statement from the model datatype often is an uri for a xml schema datatype (xsd)

Parameters:
subject -
predicate -
literal -
datatypeURI -
Throws:
ModelRuntimeException


Copyright © 2005-2008 FZI - Forschungszentrum Informatik | Karlsruhe | Germany. All Rights Reserved.