Package org.exolab.castor.xml.schema

Examples of org.exolab.castor.xml.schema.AttributeDecl


        }

        switch (_annotated.getStructureType()) {
            case Structure.ATTRIBUTE:
                //--resolve reference?
                AttributeDecl attribute = (AttributeDecl) _annotated;
                if (attribute.isReference()) {
                    attribute = attribute.getReference();
                }
                _schema = attribute.getSchema();
                attribute = null;
                break;
            case Structure.ELEMENT:
                //--resolve reference?
                ElementDecl element = (ElementDecl) _annotated;
View Full Code Here


            }

            if (result == null || result.length() <= 0) {
                Annotated temp = null;
                if (_annotated.getStructureType() == Structure.ATTRIBUTE) {
                     AttributeDecl att = (AttributeDecl) _annotated;
                     if (att.isReference()) {
                         temp = _annotated;
                         setView(att.getReference());
                         result = getJavaMemberName();
                         setView(temp);
                     }
                     att = null;
                } else if (_annotated.getStructureType() == Structure.ELEMENT) {
View Full Code Here

            return;
        }

        Enumeration<AttributeDecl> enumeration = complexType.getAttributeDecls();
        while (enumeration.hasMoreElements()) {
            AttributeDecl attribute = enumeration.nextElement();
            processSimpleType(attribute.getSimpleType(), sInfo);
        }
    } //-- processAttributes
View Full Code Here

        }
        //Note: the attributes are added to the complexType
        //since a simpleType does not contain attributes at all
        //-- attribute
    else if (SchemaNames.ATTRIBUTE.equals(name)) {
            AttributeDecl attrDecl =
                ((AttributeUnmarshaller)unmarshaller).getAttribute();

      /**@todo add the validation code later*/

      /*ComplexType baseType = (ComplexType)_complexType.getBaseType();
View Full Code Here

                throw new IllegalArgumentException(e.getMessage());
            }
        }
    //-- attribute
    else if (SchemaNames.ATTRIBUTE.equals(name)) {
            AttributeDecl attrDecl =
                ((AttributeUnmarshaller)unmarshaller).getAttribute();

             /**@todo do the validation later*/
            _complexType.addAttributeDecl(attrDecl);
        }
View Full Code Here

            }
        }

        //-- attribute declarations
        else if (SchemaNames.ATTRIBUTE.equals(name)) {
            AttributeDecl attrDecl =
                ((AttributeUnmarshaller)unmarshaller).getAttribute();

            _complexType.addAttributeDecl(attrDecl);
        }
        //-- attribute groups
View Full Code Here

          case Structure.ATTRIBUTE :
            if (result == null) {
                        //--handle reference: if the element referred a
                        //--global element then we use the global binding
                        AttributeDecl attribute = (AttributeDecl) annotated;
              if (attribute.isReference()) {
                xPath = getSchemaLocation(attribute.getReference());
                result = lookupComponentBindingType(xPath);
                        }
              attribute = null;
                    }
            break;
View Full Code Here

        Enumeration enumeration = complexType.getAttributeDecls();
        XMLBindingComponent component = new XMLBindingComponent(_config);
        if (_binding != null) component.setBinding(_binding);
        while (enumeration.hasMoreElements()) {
            AttributeDecl attr = (AttributeDecl)enumeration.nextElement();
           
            component.setView(attr);
    
            //-- if we have a new SimpleType...generate ClassInfo
            SimpleType sType = attr.getSimpleType();
            if (sType != null) {
                if ( ! (SimpleTypesFactory.isBuiltInType(sType.getTypeCode())) )
               
                if (sType.getSchema() == component.getSchema())
                {
View Full Code Here

        Schema schema = null;
        Form form = null;
       
        switch (_annotated.getStructureType()) {
            case Structure.ATTRIBUTE:
                AttributeDecl attribute = (AttributeDecl)_annotated;
                //-- resolve reference
                if (attribute.isReference())
                    attribute = attribute.getReference();
               
                schema = attribute.getSchema();
               
                //-- top-level (use targetNamespace of schema)
                if (attribute.getParent() == schema)
                    break;
               
                //-- check form (qualified or unqualified)
                form = attribute.getForm();
                if (form == null) {
                    form = schema.getAttributeFormDefault();
                }
                if ((form == null) || form.isUnqualified()) {
                    //-- no targetNamespace by default
View Full Code Here

        if (_schema == null) {

            switch (_annotated.getStructureType()) {
                case Structure.ATTRIBUTE:
                    //--resolve reference?
                    AttributeDecl attribute = (AttributeDecl)_annotated;
                    if (attribute.isReference())
                        attribute = attribute.getReference();
               
                    _schema = attribute.getSchema();
                    attribute = null;
                    break;
                case Structure.ELEMENT:
                    //--resolve reference?
                    ElementDecl element = (ElementDecl)_annotated;
View Full Code Here

TOP

Related Classes of org.exolab.castor.xml.schema.AttributeDecl

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.