Package org.eclipse.xsd

Examples of org.eclipse.xsd.XSDNamedComponent


    boolean contains( XSDNamedComponent c, List l ) {

        boolean contains = false;
        for ( Iterator i = l.iterator(); !contains && i.hasNext(); ) {
            XSDNamedComponent e = (XSDNamedComponent) i.next();
            if ( e.getName().equals( c.getName() ) ) {
                if ( e.getTargetNamespace() == null ) {
                    contains = c.getTargetNamespace() == null;
                }
                else {
                    contains = e.getTargetNamespace().equals( c.getTargetNamespace() );
                }
            }
        }
       
        return contains;
View Full Code Here


        return type;
    }

    protected XSDNamedComponent lookup(Map index, QName qName) {
        XSDNamedComponent component = (XSDNamedComponent) index.get(qName);

        if (component != null) {
            return component;
        }
View Full Code Here

            }

            if (bindingName == null) {
                //do we have a containing type?
                if (container != null) {
                    XSDNamedComponent base = container;
                   
                    //the container itself could be an anonymous type, check for
                    // a named containing element
                    if ( container.getName() == null ) {
                        if ( container.getContainer() instanceof XSDElementDeclaration ) {
                            XSDElementDeclaration e = (XSDElementDeclaration) container.getContainer();
                           
                            //only do this if the containing element is global
                            if ( e.isGlobal() ) {
                                base = e;
                            }
                        }
                    }
                   
                    //get the anonymous element, and look it up in the container type
                    if (type.getContainer() instanceof XSDElementDeclaration) {
                        XSDElementDeclaration anonymous = (XSDElementDeclaration) type.getContainer();
                        XSDParticle particle = Schemas.getChildElementParticle(container,
                                anonymous.getName(), true);

                        if (particle != null) {
                            bindingName = new QName(base.getTargetNamespace(),
                                    base.getName() + "_" + anonymous.getName());
                        }
                    }
                }
            }
View Full Code Here

    boolean contains( XSDNamedComponent c, List l ) {

        boolean contains = false;
        for ( Iterator i = l.iterator(); !contains && i.hasNext(); ) {
            XSDNamedComponent e = (XSDNamedComponent) i.next();
            if ( e.getName().equals( c.getName() ) ) {
                if ( e.getTargetNamespace() == null ) {
                    contains = c.getTargetNamespace() == null;
                }
                else {
                    contains = e.getTargetNamespace().equals( c.getTargetNamespace() );
                }
            }
        }
       
        return contains;
View Full Code Here

    boolean contains( XSDNamedComponent c, List l ) {

        boolean contains = false;
        for ( Iterator i = l.iterator(); !contains && i.hasNext(); ) {
            XSDNamedComponent e = (XSDNamedComponent) i.next();
            if ( e.getName().equals( c.getName() ) ) {
                if ( e.getTargetNamespace() == null ) {
                    contains = c.getTargetNamespace() == null;
                }
                else {
                    contains = e.getTargetNamespace().equals( c.getTargetNamespace() );
                }
            }
        }
       
        return contains;
View Full Code Here

TOP

Related Classes of org.eclipse.xsd.XSDNamedComponent

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.