Class ChangeSetImpl
- java.lang.Object
-
- edu.cornell.mannlib.vitro.webapp.rdfservice.impl.ChangeSetImpl
-
-
Constructor Summary
Constructors Constructor Description ChangeSetImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAddition(InputStream model, RDFService.ModelSerializationFormat format, String graphURI)Adds one model change representing an addition to the list of model changesvoidaddPostChangeEvent(Object o)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 o)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 format, 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)StringtoString()
-
-
-
Method Detail
-
getPreconditionQuery
public String getPreconditionQuery()
- Specified by:
getPreconditionQueryin interfaceChangeSet- Returns:
- String - a SPARQL query
-
setPreconditionQuery
public void setPreconditionQuery(String preconditionQuery)
- Specified by:
setPreconditionQueryin interfaceChangeSet- Parameters:
preconditionQuery- - a SPARQL query
-
getPreconditionQueryType
public RDFService.SPARQLQueryType getPreconditionQueryType()
- Specified by:
getPreconditionQueryTypein interfaceChangeSet- Returns:
- RDFService.SPARQLQueryType - the precondition query type
-
setPreconditionQueryType
public void setPreconditionQueryType(RDFService.SPARQLQueryType queryType)
- Specified by:
setPreconditionQueryTypein interfaceChangeSet- Parameters:
queryType- - the precondition query type
-
getModelChanges
public List<ModelChange> getModelChanges()
- Specified by:
getModelChangesin interfaceChangeSet
-
addAddition
public void addAddition(InputStream model, RDFService.ModelSerializationFormat format, String graphURI)
Description copied from interface:ChangeSetAdds one model change representing an addition to the list of model changes- Specified by:
addAdditionin interfaceChangeSet- Parameters:
model- - a serialized RDF model (collection of triples)format- - format of the serialized RDF modelgraphURI- - URI of the graph to which the RDF model should be added
-
addRemoval
public void addRemoval(InputStream model, RDFService.ModelSerializationFormat format, String graphURI)
Description copied from interface:ChangeSetAdds one model change representing a deletion to the list of model changes- Specified by:
addRemovalin interfaceChangeSet- Parameters:
model- - a serialized RDF model (collection of triples)format- - format of the serialized RDF modelgraphURI- - URI of the graph from which the RDF model should be removed
-
manufactureModelChange
public ModelChange manufactureModelChange()
Description copied from interface:ChangeSetCreates an instance of the ModelChange class- Specified by:
manufactureModelChangein interfaceChangeSet- Returns:
- ModelChange - an empty instance of the ModelChange class
-
manufactureModelChange
public ModelChange manufactureModelChange(InputStream serializedModel, RDFService.ModelSerializationFormat serializationFormat, ModelChange.Operation operation, String graphURI)
Description copied from interface:ChangeSetCreates an instance of the ModelChange class- Specified by:
manufactureModelChangein interfaceChangeSet- 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
public void addPreChangeEvent(Object o)
Description copied from interface:ChangeSetAdds 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.- Specified by:
addPreChangeEventin interfaceChangeSet- Parameters:
o- - event to notify listeners of in advance of making changes to the triple store.
-
addPostChangeEvent
public void addPostChangeEvent(Object o)
Description copied from interface:ChangeSetAdds an event that will be be passed to any change listeners after all of the change set additions and retractions are performed.- Specified by:
addPostChangeEventin interfaceChangeSet- Parameters:
o- - the event to notify listeners of after the changes are performed.
-
getPreChangeEvents
public List<Object> getPreChangeEvents()
Description copied from interface:ChangeSetReturns a list of events to pass to any change listeners in advance of the change set additions and retractions being performed.- Specified by:
getPreChangeEventsin interfaceChangeSet
-
getPostChangeEvents
public List<Object> getPostChangeEvents()
Description copied from interface:ChangeSetReturns a list of events to pass to any change listeners after the change set additions and retractions are performed.- Specified by:
getPostChangeEventsin interfaceChangeSet
-
-