|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.writersforge.catalan.process.workers.BaseMetadataHolder
org.writersforge.catalan.process.commands.BaseCommand
org.writersforge.catalan.process.workers.javabean.XmlToBeanCommand
Implementation of "xml-to-bean" command.
A command which converts each Datum input node into a JavaBean. Each XML-to-JavaBean conversion consists of two consecutive input data nodes: the target JavaBean class (as a fully qualified class name String or as a Class object); and the Datum tree itself. The processor will do its best to reconcile the XML content with the target Java class according to a very simple mapping between XML and JavaBean properties. Data that does not correlate with a JavaBean property or cannot be converted to the desired property type will be ignored.
This class can also be used as a standalone utility, outside the context
of a worker runtime, by calling the convertXml() method
directly.
| Constructor Summary | |
XmlToBeanCommand()
Creates a new instance of XmlToBeanCommand. |
|
| Method Summary | |
java.lang.Object |
convertXml(java.lang.Class beanClass,
org.writersforge.bellows.Datum xml)
Loads an XML tree into a JavaBean object from a Java Class. |
java.lang.Object |
convertXml(java.lang.String beanClassName,
org.writersforge.bellows.Datum xml)
Loads an XML tree into a JavaBean object from a fully qualified class String. |
void |
run(CommandContext context)
Invokes this command against the given workspace with the given runtime properties. |
| Methods inherited from class org.writersforge.catalan.process.workers.BaseMetadataHolder |
getMetadata, setOptionalProperties, setRequiredProperties, validateProperties, validateType |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.writersforge.catalan.process.workers.IMetadataHolder |
getMetadata, validateProperties, validateType |
| Constructor Detail |
public XmlToBeanCommand()
| Method Detail |
public void run(CommandContext context)
throws ProcessException
run().
context - command context
ProcessException - if a fatal error occurs during processing
public java.lang.Object convertXml(java.lang.String beanClassName,
org.writersforge.bellows.Datum xml)
beanClassName - class name of root JavaBean objectxml - XML content
public java.lang.Object convertXml(java.lang.Class beanClass,
org.writersforge.bellows.Datum xml)
beanClass - class of root JavaBean objectxml - XML content
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||