org.melati.template
Class HTMLLikeMarkupLanguage

Package class diagram package HTMLLikeMarkupLanguage
java.lang.Object
  extended by org.melati.template.AbstractMarkupLanguage
      extended by org.melati.template.HTMLLikeMarkupLanguage
All Implemented Interfaces:
MarkupLanguage
Direct Known Subclasses:
HTMLMarkupLanguage, WMLMarkupLanguage, XMLMarkupLanguage

public abstract class HTMLLikeMarkupLanguage
extends AbstractMarkupLanguage
implements MarkupLanguage

A Markup language with syntax similar to HTML.


Field Summary
 
Fields inherited from class org.melati.template.AbstractMarkupLanguage
DATE_FIELD_POSSIBILITIES_LIMIT, FIELD_POSSIBILITIES_LIMIT, locale, melati, templetLoader
 
Constructor Summary
protected HTMLLikeMarkupLanguage(String name, HTMLLikeMarkupLanguage other)
           
  HTMLLikeMarkupLanguage(String name, Melati melati, TempletLoader templetLoader, PoemLocale locale)
          Constructor.
 
Method Summary
 String decoded(String s)
          Decode a UTF-8 URL encoded string.
 String encoded(String s)
          Encode a String as a UTF-8 URL.
 String escaped(Persistent o)
          Get the DisplayString of a Persistent and escape that using the current locale and a MEDIUM DateFormat.
 String escaped(String s)
          Escape a String.
 void render(String s, MelatiWriter writer)
          Render, directly to the output stream, substituting entities for high value ASCII characters and new line characters.
 void renderMarkup(String s, MelatiWriter writer)
          Render a markup fragment in a MarkupLanguage specific way to a supplied MelatiWriter.
 
Methods inherited from class org.melati.template.AbstractMarkupLanguage
expandTemplet, getName, input, input, inputAs, render, render, render, render, render, rendered, rendered, rendered, rendered, renderedMarkup, renderedStart, renderStart, searchInput, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.melati.template.MarkupLanguage
getAttr, getName, input, inputAs, rendered, rendered, rendered, rendered, renderedMarkup, renderedStart, searchInput
 

Constructor Detail

HTMLLikeMarkupLanguage

public HTMLLikeMarkupLanguage(String name,
                              Melati melati,
                              TempletLoader templetLoader,
                              PoemLocale locale)
Constructor.


HTMLLikeMarkupLanguage

protected HTMLLikeMarkupLanguage(String name,
                                 HTMLLikeMarkupLanguage other)
Method Detail

render

public void render(String s,
                   MelatiWriter writer)
Render, directly to the output stream, substituting entities for high value ASCII characters and new line characters. To avoid the unnecessary overhead of writing to a string and then writing that string to the output stream we render directly to the output stream.

Specified by:
render in class AbstractMarkupLanguage
Parameters:
s - - the string to be rendered
writer - - the MelatiWriter to render this String to

renderMarkup

public void renderMarkup(String s,
                         MelatiWriter writer)
Render a markup fragment in a MarkupLanguage specific way to a supplied MelatiWriter.

Specified by:
renderMarkup in class AbstractMarkupLanguage
Parameters:
s - - the fragment to be rendered
writer - - the MelatiWriter to render this String to
See Also:
AbstractMarkupLanguage.renderMarkup(java.lang.String, org.melati.util.MelatiWriter)

escaped

public String escaped(String s)
Escape a String.

Specified by:
escaped in interface MarkupLanguage
Parameters:
s - the String to escape
Returns:
the escaped String

escaped

public String escaped(Persistent o)
Get the DisplayString of a Persistent and escape that using the current locale and a MEDIUM DateFormat. See org/melati/admin/SelectionWindowSelection.wm See org/melati/admin/Update.wm

Specified by:
escaped in interface MarkupLanguage
Parameters:
o -
Returns:
the escaped DisplayString

encoded

public String encoded(String s)
Encode a String as a UTF-8 URL.

Specified by:
encoded in interface MarkupLanguage
Parameters:
s - the String to encode
Returns:
the encoded String
See Also:
MarkupLanguage.encoded(java.lang.String)

decoded

public String decoded(String s)
Decode a UTF-8 URL encoded string.

Specified by:
decoded in interface MarkupLanguage
Returns:
the decoded String
See Also:
MarkupLanguage.decoded(java.lang.String)


Copyright © 2000-2010 PanEris. All Rights Reserved.