Interface ChangeSet
-
- All Known Implementing Classes:
ChangeSetImpl
public interface ChangeSetInput parameter to changeSetUpdate() method in RDFService. Represents a precondition query and an ordered list of model changes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddAddition(InputStream model, RDFService.ModelSerializationFormat serializationFormat, String graphURI)Adds one model change representing an addition to the list of model changesvoidaddPostChangeEvent(Object event)Adds an event that will be be passed to any change listeners after all of the change set additions and retractions are performed.voidaddPreChangeEvent(Object event)Adds an event that will be be passed to any change listeners in advance of the change set additions and retractions being performed.voidaddRemoval(InputStream model, RDFService.ModelSerializationFormat serializationFormat, String graphURI)Adds one model change representing a deletion to the list of model changesList<ModelChange>getModelChanges()List<Object>getPostChangeEvents()Returns a list of events to pass to any change listeners after the change set additions and retractions are performed.List<Object>getPreChangeEvents()Returns a list of events to pass to any change listeners in advance of the change set additions and retractions being performed.StringgetPreconditionQuery()RDFService.SPARQLQueryTypegetPreconditionQueryType()ModelChangemanufactureModelChange()Creates an instance of the ModelChange classModelChangemanufactureModelChange(InputStream serializedModel, RDFService.ModelSerializationFormat serializationFormat, ModelChange.Operation operation, String graphURI)Creates an instance of the ModelChange classvoidsetPreconditionQuery(String preconditionQuery)voidsetPreconditionQueryType(RDFService.SPARQLQueryType queryType)
-
-
-
Method Detail
-
getPreconditionQuery
String getPreconditionQuery()
- Returns:
- String - a SPARQL query
-
setPreconditionQuery
void setPreconditionQuery(String preconditionQuery)
- Parameters:
preconditionQuery- - a SPARQL query
-
getPreconditionQueryType
RDFService.SPARQLQueryType getPreconditionQueryType()
- Returns:
- RDFService.SPARQLQueryType - the precondition query type
-
setPreconditionQueryType
void setPreconditionQueryType(RDFService.SPARQLQueryType queryType)
- Parameters:
queryType- - the precondition query type
-
getModelChanges
List<ModelChange> getModelChanges()
-
addAddition
void addAddition(InputStream model, RDFService.ModelSerializationFormat serializationFormat, String graphURI)
Adds one model change representing an addition to the list of model changes- Parameters:
model- - a serialized RDF model (collection of triples)serializationFormat- - format of the serialized RDF modelgraphURI- - URI of the graph to which the RDF model should be added
-
addRemoval
void addRemoval(InputStream model, RDFService.ModelSerializationFormat serializationFormat, String graphURI)
Adds one model change representing a deletion to the list of model changes- Parameters:
model- - a serialized RDF model (collection of triples)serializationFormat- - format of the serialized RDF modelgraphURI- - URI of the graph from which the RDF model should be removed
-
manufactureModelChange
ModelChange manufactureModelChange()
Creates an instance of the ModelChange class- Returns:
- ModelChange - an empty instance of the ModelChange class
-
manufactureModelChange
ModelChange manufactureModelChange(InputStream serializedModel, RDFService.ModelSerializationFormat serializationFormat, ModelChange.Operation operation, String graphURI)
Creates an instance of the ModelChange class- Parameters:
serializedModel- - a serialized RDF model (collection of triples)serializationFormat- - format of the serialized RDF modeloperation- - the type of operation to be performed with the serialized RDF modelgraphURI- - URI of the graph on which to apply the model change operation- Returns:
- ModelChange - a ModelChange instance initialized with the input model, model format, operation and graphURI
-
addPreChangeEvent
void addPreChangeEvent(Object event)
Adds an event that will be be passed to any change listeners in advance of the change set additions and retractions being performed. The event will only be fired if the precondition (if any) is met.- Parameters:
event- - event to notify listeners of in advance of making changes to the triple store.
-
addPostChangeEvent
void addPostChangeEvent(Object event)
Adds an event that will be be passed to any change listeners after all of the change set additions and retractions are performed.- Parameters:
event- - the event to notify listeners of after the changes are performed.
-
getPreChangeEvents
List<Object> getPreChangeEvents()
Returns a list of events to pass to any change listeners in advance of the change set additions and retractions being performed.
-
-