Interface ChangeSet

  • All Known Implementing Classes:
    ChangeSetImpl

    public interface ChangeSet
    Input parameter to changeSetUpdate() method in RDFService. Represents a precondition query and an ordered list of model changes.
    • 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
      • 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 model
        graphURI - - 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 model
        graphURI - - 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 model
        operation - - the type of operation to be performed with the serialized RDF model
        graphURI - - 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.
      • getPostChangeEvents

        List<Object> getPostChangeEvents()
        Returns a list of events to pass to any change listeners after the change set additions and retractions are performed.