OutputFormatter.java revision 2
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher//The MIT License
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher//Copyright (c) 2003 Ron Alford, Mike Grove, Bijan Parsia, Evren Sirin
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher//Permission is hereby granted, free of charge, to any person obtaining a copy
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher//of this software and associated documentation files (the "Software"), to
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher//deal in the Software without restriction, including without limitation the
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher//rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher//sell copies of the Software, and to permit persons to whom the Software is
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher//furnished to do so, subject to the following conditions:
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher//The above copyright notice and this permission notice shall be included in
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher//all copies or substantial portions of the Software.
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher//FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher//IN THE SOFTWARE.
de5fa34860886ad68fba5e739987e16c342e8f14Lukas Slebodnik * Created on Sep 3, 2003
dbea04f585a30d001b574317c068cd03a4fa332bJakub Hrozek * A simple class to ease the the process of printing on console and printing an HTML output. By
dbea04f585a30d001b574317c068cd03a4fa332bJakub Hrozek * setting one variable the format of the output printed is changed, e.g. HTML tags will not
dbea04f585a30d001b574317c068cd03a4fa332bJakub Hrozek * be printed when the output is being printed to console.
b32159300fea63222d8dd9200ed634087704ea74Stephen Gallagher * @author Evren Sirin
boolean formatHTML;
public OutputFormatter() {
public boolean isFormatHTML() {
return formatHTML;
return out;
public void flush() {
if(formatHTML)
print(o);
println();
println();
if(formatHTML)
if(formatHTML)
if(formatHTML)
if(formatHTML) {
if(formatHTML) {
if(formatHTML)
return qnames;