Class FormatterElement
- java.lang.Object
-
- org.apache.jena.sparql.serializer.FormatterBase
-
- org.apache.jena.sparql.serializer.FormatterElement
-
- All Implemented Interfaces:
ElementVisitor
public class FormatterElement extends FormatterBase implements ElementVisitor
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
ELEMENT1_FIXED_INDENT
Control whether NOT EXIST/EXISTS indents in a fixed way or based on the layout sizestatic boolean
FMT_FREE_STANDING_LISTS
Control pretty printing of free standing RDF listsstatic boolean
FMT_LISTS
Control pretty printing of RDF listsstatic boolean
GRAPH_FIXED_INDENT
Control whether GRAPH indents in a fixed way or based on the layout sizestatic 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 droppedstatic int
INDENT
static boolean
PATTERN_MARKERS
Control whether to show triple pattern boundaries - creates extra nestingstatic boolean
PRETTY_PRINT
Control pretty printingstatic int
TRIPLES_COLUMN_GAP
static int
TRIPLES_PROPERTY_COLUMN
static int
TRIPLES_SUBJECT_COLUMN
Control triples pretty printingstatic 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 Summary
Constructors Constructor Description FormatterElement(org.apache.jena.atlas.io.IndentedWriter out, SerializationContext context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.String
asString(Element el)
static void
format(org.apache.jena.atlas.io.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)
-
Methods inherited from class org.apache.jena.sparql.serializer.FormatterBase
finishVisit, startVisit
-
-
-
-
Field Detail
-
INDENT
public static final int INDENT
- See Also:
- Constant Field Values
-
PATTERN_MARKERS
public static final boolean PATTERN_MARKERS
Control whether to show triple pattern boundaries - creates extra nesting- See Also:
- Constant Field Values
-
GROUP_SEP_DOT
public static final boolean GROUP_SEP_DOT
Control whether (non-triple) patterns have a final dot - it can be dropped- See Also:
- Constant Field Values
-
GROUP_FIRST_ON_SAME_LINE
public static final boolean GROUP_FIRST_ON_SAME_LINE
Control whether the first item of a group is on the same line as the {- See Also:
- Constant Field Values
-
PRETTY_PRINT
public static final boolean PRETTY_PRINT
Control pretty printing- See Also:
- Constant Field Values
-
FMT_LISTS
public static final boolean FMT_LISTS
Control pretty printing of RDF lists- See Also:
- Constant Field Values
-
FMT_FREE_STANDING_LISTS
public static final boolean FMT_FREE_STANDING_LISTS
Control pretty printing of free standing RDF lists- See Also:
- Constant Field Values
-
UNION_MARKERS
public static final boolean UNION_MARKERS
Control whether disjunction has set of delimiters - as it's a group usually, these aren't needed- See Also:
- Constant Field Values
-
GRAPH_FIXED_INDENT
public static final boolean GRAPH_FIXED_INDENT
Control whether GRAPH indents in a fixed way or based on the layout size- See Also:
- Constant Field Values
-
ELEMENT1_FIXED_INDENT
public static final boolean ELEMENT1_FIXED_INDENT
Control whether NOT EXIST/EXISTS indents in a fixed way or based on the layout size- See Also:
- Constant Field Values
-
TRIPLES_SUBJECT_COLUMN
public static final int TRIPLES_SUBJECT_COLUMN
Control triples pretty printing- See Also:
- Constant Field Values
-
TRIPLES_SUBJECT_LONG
public static final int TRIPLES_SUBJECT_LONG
- See Also:
- Constant Field Values
-
TRIPLES_PROPERTY_COLUMN
public static final int TRIPLES_PROPERTY_COLUMN
- See Also:
- Constant Field Values
-
TRIPLES_COLUMN_GAP
public static final int TRIPLES_COLUMN_GAP
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FormatterElement
public FormatterElement(org.apache.jena.atlas.io.IndentedWriter out, SerializationContext context)
-
-
Method Detail
-
format
public static void format(org.apache.jena.atlas.io.IndentedWriter out, SerializationContext cxt, Element el)
-
asString
public static java.lang.String asString(Element el)
-
topMustBeGroup
public boolean topMustBeGroup()
-
visit
public void visit(ElementTriplesBlock el)
- Specified by:
visit
in interfaceElementVisitor
-
visit
public void visit(ElementPathBlock el)
- Specified by:
visit
in interfaceElementVisitor
-
visit
public void visit(ElementDataset el)
- Specified by:
visit
in interfaceElementVisitor
-
visit
public void visit(ElementFilter el)
- Specified by:
visit
in interfaceElementVisitor
-
visit
public void visit(ElementAssign el)
- Specified by:
visit
in interfaceElementVisitor
-
visit
public void visit(ElementBind el)
- Specified by:
visit
in interfaceElementVisitor
-
visit
public void visit(ElementData el)
- Specified by:
visit
in interfaceElementVisitor
-
visit
public void visit(ElementUnion el)
- Specified by:
visit
in interfaceElementVisitor
-
visit
public void visit(ElementGroup el)
- Specified by:
visit
in interfaceElementVisitor
-
visit
public void visit(ElementOptional el)
- Specified by:
visit
in interfaceElementVisitor
-
visit
public void visit(ElementNamedGraph el)
- Specified by:
visit
in interfaceElementVisitor
-
visit
public void visit(ElementService el)
- Specified by:
visit
in interfaceElementVisitor
-
visit
public void visit(ElementExists el)
- Specified by:
visit
in interfaceElementVisitor
-
visit
public void visit(ElementNotExists el)
- Specified by:
visit
in interfaceElementVisitor
-
visit
public void visit(ElementMinus el)
- Specified by:
visit
in interfaceElementVisitor
-
visit
public void visit(ElementSubQuery el)
- Specified by:
visit
in interfaceElementVisitor
-
visitAsGroup
public void visitAsGroup(Element el)
-
-