Class AccJsonBase
java.lang.Object
org.aksw.jenax.io.json.accumulator.AccJsonBase
- All Implemented Interfaces:
AccJson
- Direct Known Subclasses:
AccJsonFragmentHead,AccJsonLiteral,AccJsonObjectLikeBase,AccJsonProperty
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.jena.graph.Nodeprotected booleanprotected org.apache.jena.graph.Nodeprotected AccJsonprotected booleanprotected RdfElementThe materialized value - requires materialization to be enabled in the context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbegin(org.apache.jena.graph.Node sourceNode, AccContextRdf cxt, boolean skipOutput) Start accumulation based on a given node in the underlying graph.voidend(AccContextRdf cxt) End the accumulator's current nodevoidInternal method, mainly for processing fragments.Get the parent of this accumulator.getValue()If cxt.isMaterialize is enabled then this method returns the json data assembled for the current node.booleanhasBegun()True after begin() and before end()voidSets the parent of this accumulator.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aksw.jenax.io.json.accumulator.AccJson
acceptContribution, getPath, transition
-
Field Details
-
parent
-
value
The materialized value - requires materialization to be enabled in the context -
oldSourceNode
protected org.apache.jena.graph.Node oldSourceNode -
hasBegun
protected boolean hasBegun -
currentSourceNode
protected org.apache.jena.graph.Node currentSourceNode -
skipOutput
protected boolean skipOutput
-
-
Constructor Details
-
AccJsonBase
public AccJsonBase()
-
-
Method Details
-
ensureBegun
public void ensureBegun() -
setParent
Description copied from interface:AccJsonSets the parent of this accumulator. Can only be called once. This method should never be called by application code. -
getParent
Description copied from interface:AccJsonGet the parent of this accumulator. Null if there is none. -
getValue
Description copied from interface:AccJsonIf cxt.isMaterialize is enabled then this method returns the json data assembled for the current node. It is only valid to call this method after end(). -
getInternalValue
Description copied from interface:AccJsonInternal method, mainly for processing fragments. Unchecked access to the current value under construction. Should hardly be used.- Specified by:
getInternalValuein interfaceAccJson
-
begin
public void begin(org.apache.jena.graph.Node sourceNode, AccContextRdf cxt, boolean skipOutput) throws IOException Description copied from interface:AccJsonStart accumulation based on a given node in the underlying graph. Calls cannot be nested.- Specified by:
beginin interfaceAccJson- Parameters:
sourceNode- The source node to which the next incoming edge(s) will connect tocxt- The context which holds the JSON serializersskipOutput- When output should be disabled (used e.g. to skip over lists of items where just one was expected)- Throws:
IOException
-
end
Description copied from interface:AccJsonEnd the accumulator's current node- Specified by:
endin interfaceAccJson- Throws:
IOException
-
hasBegun
public boolean hasBegun()Description copied from interface:AccJsonTrue after begin() and before end()
-