All Downloads are FREE. Search and download functionalities are using the official Maven repository.

vlc.coxb-bind-host-to-xml-transformer.vm Maven / Gradle / Ivy

The newest version!
## Determine the value Object type
#set ($valueObjectType = $coxbHelper.getBoundTypeName($binding))
package ${coxbContext.getCoxbPackageName()};

import com.legstar.coxb.CobolContext;
import com.legstar.coxb.transform.AbstractHostToXmlTransformer;
import com.legstar.coxb.transform.HostTransformException;

/**
 * Transforms mainframe data to XML.
 * 

* This is a typical use of this class: *

 *  ${valueObjectType}HostToXmlTransformer transformer = new ${valueObjectType}HostToXmlTransformer();
 *  StringWriter writer = new StringWriter();
 *  transformer.transform(hostByteArray, writer);
 * 
* */ public class ${binding.jaxbName}HostToXmlTransformer extends AbstractHostToXmlTransformer { /** * Create a Host to XML transformer using a Host to Java transformer. * @throws HostTransformException if transformer cannot be created */ public ${binding.jaxbName}HostToXmlTransformer() throws HostTransformException { super(new ${binding.jaxbName}HostToJavaTransformer()); } /** * Create a Host to XML transformer using a specific COBOL parameters set. * @param cobolContext the COBOL parameters set. * @throws HostTransformException if transformer cannot be created */ public ${binding.jaxbName}HostToXmlTransformer( final CobolContext cobolContext) throws HostTransformException { super(new ${binding.jaxbName}HostToJavaTransformer(cobolContext)); } /** * Create a Host to XML transformer using a specific host character set while * other COBOL parameters are set by default. * @param hostCharset the host character set * @throws HostTransformException if transformer cannot be created */ public ${binding.jaxbName}HostToXmlTransformer( final String hostCharset) throws HostTransformException { super(new ${binding.jaxbName}HostToJavaTransformer(hostCharset)); } /** {@inheritDoc} */ public String getElementName() { return "$coxbHelper.getXmlElementName($binding)"; } /** {@inheritDoc} */ public String getNamespace() { return "$coxbHelper.getXmlNamespace($binding)"; } /** {@inheritDoc} */ public boolean isXmlRootElement() { return $coxbHelper.isXmlRootElement($binding); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy