Package org.jibx.schema.elements

Examples of org.jibx.schema.elements.OpenAttrBase.type()


            OpenAttrBase comp = current.getSchemaComponent();
            last = comp;
            if (comp instanceof INamed) {
                String check = ((INamed)comp).getName();
                if (check != null) {
                    int type = comp.type();
                    if (type == SchemaBase.ATTRIBUTE_TYPE || type == SchemaBase.ELEMENT_TYPE) {
                        name = check;
                    } else if (alttext == null) {
                        alttext = "'" + check + "' " + comp.name();
                    }
View Full Code Here


                }
               
                // initialize extensions for full tree of non-excluded global definition components
                if (!exten.isRemoved()) {
                    extendGlobal(builder, wlkr, exten);
                } else if (global.type() == SchemaBase.SIMPLETYPE_TYPE ||
                    global.type() == SchemaBase.COMPLEXTYPE_TYPE) {
                    setReplacement(((INamed)global).getQName(), null);
                }
            }
        }
View Full Code Here

               
                // initialize extensions for full tree of non-excluded global definition components
                if (!exten.isRemoved()) {
                    extendGlobal(builder, wlkr, exten);
                } else if (global.type() == SchemaBase.SIMPLETYPE_TYPE ||
                    global.type() == SchemaBase.COMPLEXTYPE_TYPE) {
                    setReplacement(((INamed)global).getQName(), null);
                }
            }
        }
        // TreeWalker.setLogging(level);
View Full Code Here

    public void applyAndCountUsage(ValidationContext vctx) {
       
        // handle type substitutions for this component
        OpenAttrBase component = getComponent();
        boolean delete = false;
        switch (component.type())
        {
           
            case SchemaBase.ATTRIBUTE_TYPE:
            {
                if (isIgnored()) {
View Full Code Here

                if (childext.normalize(depth+1)) {
                    modified = true;
                }
               
                // check for child components with special normalization handling
                switch (childcomp.type()) {
                   
                    case SchemaBase.ALL_TYPE:
                    case SchemaBase.CHOICE_TYPE:
                    case SchemaBase.SEQUENCE_TYPE:
                    {
View Full Code Here

     */
    public static String componentPath(OpenAttrBase comp) {
        StringBuffer buff = new StringBuffer();
        StringBuffer segment = new StringBuffer();
        OpenAttrBase node = comp;
        while (node != null && node.type() != SchemaBase.SCHEMA_TYPE) {
            segment.append(node.name());
            String name;
            OpenAttrBase parent = node.getParent();
            if (node instanceof INamed && (name = ((INamed)node).getName()) != null) {
                segment.append("[@name=");
View Full Code Here

                if (parent != null) {
                    for (Iterator iter = parent.getChildIterator(); iter.hasNext();) {
                        OpenAttrBase child = (OpenAttrBase)iter.next();
                        if (child == node) {
                            break;
                        } else if (child.type() == node.type()) {
                            index++;
                        }
                    }
                }
                if (index > 1) {
View Full Code Here

            } else {
               
                // construct mapping element
                MappingElementBase mapping = new MappingElement();
                mapping.setClassName(clas.getBindingName());
                if (comp.type() == SchemaBase.ELEMENT_TYPE) {
                   
                    // abstract or concrete mapping for element
                    ElementElement element = (ElementElement)comp;
                    setName(element.getEffectiveQName(), mapping, holder);
                    mapping.setAbstract(element.isAbstract());
View Full Code Here

                            }
                           
                            // check for type definition or reference used (with associated namespace reference)
                            QName tname = null;
                            comp = item.getSchemaComponent();
                            switch (comp.type()) {
                                case SchemaBase.ATTRIBUTE_TYPE:
                                    tname = ((AttributeElement)comp).getType();
                                    break;
                                case SchemaBase.ELEMENT_TYPE:
                                    tname = ((ElementElement)comp).getType();
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.