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

com.legstar.mq.mqcih.bind.MqcihHostToXmlTransformer Maven / Gradle / Ivy

/*******************************************************************************
 * Copyright (c) 2010 LegSem.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Lesser Public License v2.1
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * 
 * Contributors:
 *     LegSem - initial API and implementation
 ******************************************************************************/
package com.legstar.mq.mqcih.bind;

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: *

 *  MqcihHostToXmlTransformer transformer = new MqcihHostToXmlTransformer();
 *  StringWriter writer = new StringWriter();
 *  transformer.transform(hostByteArray, writer);
 * 
* */ public class MqcihHostToXmlTransformer extends AbstractHostToXmlTransformer { /** * Create a Host to XML transformer using a Host to Java transformer. * @throws HostTransformException if transformer cannot be created */ public MqcihHostToXmlTransformer() throws HostTransformException { super(new MqcihHostToJavaTransformer()); } /** * 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 MqcihHostToXmlTransformer( final CobolContext cobolContext) throws HostTransformException { super(new MqcihHostToJavaTransformer(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 MqcihHostToXmlTransformer( final String hostCharset) throws HostTransformException { super(new MqcihHostToJavaTransformer(hostCharset)); } /** {@inheritDoc} */ public String getElementName() { return "Mqcih"; } /** {@inheritDoc} */ public String getNamespace() { return "http://legstar.com/mq/mqcih"; } /** {@inheritDoc} */ public boolean isXmlRootElement() { return false; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy