public class PrintUtil extends Object
Modifier and Type | Field and Description |
---|---|
static String |
egNS
Default built in eg namespace used in testing
|
Constructor and Description |
---|
PrintUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
expandQname(String uri)
Expand qnames to URIs.
|
static void |
init()
Load built in prefixes.
|
static String |
print(Node node)
Return a simplified print string for a Node.
|
static String |
print(Object obj)
Default print which just uses tostring
|
static String |
print(RDFNode node)
Return a simplified print string for an RDFNode.
|
static String |
print(Statement stmt)
Return a simplified print string for a statement
|
static String |
print(Triple triple)
Return a simplified print string for a Triple
|
static String |
print(TriplePattern triple)
Return a simplified print string for a TriplePattern
|
static void |
printIndent(PrintWriter out,
int indent)
Print an n-space indent to the given output stream
|
static void |
printOut(Iterator<?> it)
Print all the Triple values from a find iterator.
|
static void |
registerPrefix(String prefix,
String namespace)
Register a new prefix/namespace mapping which will be used to shorten
the print strings for resources in known namespaces.
|
static void |
registerPrefixMap(Map<String,String> map)
Register a set of new prefix/namespace mapping which will be used to shorten
the print strings for resources in known namespaces.
|
static void |
removePrefix(String prefix)
Remove a registered prefix from the table of known short forms
|
static void |
removePrefixMap(Map<String,String> map)
Remove a set of prefix mappings from the table of known short forms
|
public static final String egNS
public static void init()
public static void registerPrefix(String prefix, String namespace)
public static void registerPrefixMap(Map<String,String> map)
public static void removePrefix(String prefix)
public static void removePrefixMap(Map<String,String> map)
public static String print(TriplePattern triple)
public static String expandQname(String uri)
public static void printIndent(PrintWriter out, int indent)
public static void printOut(Iterator<?> it)
Licenced under the Apache License, Version 2.0