gate.yam.convert
Class JSPWikiToYamConverter

java.lang.Object
  extended by gate.yam.convert.JSPWikiToYamConverter

public class JSPWikiToYamConverter
extends Object

Convert JSPWiki syntax to YAM.

Author:
Valentin Tablan

Constructor Summary
JSPWikiToYamConverter()
           
 
Method Summary
static void main(String[] args)
          Run the JSPWikiToYamConverter, translating the files specified on the command line from JSPWiki to YAM format.
static String readerToString(Reader jspReader)
          Converts text in JSPWiki format to YAM format.
static String readerToStringWithTitle(Reader jspReader, String title)
          Converts text in JSPWiki format to YAM format, adding the given title to the document.
static String stringToString(String jspWikiSource)
          Converts a JSPWiki page into YAM format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSPWikiToYamConverter

public JSPWikiToYamConverter()
Method Detail

stringToString

public static String stringToString(String jspWikiSource)
                             throws TransformerException,
                                    IOException
Converts a JSPWiki page into YAM format.

Parameters:
jspWikiSource - the String representing the JSPWiki content
Returns:
a String representation of a YAM page
Throws:
TransformerException - if problems occurred while performing the XSL transformation
IOException - if problems occurred while parsing the JSPWiki format

readerToString

public static String readerToString(Reader jspReader)
                             throws TransformerException,
                                    IOException
Converts text in JSPWiki format to YAM format.

Parameters:
jspReader - a reader that provides the JSPWiki content
Returns:
a String with YAM data
Throws:
TransformerException
IOException

readerToStringWithTitle

public static String readerToStringWithTitle(Reader jspReader,
                                             String title)
                                      throws TransformerException,
                                             IOException
Converts text in JSPWiki format to YAM format, adding the given title to the document. If the title is null, none is added.

Parameters:
jspReader - a reader that provides the JSPWiki content
title - the title to give the YAM document
Returns:
a String with YAM data
Throws:
TransformerException
IOException

main

public static void main(String[] args)
Run the JSPWikiToYamConverter, translating the files specified on the command line from JSPWiki to YAM format.

Parameters:
args - (JSPWiki file | JSPWiki directory) [output directory]