public class FormatterElement extends FormatterBase implements ElementVisitor
Modifier and Type | Field and Description |
---|---|
static boolean |
ELEMENT1_FIXED_INDENT
Control whether NOT EXIST/EXISTS indents in a fixed way or based on the layout size
|
static boolean |
GRAPH_FIXED_INDENT
Control whether GRAPH indents in a fixed way or based on the layout size
|
static boolean |
GROUP_FIRST_ON_SAME_LINE
Control whether the first item of a group is on the same line as the {
|
static boolean |
GROUP_SEP_DOT
Control whether (non-triple) patterns have a final dot - it can be dropped
|
static boolean |
GROUP_UNNEST_ONE
Control whether a group of one is unnested - changes the query syntax tree
|
static int |
INDENT |
static boolean |
PATTERN_MARKERS
Control whether to show triple pattern boundaries - creates extra nesting
|
static boolean |
PRETTY_PRINT
Control pretty printing
|
static int |
TRIPLES_COLUMN_GAP |
static int |
TRIPLES_PROPERTY_COLUMN |
static int |
TRIPLES_SUBJECT_COLUMN
Control triples pretty printing
|
static int |
TRIPLES_SUBJECT_LONG |
static boolean |
UNION_MARKERS
Control whether disjunction has set of delimiters - as it's a group usually, these aren't needed
|
Constructor and Description |
---|
FormatterElement(IndentedWriter out,
SerializationContext context) |
Modifier and Type | Method and Description |
---|---|
static String |
asString(Element el) |
static void |
format(IndentedWriter out,
SerializationContext cxt,
Element el) |
boolean |
topMustBeGroup() |
void |
visit(ElementAssign el) |
void |
visit(ElementBind el) |
void |
visit(ElementData el) |
void |
visit(ElementDataset el) |
void |
visit(ElementExists el) |
void |
visit(ElementFilter el) |
void |
visit(ElementGroup el) |
void |
visit(ElementMinus el) |
void |
visit(ElementNamedGraph el) |
void |
visit(ElementNotExists el) |
void |
visit(ElementOptional el) |
void |
visit(ElementPathBlock el) |
void |
visit(ElementService el) |
void |
visit(ElementSubQuery el) |
void |
visit(ElementTriplesBlock el) |
void |
visit(ElementUnion el) |
void |
visitAsGroup(Element el) |
finishVisit, startVisit
public static final int INDENT
public static final boolean PATTERN_MARKERS
public static final boolean GROUP_SEP_DOT
public static final boolean GROUP_FIRST_ON_SAME_LINE
public static final boolean PRETTY_PRINT
public static final boolean UNION_MARKERS
public static final boolean GROUP_UNNEST_ONE
public static final boolean GRAPH_FIXED_INDENT
public static final boolean ELEMENT1_FIXED_INDENT
public static final int TRIPLES_SUBJECT_COLUMN
public static final int TRIPLES_SUBJECT_LONG
public static final int TRIPLES_PROPERTY_COLUMN
public static final int TRIPLES_COLUMN_GAP
public FormatterElement(IndentedWriter out, SerializationContext context)
public static void format(IndentedWriter out, SerializationContext cxt, Element el)
public boolean topMustBeGroup()
public void visit(ElementTriplesBlock el)
visit
in interface ElementVisitor
public void visit(ElementPathBlock el)
visit
in interface ElementVisitor
public void visit(ElementDataset el)
visit
in interface ElementVisitor
public void visit(ElementFilter el)
visit
in interface ElementVisitor
public void visit(ElementAssign el)
visit
in interface ElementVisitor
public void visit(ElementBind el)
visit
in interface ElementVisitor
public void visit(ElementData el)
visit
in interface ElementVisitor
public void visit(ElementUnion el)
visit
in interface ElementVisitor
public void visit(ElementGroup el)
visit
in interface ElementVisitor
public void visit(ElementOptional el)
visit
in interface ElementVisitor
public void visit(ElementNamedGraph el)
visit
in interface ElementVisitor
public void visit(ElementService el)
visit
in interface ElementVisitor
public void visit(ElementExists el)
visit
in interface ElementVisitor
public void visit(ElementNotExists el)
visit
in interface ElementVisitor
public void visit(ElementMinus el)
visit
in interface ElementVisitor
public void visit(ElementSubQuery el)
visit
in interface ElementVisitor
public void visitAsGroup(Element el)
Licenced under the Apache License, Version 2.0