com.hp.hpl.jena.sparql.serializer
Class FormatterElement

java.lang.Object
  extended by com.hp.hpl.jena.sparql.serializer.FormatterBase
      extended by com.hp.hpl.jena.sparql.serializer.FormatterElement
All Implemented Interfaces:
ElementVisitor

public class FormatterElement
extends FormatterBase
implements ElementVisitor


Field Summary
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 Summary
FormatterElement(IndentedWriter out, SerializationContext context)
           
 
Method Summary
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(ElementDataset el)
           
 void visit(ElementExists el)
           
 void visit(ElementFetch 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 com.hp.hpl.jena.sparql.serializer.FormatterBase
finishVisit, startVisit
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

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

GROUP_UNNEST_ONE

public static final boolean GROUP_UNNEST_ONE
Control whether a group of one is unnested - changes the query syntax tree

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(IndentedWriter out,
                        SerializationContext context)
Method Detail

format

public static void format(IndentedWriter out,
                          SerializationContext cxt,
                          Element el)

asString

public static String asString(Element el)

topMustBeGroup

public boolean topMustBeGroup()

visit

public void visit(ElementTriplesBlock el)
Specified by:
visit in interface ElementVisitor

visit

public void visit(ElementPathBlock el)
Specified by:
visit in interface ElementVisitor

visit

public void visit(ElementDataset el)
Specified by:
visit in interface ElementVisitor

visit

public void visit(ElementFilter el)
Specified by:
visit in interface ElementVisitor

visit

public void visit(ElementAssign el)
Specified by:
visit in interface ElementVisitor

visit

public void visit(ElementBind el)
Specified by:
visit in interface ElementVisitor

visit

public void visit(ElementUnion el)
Specified by:
visit in interface ElementVisitor

visit

public void visit(ElementGroup el)
Specified by:
visit in interface ElementVisitor

visit

public void visit(ElementOptional el)
Specified by:
visit in interface ElementVisitor

visit

public void visit(ElementNamedGraph el)
Specified by:
visit in interface ElementVisitor

visit

public void visit(ElementService el)
Specified by:
visit in interface ElementVisitor

visit

public void visit(ElementFetch el)
Specified by:
visit in interface ElementVisitor

visit

public void visit(ElementExists el)
Specified by:
visit in interface ElementVisitor

visit

public void visit(ElementNotExists el)
Specified by:
visit in interface ElementVisitor

visit

public void visit(ElementMinus el)
Specified by:
visit in interface ElementVisitor

visit

public void visit(ElementSubQuery el)
Specified by:
visit in interface ElementVisitor

visitAsGroup

public void visitAsGroup(Element el)


Licenced under the Apache License, Version 2.0