Record Class GraphUpdateChange
Payload of an IndexChange.UpdateContext change: a graph-level MOVE/COPY/ADD between two named graphs. The
source and target are IRIs (SPARQL MOVE/COPY/ADD only names IRIs, and the HTTP replication command carries them as
URI parameters). The source() and target() accessors are never null: a null
argument is normalized to the default graph (Values.DEFAULT_GRAPH, aka Contexts.DEFAULT), so
consumers never have to special-case null. The flags mirror GraphUpdateOp:
ADD: clearSource=false, clearDestination=falseCOPY: clearSource=false, clearDestination=trueMOVE: clearSource=true, clearDestination=true
clearSource implies clearDestination; the fourth combination is rejected at construction.
The operation must be deterministically computable from data local to a node, so the source and target must be distinct local named graphs — not the same graph (a self-move would clear the destination and then copy from the now-empty source), and not a virtual graph (federated, external) or a wildcard meta-context. These invariants are enforced at construction so an invalid change can never be carried through a transaction, log record, or replication command.
- Since:
- 12.0
- Version:
- 12.0
- Author:
- Simon Gratzer
-
Constructor Summary
ConstructorsConstructorDescriptionGraphUpdateChange(IRI source, IRI target, boolean clearSource, boolean clearDestination) Creates an instance of aGraphUpdateChangerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theclearDestinationrecord component.booleanReturns the value of theclearSourcerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.source()Returns the value of thesourcerecord component.target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GraphUpdateChange
Creates an instance of aGraphUpdateChangerecord class.- Parameters:
source- the value for thesourcerecord componenttarget- the value for thetargetrecord componentclearSource- the value for theclearSourcerecord componentclearDestination- the value for theclearDestinationrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-
clearSource
public boolean clearSource()Returns the value of theclearSourcerecord component.- Returns:
- the value of the
clearSourcerecord component
-
clearDestination
public boolean clearDestination()Returns the value of theclearDestinationrecord component.- Returns:
- the value of the
clearDestinationrecord component
-