Class AccStateBase<I,E,K,V>
java.lang.Object
org.aksw.jenax.graphql.sparql.v2.acc.state.api.AccStateBase<I,E,K,V>
- All Implemented Interfaces:
AccState<I,,E> AccStateGon<I,E, K, V>
- Direct Known Subclasses:
AccStateArray,AccStateArrayInit,AccStateCondition,AccStateInit,AccStateLiteral,AccStateMap,AccStateMemberSet,AccStateTransitionBase,AccStateTypeProduceEntryBase
Base class for acc states that produce GON output.
Keeps track of the current input being processed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AccContext<K,V> protected ICopy of the input passed to the most recent call of#transition(Object, Object).protected Objectprotected booleanprotected ObjectThe materialized value - requires materialization to be enabled in the contextprotected AccStateGon<I,E, K, V> protected Iprotected booleanprotected Object -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidFIXME What exactly is id? Is it the value by which this acc connects to the parent? The context and skipOutput flag are stored on the accumulator until end is called.protected voidfinal voidend()protected voidvoidAccStateGon<I,E, K, V> The immediate parent of this AccState.Get the id of the state for which this accumulator is notified.booleanhasBegun()voidsetContext(AccContext<K, V> context) The state to which to backtrack if an input cannot be processed by the current stateprotected voidsetContextOnChildren(AccContext<K, V> context) voidfinal AccStateGon<I,E, K, V> transition(Object inputStateId, I input, E env) FIXME What exactly is id? Is it the value by which this acc connects to the parent? The context and skipOutput flag are stored on the accumulator until end is called.abstract AccStateGon<I,E, K, V> transitionActual(Object inputStateId, I input, E env) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aksw.jenax.graphql.sparql.v2.acc.state.api.AccStateGon
children, getGonType, getRoot
-
Field Details
-
parent
-
oldSourceNode
The materialized value - requires materialization to be enabled in the context -
hasBegun
protected boolean hasBegun -
currentSourceNode
-
parentInput
-
currentInput
Copy of the input passed to the most recent call of#transition(Object, Object). -
skipOutput
protected boolean skipOutput -
context
-
stateId
-
-
Constructor Details
-
AccStateBase
public AccStateBase()
-
-
Method Details
-
getStateId
Description copied from interface:AccStateGet the id of the state for which this accumulator is notified.- Specified by:
getStateIdin interfaceAccState<I,E>
-
setParent
-
setContext
Description copied from interface:AccStateGonThe state to which to backtrack if an input cannot be processed by the current state- Specified by:
setContextin interfaceAccStateGon<I,E, K, V>
-
setContextOnChildren
-
getParent
Description copied from interface:AccStateGonThe immediate parent of this AccState. -
hasBegun
public boolean hasBegun() -
ensureBegun
public void ensureBegun() -
transition
public final AccStateGon<I,E, transitionK, V> (Object inputStateId, I input, E env) throws IOException Description copied from interface:AccStateGonFIXME What exactly is id? Is it the value by which this acc connects to the parent? The context and skipOutput flag are stored on the accumulator until end is called.- Specified by:
transitionin interfaceAccState<I,E> - Specified by:
transitionin interfaceAccStateGon<I,E, K, V> - Parameters:
inputStateId- The stateId, typically extracted from the input by the driver. (Rationale: Only the driver needs to know how to extract the state from an input).- Returns:
- Throws:
IOException
-
begin
public final void begin(Object fromStateId, I parentInput, E env, boolean skipOutput) throws IOException Description copied from interface:AccStateFIXME What exactly is id? Is it the value by which this acc connects to the parent? The context and skipOutput flag are stored on the accumulator until end is called.- Specified by:
beginin interfaceAccState<I,E> - Parameters:
joinTuple- The values by which the tuple that is about to be passed to transition joined with the parent accumulator.cxt-skipOutput-- Throws:
IOException
-
end
- Specified by:
endin interfaceAccState<I,E> - Throws:
IOException
-
transitionActual
public abstract AccStateGon<I,E, transitionActualK, V> (Object inputStateId, I input, E env) throws IOException - Throws:
IOException
-
beginActual
- Throws:
IOException
-
endActual
- Throws:
IOException
-