com.alvermont.bcimport
Class MTFormatter

java.lang.Object
  extended by com.alvermont.bcimport.MTFormatter

public class MTFormatter
extends java.lang.Object

Generates the output file in MoveableType format that can be imported by WordPress.


Field Summary
static java.lang.String ENTRY_SEPARATOR
          Separator string between entries (posts)
static java.lang.String FIELD_SEPARATOR
          Separator string between multi line fields within a post
 
Constructor Summary
MTFormatter()
          Creates a new instance of WordPressFormatter
 
Method Summary
 java.lang.String formatComment(Comment comment)
          Format a comment entry into a string for MT import
 java.lang.String formatDate(java.util.Date date)
          Format a date into the correct output format.
 java.lang.String formatPost(Post post)
          Format a post entry into a string for MT import
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENTRY_SEPARATOR

public static final java.lang.String ENTRY_SEPARATOR
Separator string between entries (posts)

See Also:
Constant Field Values

FIELD_SEPARATOR

public static final java.lang.String FIELD_SEPARATOR
Separator string between multi line fields within a post

See Also:
Constant Field Values
Constructor Detail

MTFormatter

public MTFormatter()
Creates a new instance of WordPressFormatter

Method Detail

formatDate

public java.lang.String formatDate(java.util.Date date)
Format a date into the correct output format.

Parameters:
date - The date to be formatted
Returns:
A string representation of the date in a suitable format

formatComment

public java.lang.String formatComment(Comment comment)
Format a comment entry into a string for MT import

Parameters:
comment - The comment to be formatted
Returns:
A formatted string containing the comment

formatPost

public java.lang.String formatPost(Post post)
Format a post entry into a string for MT import

Parameters:
post - The comment to be formatted
Returns:
A formatted string containing the post