Examples of ElementDecl


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

                         result = getJavaMemberName();
                         setView(temp);
                     }
                     att = null;
                } else if (_annotated.getStructureType() == Structure.ELEMENT) {
                     ElementDecl element = (ElementDecl) _annotated;
                     if (element.isReference()) {
                         temp = _annotated;
                         setView(element.getReference());
                         result = getJavaMemberName();
                         boolean userSpecified = _userSpecifiedMemberName;
                         setView(temp);

                         //-- there might be more than once reference, so we
                         //-- need to do a little counting here.
                         if (!userSpecified) {
                            String refName = element.getReferenceName();
                            int count = 0;
                            int index = 0;
                            Structure structure = element.getParent();
                            if (structure instanceof ContentModelGroup) {
                                ContentModelGroup cmg = (ContentModelGroup) structure;
                                Enumeration<Structure> enumeration = cmg.enumerate();
                                while (enumeration.hasMoreElements()) {
                                    Structure tmpStruct = enumeration.nextElement();
                                    if (tmpStruct.getStructureType() == Structure.ELEMENT) {
                                        ElementDecl tmpDecl = (ElementDecl) tmpStruct;
                                        if (tmpDecl.isReference()
                                                && tmpDecl.getReferenceName().equals(refName)) {
                                            ++count;
                                            if (tmpDecl == element) {
                                                index = count;
                                            }
                                        }
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.