public class NotifyingModelLayer extends DelegatingModel implements NotifyingModel
model
Constructor and Description |
---|
NotifyingModelLayer(Model model) |
Modifier and Type | Method and Description |
---|---|
void |
addAll(Iterator<? extends Statement> other)
Add all statements contained in 'other' to this model = 'union'
|
void |
addModelChangedListener(ModelChangedListener listener) |
void |
addModelChangedListener(ModelChangedListener listener,
TriplePattern pattern) |
void |
addStatement(Resource subject,
URI predicate,
Node object)
adds a (subject, property ,object)-statement to this model
|
void |
addStatement(Resource subject,
URI predicate,
String literal)
adds a (subject, property, literal)-statement to the model.
|
void |
addStatement(Resource subject,
URI predicate,
String literal,
String languageTag)
adds a (subject, property, liteal, language-tag)-statement to the model.
|
void |
addStatement(Resource subject,
URI predicate,
String literal,
URI datatypeURI)
adds a (subject, property, literal ,datatype)-statement to the model.
|
void |
addStatement(Statement statement)
adds a statement to this model
|
void |
addStatement(String subjectURIString,
URI predicate,
String literal)
adds a (subject, property, literal)-statement to the model.
|
void |
addStatement(String subjectURIString,
URI predicate,
String literal,
String languageTag)
adds a (subject, property, liteal, language-tag)-statement to the model.
|
void |
addStatement(String subjectURIString,
URI predicate,
String literal,
URI datatypeURI)
adds a (subject, property, literal, data-type)-statement to the model.
|
void |
removeAll(Iterator<? extends Statement> other)
Removes all statements contained in 'other' from this model =
'difference'
|
void |
removeModelChangedListener(ModelChangedListener listener) |
void |
removeStatement(Resource subject,
URI predicate,
Node object)
remove a (subject, property ,object)-statement from the model
|
void |
removeStatement(Resource subject,
URI predicate,
String literal) |
void |
removeStatement(Resource subject,
URI predicate,
String literal,
String languageTag)
remove a (subject, property ,literal, language tag)-statement from the
model
|
void |
removeStatement(Resource subject,
URI predicate,
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(String subjectURIString,
URI predicate,
String literal) |
void |
removeStatement(String subjectURIString,
URI predicate,
String literal,
String languageTag)
remove a (subject, property ,literal, language tag)-statement from the
model
|
void |
removeStatement(String subjectURIString,
URI predicate,
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 |
removeStatements(ResourceOrVariable subject,
UriOrVariable predicate,
NodeOrVariable object)
remove a (subject, property ,object)-statement from the model
|
void |
update(DiffReader diff)
Implementations with support for transactions should use them instead of
this implementation.
|
addModel, close, commit, contains, createBlankNode, createBlankNode, createURI, dump, findStatements, findStatements, getContextURI, getDelegatedModel, getDiff, getNamespace, getNamespaces, getProperty, getUnderlyingModelImplementation, isEmpty, isIsomorphicWith, isLocked, isOpen, isValidURI, iterator, lock, newRandomUniqueURI, open, queryConstruct, querySelect, readFrom, readFrom, readFrom, readFrom, readFrom, readFrom, removeAll, removeNamespace, setAutocommit, setDelegatedModel, setNamespace, setProperty, size, sparqlAsk, sparqlConstruct, sparqlDescribe, sparqlSelect, unlock, writeTo, writeTo, writeTo, writeTo
addReificationOf, addReificationOf, assertModel, contains, contains, countStatements, createDatatypeLiteral, createLanguageTagLiteral, createPlainLiteral, createStatement, createTriplePattern, deleteReification, getAllReificationsOf, hasReifications, removeStatements, serialize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createDatatypeLiteral, createLanguageTagLiteral, createPlainLiteral, createStatement
removeStatements
forEach, spliterator
contains, contains, countStatements, createTriplePattern
addReificationOf, addReificationOf, deleteReification, getAllReificationsOf, hasReifications
public NotifyingModelLayer(Model model)
public void addAll(Iterator<? extends Statement> other) throws ModelRuntimeException
ModelWriter
addAll
in interface ModelWriter
addAll
in class DelegatingModel
other
- another RDF2GO modelModelRuntimeException
- if there is either an error with the
underlying model or an IOException
public void addStatement(Resource subject, URI predicate, Node object) throws ModelRuntimeException
ModelWriter
addStatement
in interface ModelWriter
addStatement
in class DelegatingModel
subject
- of the statementpredicate
- of the statementobject
- of the statementModelRuntimeException
- if there is either an error with the
underlying model or an IOException
public void addStatement(Resource subject, URI predicate, String literal, String languageTag) throws ModelRuntimeException
ModelWriter
addStatement
in interface ModelWriter
addStatement
in class DelegatingModel
subject
- URI or Object (= blankNode)predicate
- of the statementliteral
- main part of literal value of the statementlanguageTag
- RDF language tagModelRuntimeException
- if there is either an error with the
underlying model or an IOException
public void addStatement(Resource subject, URI predicate, String literal, URI datatypeURI) throws ModelRuntimeException
ModelWriter
addStatement
in interface ModelWriter
addStatement
in class DelegatingModel
subject
- of the statementpredicate
- of the statementliteral
- main part of the literal of the statementdatatypeURI
- for the datatype part of the literalModelRuntimeException
- if there is either an error with the
underlying model or an IOException
public void addStatement(Resource subject, URI predicate, String literal) throws ModelRuntimeException
ModelWriter
addStatement
in interface ModelWriter
addStatement
in class DelegatingModel
subject
- of the statementpredicate
- of the statementliteral
- of the statement. A PlainLiteral
will be created.ModelRuntimeException
- if there is either an error with the
underlying model or an IOException
public void addStatement(Statement statement) throws ModelRuntimeException
ModelWriter
addStatement
in interface ModelWriter
addStatement
in class DelegatingModel
statement
- the statement to addModelRuntimeException
- if there is either an error with the
underlying model or an IOException
public void addStatement(String subjectURIString, URI predicate, String literal, String languageTag) throws ModelRuntimeException
ModelWriter
addStatement
in interface ModelWriter
addStatement
in class DelegatingModel
subjectURIString
- interpreted as a URIpredicate
- of the statementliteral
- main part of the LanguageTagLiteral
languageTag
- RDF language tag of the LanguageTagLiteral
ModelRuntimeException
- if there is either an error with the
underlying model or an IOException
public void addStatement(String subjectURIString, URI predicate, String literal, URI datatypeURI) throws ModelRuntimeException
ModelWriter
addStatement
in interface ModelWriter
addStatement
in class DelegatingModel
subjectURIString
- interpreted as URI of the statementpredicate
- of the statementliteral
- for the DatatypeLiteral
datatypeURI
- for the DatatypeLiteral
ModelRuntimeException
- if there is either an error with the
underlying model or an IOException
public void addStatement(String subjectURIString, URI predicate, String literal) throws ModelRuntimeException
ModelWriter
addStatement
in interface ModelWriter
addStatement
in class DelegatingModel
subjectURIString
- interpreted as URI of the statementpredicate
- of the statementliteral
- for the PlainLiteral
ModelRuntimeException
- if there is either an error with the
underlying model or an IOException
public void removeAll(Iterator<? extends Statement> other) throws ModelRuntimeException
ModelAddRemove
removeAll
in interface ModelAddRemove
removeAll
in class DelegatingModel
ModelRuntimeException
public void removeStatement(Resource subject, URI predicate, Node object) throws ModelRuntimeException
ModelAddRemove
removeStatement
in interface ModelAddRemove
removeStatement
in class DelegatingModel
subject
- URI or Object (= blankNode)object
- URI or String (=plainLiteral) or BlankNode (=blankNode) or
TypedLiteral or LanguageTagLiteralModelRuntimeException
public void removeStatement(Resource subject, URI predicate, String literal, String languageTag) throws ModelRuntimeException
ModelAddRemove
removeStatement
in interface ModelAddRemove
removeStatement
in class DelegatingModel
ModelRuntimeException
public void removeStatement(Resource subject, URI predicate, String literal, URI datatypeURI) throws ModelRuntimeException
ModelAddRemove
removeStatement
in interface ModelAddRemove
removeStatement
in class DelegatingModel
ModelRuntimeException
public void removeStatement(Resource subject, URI predicate, String literal) throws ModelRuntimeException
removeStatement
in interface ModelAddRemove
removeStatement
in class DelegatingModel
ModelRuntimeException
public void removeStatement(Statement statement) throws ModelRuntimeException
ModelAddRemove
removeStatement
in interface ModelAddRemove
removeStatement
in class DelegatingModel
ModelRuntimeException
public void removeStatement(String subjectURIString, URI predicate, String literal, String languageTag) throws ModelRuntimeException
ModelAddRemove
removeStatement
in interface ModelAddRemove
removeStatement
in class DelegatingModel
ModelRuntimeException
public void removeStatement(String subjectURIString, URI predicate, String literal, URI datatypeURI) throws ModelRuntimeException
ModelAddRemove
removeStatement
in interface ModelAddRemove
removeStatement
in class DelegatingModel
ModelRuntimeException
public void removeStatement(String subjectURIString, URI predicate, String literal) throws ModelRuntimeException
removeStatement
in interface ModelAddRemove
removeStatement
in class DelegatingModel
ModelRuntimeException
public void removeStatements(ResourceOrVariable subject, UriOrVariable predicate, NodeOrVariable object) throws ModelRuntimeException
ModelRemovePatterns
removeStatements
in interface ModelRemovePatterns
removeStatements
in class DelegatingModel
subject
- URI or Object (= blankNode)object
- URI or String (=plainLiteral) or BlankNode (=blankNode) or
TypedLiteral or LanguageTagLiteralModelRuntimeException
public void update(DiffReader diff) throws ModelRuntimeException
AbstractModel
update
in interface ModelAddRemove
update
in class DelegatingModel
ModelRuntimeException
public void addModelChangedListener(ModelChangedListener listener, TriplePattern pattern)
addModelChangedListener
in interface NotifyingModel
listener
- must not be null; gets notified on model change eventspattern
- all add or remove statement events matching the pattern
will be send to the listener. Updates are always send.public void addModelChangedListener(ModelChangedListener listener)
addModelChangedListener
in interface NotifyingModel
public void removeModelChangedListener(ModelChangedListener listener)
removeModelChangedListener
in interface NotifyingModel
Copyright © 2005–2019 IT-Consulting Dr. Max Völkel | Project started at FZI Forschungszentrum Informatik, www.fzi.de. All rights reserved.