/**
* A component of a library for
* MoSeS.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
package uk.ac.leeds.ccg.andyt.projects.moses.io;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URL;
import java.util.Calendar;
/**
* Class for generating Web Content.
*/
public abstract class WebContentHandler {
/** Creates a new instance of RegressionPlots */
public WebContentHandler() {
}
public void writeHTML(String _BaseURL, String _Directory,
String _FilenamePrefix, String _FilenameSuffix,
int int_MainBodyControlSwitch) throws IOException {
FileOutputStream _FileOutputStream = new FileOutputStream(new File(
_Directory, _FilenamePrefix + _FilenameSuffix
+ ".xhtml2.0.html"));
byte[] _LineSeparator = System.getProperty("line.separator").getBytes();
writeHTMLDTD(_LineSeparator, _FileOutputStream);
writeHTMLHead(_LineSeparator, _FilenamePrefix, _FileOutputStream);
writeHTMLBody(_LineSeparator, _BaseURL, _FilenamePrefix,
_FilenameSuffix, _FileOutputStream, int_MainBodyControlSwitch);
_FileOutputStream.flush();
_FileOutputStream.close();
}
public void writeHTML(URL _BaseURL, String _Name, File _File)
throws IOException {
FileOutputStream _FileOutputStream = new FileOutputStream(_File);
byte[] _LineSeparator = System.getProperty("line.separator").getBytes();
writeHTMLDTD(_LineSeparator, _FileOutputStream);
writeHTMLHead(_LineSeparator, _BaseURL, _Name, _FileOutputStream);
writeHTMLBody(_LineSeparator, _BaseURL, _Name, _FileOutputStream);
_FileOutputStream.flush();
_FileOutputStream.close();
}
public void writeHTMLBodyFooter(byte[] _LineSeparator, String _BaseURL,
String filenamePrefix, FileOutputStream _FileOutputStream)
throws IOException {
_FileOutputStream.write(new String("").getBytes());
_FileOutputStream.write(_LineSeparator);
_FileOutputStream.write(new String("