uk.ac.bbk.dcs.automed.xml.utilities
Class PrintUtility

java.lang.Object
  extended by uk.ac.bbk.dcs.automed.xml.utilities.PrintUtility

public class PrintUtility
extends java.lang.Object


Constructor Summary
PrintUtility()
           
 
Method Summary
static void banner()
          Prints a line of 90 stars.
static void banner(int num)
          Prints a line of num stars.
static java.lang.String documentToString(org.w3c.dom.Document d)
          Returns the String representation of document d.
static void prettyPrint(org.w3c.dom.Node n)
          Outputs the subtree with root n to System.out with identation, without any respect to the file's original identation
static void prettyPrint(org.w3c.dom.Node n, java.lang.String title)
          Outputs the subtree with root n to System.out with identation, without any respect to the file's original identation.
static void printDocument(org.w3c.dom.Document doc)
          Outputs Document doc in System.out exactly as it is in the DOM.
static void printDocument(org.w3c.dom.Document doc, java.io.File f)
          Outputs Document doc in File f exactly as it is in the DOM.
static void printDocument(org.w3c.dom.Document doc, java.io.PrintStream ps)
          Outputs Document doc in ps exactly as it is in the DOM.
static void printSource(java.lang.String label, org.w3c.dom.Document doc, org.w3c.dom.Document schemaUIDDoc, Schema schema)
           
static void title(java.lang.String title)
          Prints a line of stars, then the input title centered inside a line of stars, then another line of stars.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrintUtility

public PrintUtility()
Method Detail

printDocument

public static void printDocument(org.w3c.dom.Document doc,
                                 java.io.File f)
Outputs Document doc in File f exactly as it is in the DOM. This means that if there is no identation, it will not add any.


documentToString

public static java.lang.String documentToString(org.w3c.dom.Document d)
Returns the String representation of document d.


printDocument

public static void printDocument(org.w3c.dom.Document doc)
Outputs Document doc in System.out exactly as it is in the DOM. This means that if there is no identation, it will not add any.


printDocument

public static void printDocument(org.w3c.dom.Document doc,
                                 java.io.PrintStream ps)
Outputs Document doc in ps exactly as it is in the DOM. This means that if there is no identation, it will not add any.


banner

public static void banner(int num)
Prints a line of num stars.


title

public static void title(java.lang.String title)
Prints a line of stars, then the input title centered inside a line of stars, then another line of stars.


banner

public static void banner()
Prints a line of 90 stars.


prettyPrint

public static void prettyPrint(org.w3c.dom.Node n,
                               java.lang.String title)
Outputs the subtree with root n to System.out with identation, without any respect to the file's original identation.

Parameters:
n - the root of the subtree - will accept a Document variable
Throws:
XMLException

prettyPrint

public static void prettyPrint(org.w3c.dom.Node n)
Outputs the subtree with root n to System.out with identation, without any respect to the file's original identation

Parameters:
n - the root of the subtree - will accept a Document variable
Throws:
XMLException
org.w3c.dom.DOMException

printSource

public static void printSource(java.lang.String label,
                               org.w3c.dom.Document doc,
                               org.w3c.dom.Document schemaUIDDoc,
                               Schema schema)