net.exegetic.markout
Class MarkoutProcessor

java.lang.Object
  extended by net.exegetic.markout.MarkoutProcessor

public class MarkoutProcessor
extends java.lang.Object

Converts Markout to Markdown or XHTML.

Author:
Nathan Winant

Constructor Summary
MarkoutProcessor()
          Constructs a MarkoutProcessor.
 
Method Summary
 void addPattern(FreeLinkPattern pattern)
          Add a FreeLinkPattern to be parsed.
 void loadProperties(java.lang.String filePath)
          Load properties from an XML properties file.
static void main(java.lang.String[] args)
          So's this puppy can be called from the CLI.
 java.lang.String preprocess(java.lang.String text)
          Convert Markout to Markdown.
 java.lang.String process(java.lang.String text)
          Convert Markout to XHTML.
 java.lang.String processWithTitle(java.lang.String text, java.lang.String title)
          Convert Markout to XHTML.
 void wrapInCDATA(boolean value)
          Determines if the XHTML output is wrapped in a CDATA block.
 void wrapInDocument(boolean value)
          Determines if XHTML output is wrapped in a proper XHTML document.
 void wrapInParentElement(java.lang.String elementName)
          Will wrap the resulting XHTML in an element, if not null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MarkoutProcessor

public MarkoutProcessor()
Constructs a MarkoutProcessor.

Method Detail

preprocess

public java.lang.String preprocess(java.lang.String text)
Convert Markout to Markdown.

Parameters:
text - Input markout text
Returns:
Markdown as String

processWithTitle

public java.lang.String processWithTitle(java.lang.String text,
                                         java.lang.String title)
Convert Markout to XHTML. Specifies the value for the title tag, if wrapInDocument is true.

Parameters:
text - Input markout text
title - Title of XHTML document
Returns:
XHTML as String

process

public java.lang.String process(java.lang.String text)
Convert Markout to XHTML.

Returns:
XHTML as String

addPattern

public void addPattern(FreeLinkPattern pattern)
Add a FreeLinkPattern to be parsed.


wrapInCDATA

public void wrapInCDATA(boolean value)
Determines if the XHTML output is wrapped in a CDATA block. Default is false.


wrapInParentElement

public void wrapInParentElement(java.lang.String elementName)
Will wrap the resulting XHTML in an element, if not null.

Parameters:
elementName - Name of the element that the XHTML should be wrapped in.

wrapInDocument

public void wrapInDocument(boolean value)
Determines if XHTML output is wrapped in a proper XHTML document. Default is false.


loadProperties

public void loadProperties(java.lang.String filePath)
                    throws java.util.InvalidPropertiesFormatException,
                           java.io.IOException,
                           java.io.FileNotFoundException
Load properties from an XML properties file.

Parameters:
filePath - The path to the properties file.
Throws:
java.util.InvalidPropertiesFormatException
java.io.IOException
java.io.FileNotFoundException

main

public static void main(java.lang.String[] args)
So's this puppy can be called from the CLI.

Parameters:
-propfile - The path to the properties file. This is a flag, ie, -propfile [filePath]


Copyright © 2007 das markout Projekt. All Rights Reserved.