org.freehep.graphics2d
Class TagHandler
java.lang.Object
org.freehep.graphics2d.TagHandler
- Direct Known Subclasses:
- GenericTagHandler
public class TagHandler
- extends java.lang.Object
- Version:
- $Id: TagHandler.java 8584 2006-08-10 23:06:37Z duns $
- Author:
- Mark Donszelmann
Method Summary |
protected java.lang.String |
closeTag(java.lang.String tag)
|
protected java.lang.String |
defaultEntity(java.lang.String entity)
|
protected java.lang.String |
entity(java.lang.String entity)
|
static void |
main(java.lang.String[] args)
|
protected java.lang.String |
openTag(java.lang.String tag)
|
java.lang.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 java.lang.String |
text(java.lang.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 java.lang.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 java.lang.String defaultEntity(java.lang.String entity)
entity
protected java.lang.String entity(java.lang.String entity)
openTag
protected java.lang.String openTag(java.lang.String tag)
closeTag
protected java.lang.String closeTag(java.lang.String tag)
text
protected java.lang.String text(java.lang.String text)
main
public static void main(java.lang.String[] args)
Copyright © 2000-2007 FreeHEP. All Rights Reserved.