Class ObservableSetFromGraph
java.lang.Object
java.util.AbstractCollection<T>
org.aksw.commons.collection.observable.DeltaCollectionBase<T,Collection<T>>
org.aksw.commons.collection.observable.ForwardingDeltaCollectionBase<org.apache.jena.graph.Triple,Set<org.apache.jena.graph.Triple>>
org.aksw.jena_sparql_api.collection.observable.ObservableSetFromGraph
- Type Parameters:
T-
- All Implemented Interfaces:
Iterable<org.apache.jena.graph.Triple>,Collection<org.apache.jena.graph.Triple>,Set<org.apache.jena.graph.Triple>,org.aksw.commons.collection.observable.DeltaCollection<org.apache.jena.graph.Triple>,org.aksw.commons.collection.observable.ObservableCollection<org.apache.jena.graph.Triple>,org.aksw.commons.collection.observable.ObservableSet<org.apache.jena.graph.Triple>
public class ObservableSetFromGraph
extends org.aksw.commons.collection.observable.ForwardingDeltaCollectionBase<org.apache.jena.graph.Triple,Set<org.apache.jena.graph.Triple>>
implements org.aksw.commons.collection.observable.ObservableSet<org.apache.jena.graph.Triple>
Set view over the values of a property of a given subject resource.
Issue: Jena's event mechanism does not seem to allow getting actual graph changes; i.e. ignoring
events for redundant additions or deletions.
Also, there does not seem to be an integration with transaction - i.e. aborting a transaction
should raise an event that undos all previously raised additions/deletions.
- Author:
- raven Nov 25, 2020
-
Field Summary
FieldsFields inherited from class org.aksw.commons.collection.observable.ForwardingDeltaCollectionBase
backend -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.aksw.commons.collection.observable.Registrationprotected PropertyChangeEventstatic ObservableSetFromGraphdecorate(org.apache.jena.graph.Graph graph) booleandelta(Collection<? extends org.apache.jena.graph.Triple> additions, Collection<?> removals) getGraph()static voidMethods inherited from class org.aksw.commons.collection.observable.ForwardingDeltaCollectionBase
getBackend, isDuplicateAwareBackend, iterator, sizeMethods inherited from class org.aksw.commons.collection.observable.DeltaCollectionBase
add, addAll, clear, remove, removeAllMethods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface org.aksw.commons.collection.observable.DeltaCollection
replaceMethods inherited from interface org.aksw.commons.collection.observable.ObservableCollection
convert, filter, map, mapToValue, mapToValueMethods inherited from interface org.aksw.commons.collection.observable.ObservableSet
fieldForPresence
-
Field Details
-
graph
-
-
Constructor Details
-
ObservableSetFromGraph
-
-
Method Details
-
delta
public boolean delta(Collection<? extends org.apache.jena.graph.Triple> additions, Collection<?> removals) - Specified by:
deltain interfaceorg.aksw.commons.collection.observable.DeltaCollection<org.apache.jena.graph.Triple>
-
getGraph
-
convertEvent
-
addVetoableChangeListener
- Specified by:
addVetoableChangeListenerin interfaceorg.aksw.commons.collection.observable.ObservableCollection<org.apache.jena.graph.Triple>- Returns:
- A Runnable that de-registers the listener upon calling .run()
-
addPropertyChangeListener
public org.aksw.commons.collection.observable.Registration addPropertyChangeListener(PropertyChangeListener listener) - Specified by:
addPropertyChangeListenerin interfaceorg.aksw.commons.collection.observable.ObservableCollection<org.apache.jena.graph.Triple>- Returns:
- A Runnable that de-registers the listener upon calling .run()
-
decorate
-
main
-