org.umber.catalan.process.workers.text
Class TextToXmlCommand
java.lang.Object
org.umber.catalan.process.workers.BaseMetadataHolder
org.umber.catalan.process.commands.BaseCommand
org.umber.catalan.process.workers.text.BaseTextCommand
org.umber.catalan.process.workers.text.TextToXmlCommand
- All Implemented Interfaces:
- ICommand, IMetadataHolder
- public class TextToXmlCommand
- extends BaseTextCommand
Implementation of "text-to-xml" command.
This class can also be used as a standalone utility, outside the context
of a worker runtime, by calling the convertToXml()
method
directly.
- Author:
- jsheets
Constructor Summary |
TextToXmlCommand()
Creates a new instance of TextToXmlCommand. |
Method Summary |
Datum |
convertToXml(java.lang.String text)
Converts the given text into a Bellows XML tree. |
void |
run(CommandContext context)
Invokes this command against the given workspace with the given
runtime properties. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextToXmlCommand
public TextToXmlCommand()
- Creates a new instance of TextToXmlCommand.
run
public void run(CommandContext context)
throws ProcessException
- Invokes this command against the given workspace with the given
runtime properties. The owning Worker should verify that all required
properties are present before invoking
run()
.
- Parameters:
context
- command context
- Throws:
ProcessException
- if a fatal error occurs during processing
convertToXml
public Datum convertToXml(java.lang.String text)
- Converts the given text into a Bellows XML tree.
- Parameters:
text
- input text
- Returns:
- output XML