public interface PrintContext
| Modifier and Type | Method and Description |
|---|---|
PrintContext |
clone()
Creates a clone of this PrintContext so that it can be used recursively.
|
int |
getIndentation()
Gets the indentation level starting at 0.
|
org.apache.jena.rdf.model.RDFNode |
getInitialBinding(String varName)
Gets an initial binding for a variable, so that a constant
will be inserted into the query string instead of the variable name.
|
org.apache.jena.sparql.util.NodeToLabelMap |
getNodeToLabelMap()
Gets the Jena NodeToLabelMap associated with this.
|
boolean |
getPrintPrefixes()
Checks whether prefix declarations shall be printed into the
head of the query.
|
boolean |
getUseExtraPrefixes()
Checks if the extra prefixes (such as afn:) shall be used to resolve
qnames, even if they are not imported by the current model.
|
boolean |
getUsePrefixes()
Checks if resource URIs shall be abbreviated with qnames at all.
|
boolean |
hasInitialBindings()
Checks whether any initial bindings have been declared for this context.
|
boolean |
isNamedBNodeMode()
Checks if we are inside of a mode (such as INSERT { GRAPH { ...
|
boolean |
isNested()
Checks if we are inside braces such as a nested expression.
|
void |
print(String str)
Prints a given string to the output stream.
|
void |
printIndentation(int depth)
Prints the indentation string depth times.
|
void |
printKeyword(String str)
Prints a keyword to the output stream.
|
void |
println()
Prints a line break to the output stream.
|
void |
printURIResource(org.apache.jena.rdf.model.Resource resource)
Prints a URI to the output stream.
|
void |
printVariable(String str)
Prints a variable to the output stream.
|
void |
setIndentation(int value)
Changes the indentation level.
|
void |
setNamedBNodeMode(boolean value)
Activates or deactivates the mode in which bnodes are rendered as named
variables, such as _:b0.
|
void |
setNested(boolean value)
Sets the nested flag.
|
void |
setPrintPrefixes(boolean value)
Sets the printPrefixes flag.
|
void |
setUseExtraPrefixes(boolean value)
Specifies whether the context shall use extra prefixes.
|
void |
setUsePrefixes(boolean value)
Specifies whether the context shall use any prefixes at all.
|
PrintContext clone()
int getIndentation()
setIndentation(int)org.apache.jena.rdf.model.RDFNode getInitialBinding(String varName)
varName - the name of the variable to matchorg.apache.jena.sparql.util.NodeToLabelMap getNodeToLabelMap()
boolean getPrintPrefixes()
boolean getUseExtraPrefixes()
setUseExtraPrefixes(boolean)boolean getUsePrefixes()
boolean hasInitialBindings()
boolean isNamedBNodeMode()
boolean isNested()
void print(String str)
str - the String to printvoid printIndentation(int depth)
depth - the number of indentations to printvoid printKeyword(String str)
str - the keyword stringvoid println()
void printURIResource(org.apache.jena.rdf.model.Resource resource)
resource - the URI of the resource to printvoid printVariable(String str)
str - the variable string excluding the ?void setIndentation(int value)
value - the new indentation levelvoid setNamedBNodeMode(boolean value)
value - true to activate, false to deactivatevoid setNested(boolean value)
value - the new valueisNested()void setPrintPrefixes(boolean value)
value - the new valuegetPrintPrefixes()void setUseExtraPrefixes(boolean value)
value - the new valuegetUseExtraPrefixes()void setUsePrefixes(boolean value)
value - the new valuegetUsePrefixes()Copyright © 2017 TopQuadrant, Inc.. All rights reserved.