Class AccJsonDriver
java.lang.Object
org.aksw.jenax.io.json.accumulator.AccJsonDriver
This class implements the driver for accumulating (json) objects from a sequence of edges (triples/quads).
The AccJson objects can be seen as states in a state automaton, and this class drives
the transition between the states based on the input.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.jena.graph.Nodeprotected AccJsonprotected booleanprotected long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccumulate(org.apache.jena.sparql.core.Quad input, AccContextRdf cxt) We expect each root node to be announced with a dummy quad that does not carry any edge information (s, s, ANY, ANY)Stream<Map.Entry<org.apache.jena.graph.Node,RdfElement>> asStream(AccContextRdf cxt, Stream<org.apache.jena.sparql.core.Quad> quadStream) voidbegin(AccContextRdf cxt) voidend(AccContextRdf cxt) protected voidRecursively calls end() on the current accumulator and all its ancestorslonggetValue()static AccJsonDriver
-
Field Details
-
currentState
-
currentSource
protected org.apache.jena.graph.Node currentSource -
sourcesSeen
protected long sourcesSeen -
isSingle
protected boolean isSingle
-
-
Constructor Details
-
AccJsonDriver
-
-
Method Details
-
of
-
getSourcesSeen
public long getSourcesSeen() -
accumulate
public void accumulate(org.apache.jena.sparql.core.Quad input, AccContextRdf cxt) throws IOException We expect each root node to be announced with a dummy quad that does not carry any edge information (s, s, ANY, ANY)- Parameters:
input-cxt-- Throws:
IOException
-
begin
- Throws:
IOException
-
end
- Throws:
IOException
-
getValue
-
endCurrentItem
Recursively calls end() on the current accumulator and all its ancestors- Throws:
IOException
-
asStream
public Stream<Map.Entry<org.apache.jena.graph.Node,RdfElement>> asStream(AccContextRdf cxt, Stream<org.apache.jena.sparql.core.Quad> quadStream)
-