Package org.jibx.binding.model

Examples of org.jibx.binding.model.StructureElement.children()


        m_structureStack.push(cname);
        StructureElement element = new StructureElement();
        element.setFieldName(fname);
        element.setName(valueName(fname));
        defineStructure(cf, element);
        if (element.children().isEmpty()) {
            throw new JiBXException("No content found for class " + cname);
        }
        m_structureStack.pop();
        if (m_verbose) {
            nestingIndent(System.out);
View Full Code Here


        assertEquals("default element name", "dataClass1", mapping.getName());
        assertEquals("mapped items", 1, mapping.children().size());
        child = mapping.children().get(0);
        assertTrue("child type", child instanceof StructureElement);
        StructureElement struct = (StructureElement)child;
        assertEquals("mapping reference structure content", 0, struct.children().size());
        qname = struct.getMapAsQName();
        assertNotNull("type name", qname);
        assertEquals("reference type name", "dataClass1", qname.getName());
        assertEquals("reference type namespace", "http://jibx.org/binding/generator", qname.getUri());
    }
View Full Code Here

        assertEquals("specified element name", "class1", mapping.getName());
        assertEquals("mapped items", 1, mapping.children().size());
        child = mapping.children().get(0);
        assertTrue("child type", child instanceof StructureElement);
        struct = (StructureElement)child;
        assertEquals("mapping reference structure content", 0, struct.children().size());
        qname = struct.getMapAsQName();
        assertNotNull("type name", qname);
        assertEquals("reference type name", "class1", qname.getName());
        assertEquals("reference type namespace", "http://www.jibx.org/test", qname.getUri());
    }
View Full Code Here

               
            } else if (child instanceof StructureElement) {
               
                // structure, check for nested definition
                StructureElement struct = (StructureElement)child;
                if (struct.children().size() > 0) {
                   
                    // just handle references from nested components
                    checkReferences(struct, null);
                   
                } else {
View Full Code Here

                   
                } else {
                   
                    // structure, check for mapping reference
                    StructureElement struct = (StructureElement)comp;
                    if (struct.children().size() > 0) {
                       
                        // add container structure to expansion list
                        expands.add(comp);
                       
                    } else {
View Full Code Here

            }
        } else {
           
            // must be a structure, check children
            StructureElement struct = (StructureElement)comp;
            if (struct.children().size() > 0) {
               
                // structure with children, choice or sequence from order
                ComplexTypeElement type = new ComplexTypeElement();
                if (struct.isOrdered()) {
                   
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.