org.freehep.graphics2d
Class TagHandler
java.lang.Object
org.freehep.graphics2d.TagHandler
- Direct Known Subclasses:
- GenericTagHandler
public class TagHandler
- extends Object
- Version:
- $Id: TagHandler.java 8584 2006-08-10 23:06:37Z duns $
- Author:
- Mark Donszelmann
Method Summary |
protected String |
closeTag(String tag)
|
protected String |
defaultEntity(String entity)
|
protected String |
entity(String entity)
|
static void |
main(String[] args)
|
protected String |
openTag(String tag)
|
String |
parse(TagString string)
parses string and calls methods for every tag and every not recognized
entity The characters < and > have to be written as < and > while
the & is written as &
The following three methods are called: defaultEntity(entity) for &
< > " ' entity(entity) for all other entities
openTag(tag) for all endTag(tag) for all text(text) for
all text
The startTag, endTag and text methods returns a string which is added to
the fully parsed string. |
protected String |
text(String text)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TagHandler
public TagHandler()
parse
public String parse(TagString string)
- parses string and calls methods for every tag and every not recognized
entity The characters < and > have to be written as < and > while
the & is written as &
The following three methods are called: defaultEntity(entity) for &
< > " ' entity(entity) for all other entities
openTag(tag) for all endTag(tag) for all text(text) for
all text
The startTag, endTag and text methods returns a string which is added to
the fully parsed string.
Strings returned from the entity methods will show up in the text methods
parameter.
It returns the fully parsed string, including any additions made by the
three methods above.
defaultEntity
protected String defaultEntity(String entity)
entity
protected String entity(String entity)
openTag
protected String openTag(String tag)
closeTag
protected String closeTag(String tag)
text
protected String text(String text)
main
public static void main(String[] args)
Copyright © 2012. All Rights Reserved.