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 |
endArray() |
void |
endList() |
void |
endMap() |
String |
value() |
void |
writeBoolean(boolean value) |
void |
writeByteArray(byte[] value) |
void |
writeDate(LocalDate localDate) |
void |
writeDateTime(ZonedDateTime zonedDateTime) |
void |
writeDuration(long months,
long days,
long seconds,
int nanos) |
void |
writeFloatingPoint(double value) |
void |
writeFloatingPoint(float value) |
void |
writeGeoPoint(GeoPoint geoPoint) |
void |
writeInteger(byte value) |
void |
writeInteger(int value) |
void |
writeInteger(long value) |
void |
writeInteger(short value) |
void |
writeLocalDateTime(LocalDateTime localDateTime) |
void |
writeLocalTime(LocalTime localTime) |
void |
writeNode(String nodeId,
TextArray labels,
MapValue properties,
Authorizations authorizations) |
void |
writeNodeReference(String nodeId) |
void |
writeNull() |
void |
writePath(NodeValue[] nodes,
RelationshipValue[] relationships,
Authorizations authorizations) |
void |
writeRelationship(String relId,
String startNodeId,
String endNodeId,
TextValue type,
MapValue properties,
Authorizations authorizations) |
void |
writeRelationshipReference(String relId) |
void |
writeString(char value) |
void |
writeString(String value) |
void |
writeTime(OffsetTime offsetTime) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwriteVirtualNodeHack, writeVirtualRelationshipHackwriteUTF8public PrettyPrinter()
public PrettyPrinter(String quoteMark)
public void writeNodeReference(String nodeId)
writeNodeReference in interface AnyValueWriter<RuntimeException>public void writeNode(String nodeId, TextArray labels, MapValue properties, Authorizations authorizations)
writeNode in interface AnyValueWriter<RuntimeException>public void writeRelationshipReference(String relId)
writeRelationshipReference in interface AnyValueWriter<RuntimeException>public void writeRelationship(String relId, String startNodeId, String endNodeId, TextValue type, MapValue properties, Authorizations authorizations)
writeRelationship 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, RelationshipValue[] relationships, Authorizations authorizations)
writePath in interface AnyValueWriter<RuntimeException>public void writeDuration(long months,
long days,
long seconds,
int nanos)
throws RuntimeException
writeDuration in interface ValueWriter<RuntimeException>RuntimeExceptionpublic void writeDate(LocalDate localDate) throws RuntimeException
writeDate in interface ValueWriter<RuntimeException>RuntimeExceptionpublic void writeLocalTime(LocalTime localTime) throws RuntimeException
writeLocalTime in interface ValueWriter<RuntimeException>RuntimeExceptionpublic void writeTime(OffsetTime offsetTime) throws RuntimeException
writeTime in interface ValueWriter<RuntimeException>RuntimeExceptionpublic void writeLocalDateTime(LocalDateTime localDateTime) throws RuntimeException
writeLocalDateTime in interface ValueWriter<RuntimeException>RuntimeExceptionpublic void writeDateTime(ZonedDateTime zonedDateTime) throws RuntimeException
writeDateTime in interface ValueWriter<RuntimeException>RuntimeExceptionpublic void writeGeoPoint(GeoPoint geoPoint) throws RuntimeException
writeGeoPoint in interface ValueWriter<RuntimeException>RuntimeExceptionpublic 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 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 © 2016–2021 MWARE SOLUTIONS. All rights reserved.