public class PrettyPrinter extends Object implements AnyValueWriter<RuntimeException>
Used to format AnyValue as a json-like string, as following:
(id=42 :LABEL {prop1: ["a", 13]})-[id=42 :TYPE {prop1: ["a", 13]}]-(id=1 :L)-[id=42 :T {k: "v"}]->(id=2)-...{foo: 42, bar: "baz"}["aa", "bb", "cc"]2.7182818285"this is a string"ValueWriter.Adapter<E extends Exception>, ValueWriter.ArrayType| Constructor and Description |
|---|
PrettyPrinter() |
PrettyPrinter(String quoteMark) |
| Modifier and Type | Method and Description |
|---|---|
void |
beginArray(int size,
ValueWriter.ArrayType arrayType) |
void |
beginList(int size) |
void |
beginMap(int size) |
void |
beginPoint(CoordinateReferenceSystem coordinateReferenceSystem) |
void |
endArray() |
void |
endList() |
void |
endMap() |
void |
endPoint() |
String |
value() |
void |
writeBoolean(boolean value) |
void |
writeByteArray(byte[] value) |
void |
writeEdge(long edgeId,
long startNodeId,
long endNodeId,
TextValue type,
MapValue properties) |
void |
writeEdgeReference(long edgeId) |
void |
writeFloatingPoint(double value) |
void |
writeFloatingPoint(float value) |
void |
writeInteger(byte value) |
void |
writeInteger(int value) |
void |
writeInteger(long value) |
void |
writeInteger(short value) |
void |
writeNode(long nodeId,
TextArray labels,
MapValue properties) |
void |
writeNodeReference(long nodeId) |
void |
writeNull() |
void |
writePath(NodeValue[] nodes,
EdgeValue[] edges) |
void |
writeString(char value) |
void |
writeString(char[] value,
int offset,
int length) |
void |
writeString(String value) |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwriteArbitraryJavaObjectwriteString, writeUTF8public PrettyPrinter()
public PrettyPrinter(String quoteMark)
public void writeNodeReference(long nodeId)
writeNodeReference in interface AnyValueWriter<RuntimeException>public void writeNode(long nodeId,
TextArray labels,
MapValue properties)
writeNode in interface AnyValueWriter<RuntimeException>public void writeEdgeReference(long edgeId)
writeEdgeReference in interface AnyValueWriter<RuntimeException>public void writeEdge(long edgeId,
long startNodeId,
long endNodeId,
TextValue type,
MapValue properties)
writeEdge in interface AnyValueWriter<RuntimeException>public void beginMap(int size)
beginMap in interface AnyValueWriter<RuntimeException>public void endMap()
endMap in interface AnyValueWriter<RuntimeException>public void beginList(int size)
beginList in interface AnyValueWriter<RuntimeException>public void endList()
endList in interface AnyValueWriter<RuntimeException>public void writePath(NodeValue[] nodes, EdgeValue[] edges)
writePath in interface AnyValueWriter<RuntimeException>public void beginPoint(CoordinateReferenceSystem coordinateReferenceSystem)
beginPoint in interface AnyValueWriter<RuntimeException>public void endPoint()
endPoint in interface AnyValueWriter<RuntimeException>public void writeNull()
writeNull in interface ValueWriter<RuntimeException>public void writeBoolean(boolean value)
writeBoolean in interface ValueWriter<RuntimeException>public void writeInteger(byte value)
writeInteger in interface ValueWriter<RuntimeException>public void writeInteger(short value)
writeInteger in interface ValueWriter<RuntimeException>public void writeInteger(int value)
writeInteger in interface ValueWriter<RuntimeException>public void writeInteger(long value)
writeInteger in interface ValueWriter<RuntimeException>public void writeFloatingPoint(float value)
writeFloatingPoint in interface ValueWriter<RuntimeException>public void writeFloatingPoint(double value)
writeFloatingPoint in interface ValueWriter<RuntimeException>public void writeString(String value)
writeString in interface ValueWriter<RuntimeException>public void writeString(char value)
writeString in interface ValueWriter<RuntimeException>public void writeString(char[] value,
int offset,
int length)
writeString in interface ValueWriter<RuntimeException>public void beginArray(int size,
ValueWriter.ArrayType arrayType)
beginArray in interface ValueWriter<RuntimeException>public void endArray()
endArray in interface ValueWriter<RuntimeException>public void writeByteArray(byte[] value)
writeByteArray in interface ValueWriter<RuntimeException>public String value()
Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.