Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.QNameSet


            SchemaParticle part = (SchemaParticle)i.next();
            if (part.getParticleType() == SchemaParticle.WILDCARD)
            {
                if (afterMap.containsKey(part))
                {
                    QNameSet startSet = (QNameSet)startMap.get(part);
                    QNameSet afterSet = (QNameSet)afterMap.get(part);
                    if (!startSet.containsAll(afterSet))
                        return false;
                }
            }
            afterMap.remove(part);
View Full Code Here


            _wildcardElement = currentParticle;

            if (currentParticle.getParticleType() == SchemaParticle.WILDCARD)
            {
                //_wildcardElement = currentParticle;
                QNameSet elemWildcardSet = currentParticle.getWildcardSet();

                if (!elemWildcardSet.contains( name ))
                {
                    // Additional processing may be needed to generate more
                    // descriptive messages
                    // KHK: cvc-complex-type.2.4? cvc-particle.1.3? cvc-wildcard-namespace ?
                    emitFieldError(event, XmlErrorCodes.PARTICLE_VALID$NOT_WILDCARD_VALID,
View Full Code Here

                attrName, null, null, XmlValidationError.INCORRECT_ATTRIBUTE, state._type);

            return;
        }

        QNameSet attrWildcardSet = state._attrModel.getWildcardSet();

        if (!attrWildcardSet.contains( attrName ))
        {
            // todo (dutta) need additional logic to determine the expectedSchemaType
            emitFieldError( event, XmlErrorCodes.ELEM_COMPLEX_TYPE_LOCALLY_VALID$NOT_WILDCARD_VALID,
                new Object[] { QNameHelper.pretty( attrName ) },
                attrName, null, null, XmlValidationError.INCORRECT_ATTRIBUTE, state._type);
View Full Code Here

    public TypeStoreUser add_element_user ( QName name )
    {
        if (!isContainer())
            throw new IllegalStateException();

        QNameSet endSet = null;
        boolean  gotEndSet = false;

        Xobj candidate = null;

        for ( Xobj x = _lastChild ; x != null ; x = x._prevSibling )
        {
            if (x.isContainer())
            {
                if (x._name.equals( name ))
                    break;

                if (!gotEndSet)
                {
                    endSet = _user.get_element_ending_delimiters( name );
                    gotEndSet = true;
                }

                if (endSet == null || endSet.contains( x._name ))
                    candidate = x;
            }
        }

        return
View Full Code Here

        if (plan == null) {
            return refMap;
        }

        QNameSet qnameSet = QNameSet.singleton(GerEjbRefDocument.type.getDocumentElementName());
        XmlObject[] xmlObjects = plan.selectChildren(qnameSet);
        if (xmlObjects != null) {
            for (XmlObject xmlObject : xmlObjects) {
                GerEjbRefType ref = (GerEjbRefType) xmlObject.copy().changeType(GerEjbRefType.type);
                refMap.put(ref.getRefName().trim(), ref);
View Full Code Here

        if (plan == null) {
            return refMap;
        }

        QNameSet qnameSet = QNameSet.singleton(GerEjbLocalRefDocument.type.getDocumentElementName());
        XmlObject[] xmlObjects = plan.selectChildren(qnameSet);
        if (xmlObjects != null) {
            for (XmlObject xmlObject : xmlObjects) {
                GerEjbLocalRefType ref = (GerEjbLocalRefType) xmlObject.copy().changeType(GerEjbLocalRefType.type);
                refMap.put(ref.getRefName().trim(), ref);
View Full Code Here

                    addBuilder((T) event.getMember());
                }

                public void memberRemoved(ReferenceCollectionEvent event) {
                    T builder = (T) event.getMember();
                    QNameSet builderSpecQNames = builder.getSpecQNameSet();
                    specQNames = specQNames.intersect(builderSpecQNames.inverse());
                    QNameSet builderPlanQNames = builder.getPlanQNameSet();
                    planQNames = planQNames.intersect(builderPlanQNames.inverse());
                    XmlBeansUtil.unregisterSubstitutionGroupElements(builder.getBaseQName(), builderPlanQNames);
                }
            });
        }
        for (T builder : this.builders) {
View Full Code Here

        }
    }


    protected void addBuilder(T builder) {
        QNameSet builderSpecQNames = builder.getSpecQNameSet();
        QNameSet builderPlanQNames = builder.getPlanQNameSet();
        if (builderSpecQNames == null) {
            throw new IllegalStateException("Builder " + builder + " is missing spec qnames");
        }
        if (builderPlanQNames == null) {
            throw new IllegalStateException("Builder " + builder + " is missing plan qnames");
View Full Code Here

        options.setLoadSubstituteNamespaces(NAMESPACE_UPDATES);
        return options;
    }

    public static void registerSubstitutionGroupElements(QName substitutionGroup, QNameSet substitutions) {
        QNameSet oldSubstitutions = substitutionGroups.get(substitutionGroup);
        if (oldSubstitutions != null) {
            substitutions = oldSubstitutions.union(substitutions);
        }
        substitutionGroups.put(substitutionGroup, substitutions);
    }
View Full Code Here

        }
        substitutionGroups.put(substitutionGroup, substitutions);
    }

    public static void unregisterSubstitutionGroupElements(QName substitutionGroup, QNameSet substitutions) {
        QNameSet oldSubstitutions = substitutionGroups.get(substitutionGroup);
        if (oldSubstitutions != null && substitutions != null) {
            QNameSet difference = oldSubstitutions.intersect(substitutions.inverse());
            substitutionGroups.put(substitutionGroup, difference);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.xmlbeans.QNameSet

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.