Examples of GlobalCustom


Examples of org.jibx.custom.classes.GlobalCustom

        assertEquals("mapped class", mapping.getClassName(), "DefaultPackageClass");
        assertEquals("mapped items", 5, mapping.children().size());
    }

    public void testSingleClassBinding() throws Exception {
        GlobalCustom custom = new GlobalCustom();
        custom.initClasses();
        custom.fillClasses();
        BindGen gen = new BindGen(custom);
        ArrayList types = new ArrayList();
        types.add("org.jibx.binding.generator.DataClass1");
        gen.generate(null, types);
        gen.finish("binding");
View Full Code Here

Examples of org.jibx.custom.classes.GlobalCustom

        assertEquals("mapped class", mapping.getClassName(), "org.jibx.binding.generator.DataClass1");
        assertEquals("mapped items", 4, mapping.children().size());
    }
   
    public void testMultiplePropertiesClasses1() throws Exception {
        GlobalCustom custom = readCustom(MULTIPLE_PROPERTIES_CLASSES1);
        BindGen gen = new BindGen(custom);
        ArrayList types = new ArrayList();
        types.add("org.jibx.binding.generator.DataClass1");
        types.add("org.jibx.binding.generator.DataClass2");
        gen.generate(null, types);
View Full Code Here

Examples of org.jibx.custom.classes.GlobalCustom

        assertEquals("reference type name", "dataClass1", qname.getName());
        assertEquals("reference type namespace", "http://jibx.org/binding/generator", qname.getUri());
    }
   
    public void testMultiplePropertiesClasses2() throws Exception {
        GlobalCustom custom = readCustom(MULTIPLE_PROPERTIES_CLASSES2);
        BindGen gen = new BindGen(custom);
        ArrayList types = new ArrayList();
        types.add("org.jibx.binding.generator.DataClass1");
        types.add("org.jibx.binding.generator.DataClass2");
        gen.generate(null, types);
View Full Code Here

Examples of org.jibx.custom.classes.GlobalCustom

     * @see org.jibx.binding.generator.ClassCustomizationBase#loadCustomizations(String,IClassLocator.ValidationContext)
     */
    protected void loadCustomizations(String path, IClassLocator loc, ValidationContext vctx) throws JiBXException, IOException {
       
        // load or create customization information
        m_global = new GlobalCustom(loc);
        m_global.setNamespaceStyle(new Integer(CustomBase.DERIVE_FIXED));
        if (path != null) {
            IBindingFactory fact = BindingDirectory.getFactory("class-customs-binding", GlobalCustom.class);
            IUnmarshallingContext ictx = fact.createUnmarshallingContext();
            FileInputStream is = new FileInputStream(path);
View Full Code Here

Examples of org.jibx.custom.classes.GlobalCustom

        "    <class name='generator.DataClass1'/>\n" +
        "  </package>\n" +
        "</custom>";
   
    public void testSimpleServiceClass() throws Exception {
        GlobalCustom custom = readCustom(SIMPLE_SERVICE_CLASS);
        List extens = custom.getExtensionChildren();
        assertEquals("extension count", 1, extens.size());
        Object item = extens.get(0);
        assertTrue("extension child type", item instanceof WsdlCustom);
        WsdlCustom wsdl = (WsdlCustom)item;
        List services = wsdl.getServices();
View Full Code Here

Examples of org.jibx.custom.classes.GlobalCustom

        ret = op.getReturn();
        assertEquals("setList returned type", "void", ret.getWorkingType());
    }
   
    public void testCustomizedServiceClass1() throws Exception {
        GlobalCustom custom = readCustom(CUSTOMIZED_SERVICE_CLASS1);
        List extens = custom.getExtensionChildren();
        assertEquals("extension count", 1, extens.size());
        Object item = extens.get(0);
        assertTrue("extension child type", item instanceof WsdlCustom);
        WsdlCustom wsdl = (WsdlCustom)item;
        List services = wsdl.getServices();
View Full Code Here

Examples of org.jibx.custom.classes.GlobalCustom

        IUnmarshallingContext ictx =
            m_bindingFactory.createUnmarshallingContext();
        ValidationContext vctx = new ValidationContext();
        ictx.setDocument(is, null);
        ictx.setUserContext(vctx);
        GlobalCustom global = (GlobalCustom)ictx.unmarshalElement();
        List problems = vctx.getProblems();
        if (problems.size() > 0) {
            StringBuffer buff = new StringBuffer();
            for (int i = 0; i < problems.size(); i++) {
                ValidationProblem prob = (ValidationProblem)problems.get(i);
                buff.append(prob.getSeverity() >=
                    ValidationProblem.ERROR_LEVEL ? "Error: " : "Warning: ");
                buff.append(prob.getDescription());
                buff.append('\n');
            }
            fail(buff.toString());
        }
        global.fillClasses();
        return global;
    }
View Full Code Here

Examples of org.jibx.custom.classes.GlobalCustom

     */
    protected void loadCustomizations(String path, IClassLocator loc, ValidationContext vctx) throws JiBXException, IOException {
       
        // load or create customization information
        setLocator(loc);
        m_global = new GlobalCustom(loc);
        if (path != null) {
            IBindingFactory fact = BindingDirectory.getFactory("class_customs_binding", GlobalCustom.class);
            IUnmarshallingContext ictx = fact.createUnmarshallingContext();
            FileInputStream is = new FileInputStream(path);
            ictx.setDocument(is, null);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.