Package com.legstar.xsd

Examples of com.legstar.xsd.XsdRootElement


        _xsd2cob.getModel().setInputXsdUri(
                (new File(XSD_DIR, "customertype.xsd")).toURI());
        _xsd2cob.getModel().setTargetXsdFile(GEN_XSD_DIR);
        _xsd2cob.getModel().setTargetCobolFile(GEN_COBOL_DIR);
        _xsd2cob.getModel().addNewRootElement(
                new XsdRootElement("customer", "CustomerType"));

        _xsd2cob.execute();

        check("customertype", "xsd", FileUtils.readFileToString(new File(
                GEN_XSD_DIR, "customertype.xsd"), "UTF-8"));
View Full Code Here


     */
    public void testListssdo() throws Exception {

        Xsd2Cob api = new Xsd2Cob();
        api.getModel().addNewRootElement(
                new XsdRootElement("dfhcommarea", "Dfhcommarea"));

        XsdToCobolStringResult results = api.translate(FileUtils
                .readFileToString(new File(XSD_DIR, "listssdo.xsd"), "UTF-8"));
        check("listssdo", "xsd", results.getCobolXsd());
        check("listssdo", "cpy", results.getCobolStructure());
View Full Code Here

        props = model.toProperties();
        assertTrue(props.getProperty(Xsd2CobModel.INPUT_XSD_URI).contains(
                "src/test/resources/cases/customertype.xsd"));

        List < XsdRootElement > newRootElements = new ArrayList < XsdRootElement >();
        newRootElements.add(new XsdRootElement("el1:Type1"));
        newRootElements.add(new XsdRootElement("el2:Type2"));
        model.setNewRootElements(newRootElements);
        props = model.toProperties();
        assertEquals("el1:Type1", props.getProperty("newRootElements_0"));
        assertEquals("el2:Type2", props.getProperty("newRootElements_1"));
View Full Code Here

        model.setInputXsdUri(new URI(
                "src/test/resources/cases/customertype.xsd"));
        model.setTargetXsdFile(GEN_XSD_DIR);
        model.setTargetCobolFile(GEN_COBOL_DIR);
        model.setTargetCobolEncoding("ISO-8859-1");
        model.addNewRootElement(new XsdRootElement("customer", "CustomerType"));
        model.setCustomXsltFileName("src/test/resources/xslt/customertype.xsl");

        File resultFile = genAntScriptAsFile(model);
        check("build", "xml", FileUtils.readFileToString(resultFile, "UTF-8"));
View Full Code Here

TOP

Related Classes of com.legstar.xsd.XsdRootElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.