Package org.exolab.castor.builder.binding.xml

Examples of org.exolab.castor.builder.binding.xml.ComponentBindingType


            }
           
            //--elementBindings
            Enumeration<ComponentBindingType> elements = loaded.enumerateElementBinding();
            while (elements.hasMoreElements()) {
                ComponentBindingType tempComp = elements.nextElement();
                _binding.addElementBinding(tempComp);
            }

            //--attributeBindings
            Enumeration<ComponentBindingType> attributes = loaded.enumerateAttributeBinding();
            while (attributes.hasMoreElements()) {
                ComponentBindingType  tempComp = attributes.nextElement();
                _binding.addAttributeBinding(tempComp);
            }

            //--ComplexTypeBindings
            Enumeration<ComponentBindingType> complexTypes = loaded.enumerateComplexTypeBinding();
            while (complexTypes.hasMoreElements()) {
                ComponentBindingType tempComp = complexTypes.nextElement();
                _binding.addComplexTypeBinding(tempComp);
            }

            //--SimpleTypeBindings
            Enumeration<ComponentBindingType> sts = loaded.enumerateSimpleTypeBinding();
            while (sts.hasMoreElements()) {
                ComponentBindingType tempComp = sts.nextElement();
                _binding.addSimpleTypeBinding(tempComp);
            }

            //--groupBindings
            Enumeration<ComponentBindingType> groups = loaded.enumerateGroupBinding();
            while (groups.hasMoreElements()) {
                ComponentBindingType tempComp = groups.nextElement();
                _binding.addGroupBinding(tempComp);
            }

            //--enumBinding
            Enumeration<ComponentBindingType> enums = loaded.enumerateEnumBinding();
            while (enums.hasMoreElements()) {
                ComponentBindingType tempEnum = enums.nextElement();
                _binding.addEnumBinding(tempEnum);
            }

            //--included schemas
            Enumeration<IncludeType> includes = loaded.enumerateInclude();
View Full Code Here


        if (!_bindingProcessed) {
            processBindingComponents();
        }

        String xPath = XPathHelper.getSchemaLocation(annotated);
        ComponentBindingType result = lookupComponentBindingType(xPath);
        if (result == null) {
            //--handle reference
            switch (annotated.getStructureType()) {

                case Structure.ELEMENT :
View Full Code Here

     */
    private ComponentBindingType lookupComponentBindingType(final String xPath) {
        if (xPath == null) {
            return null;
        }
        ComponentBindingType componentBinding =
            _componentBindings.get(xPath);
       
        // if no component binding has been found, retry with xpath without namespaces
        // this is to ensure backwards compatibility
        if (componentBinding == null) {
View Full Code Here

     *    <li>Create a key for the component for direct lookup.</li>
     *    <li>Process its children</li>
     * </ul>
     */
    private void processBindingComponents() {
        ComponentBindingType temp;
        ComponentBindingType[] tempBindings = getAttributeBinding();

        //1--attributes
        for (int i = 0; i < tempBindings.length; i++) {
            temp = tempBindings[i];
View Full Code Here

                throw new IllegalStateException("Invalid ComponentBindingType: the"
                        + " type (attribute, element, complextype or group) is unknown");
        }

        //--process children
        ComponentBindingType temp;
        ComponentBindingType[] tempBindings = binding.getAttributeBinding();

        //1--attributes
        for (int i = 0; i < tempBindings.length; i++) {
            temp = tempBindings[i];
View Full Code Here

TOP

Related Classes of org.exolab.castor.builder.binding.xml.ComponentBindingType

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.