Examples of IdentityConstraint


Examples of org.apache.xerces.validators.schema.identity.IdentityConstraint

        /** Returns the value store associated to the specified field. */
        public ValueStoreBase getValueStoreFor(Field field) {
            if (DEBUG_VALUE_STORES) {
                System.out.println("<VS>: "+toString()+"#getValueStoreFor("+field+")");
            }
            IdentityConstraint identityConstraint = field.getIdentityConstraint();
            return (ValueStoreBase)fIdentityConstraint2ValueStoreMap.get(identityConstraint);
        } // getValueStoreFor(Field):ValueStoreBase
View Full Code Here

Examples of org.apache.xerces.validators.schema.identity.IdentityConstraint

            }
            int newCount = fMatcherStack.getMatcherCount();
            // handle everything *but* keyref's.
            for (int i = oldCount - 1; i >= newCount; i--) {
                XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
                IdentityConstraint id;
                if((id = matcher.getIDConstraint()) != null  && id.getType() != IdentityConstraint.KEYREF) {
                    if (DEBUG_IDENTITY_CONSTRAINTS) {
                        System.out.println("<IC>: "+matcher+"#endDocumentFragment()");
                    }
                    matcher.endDocumentFragment();
                    fValueStoreCache.transplant(id);
                } else if (id == null)
                    matcher.endDocumentFragment();
            }
            // now handle keyref's/...
            for (int i = oldCount - 1; i >= newCount; i--) {
                XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
                IdentityConstraint id;
                if((id = matcher.getIDConstraint()) != null && id.getType() == IdentityConstraint.KEYREF) {
                    if (DEBUG_IDENTITY_CONSTRAINTS) {
                        System.out.println("<IC>: "+matcher+"#endDocumentFragment()");
                    }
                    ValueStoreBase values = fValueStoreCache.getValueStoreFor(id);
                    if(values != null) // nothing to do if nothing matched!
View Full Code Here

Examples of org.apache.xerces.validators.schema.identity.IdentityConstraint

            }
            int newCount = fMatcherStack.getMatcherCount();
            // handle everything *but* keyref's.
            for (int i = oldCount - 1; i >= newCount; i--) {
                XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
                IdentityConstraint id;
                if((id = matcher.getIDConstraint()) != null  && id.getType() != IdentityConstraint.KEYREF) {
                    if (DEBUG_IDENTITY_CONSTRAINTS) {
                        System.out.println("<IC>: "+matcher+"#endDocumentFragment()");
                    }
                    matcher.endDocumentFragment();
                    fValueStoreCache.transplant(id);
                } else if (id == null)
                    matcher.endDocumentFragment();
            }
            // now handle keyref's/...
            for (int i = oldCount - 1; i >= newCount; i--) {
                XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
                IdentityConstraint id;
                if((id = matcher.getIDConstraint()) != null && id.getType() == IdentityConstraint.KEYREF) {
                    if (DEBUG_IDENTITY_CONSTRAINTS) {
                        System.out.println("<IC>: "+matcher+"#endDocumentFragment()");
                    }
                    ValueStoreBase values = fValueStoreCache.getValueStoreFor(id);
                    if(values != null) // nothing to do if nothing matched!
View Full Code Here

Examples of org.apache.xerces.validators.schema.identity.IdentityConstraint

        if ( colonptr > 0) {
            prefix = kName.substring(0,colonptr);
            localpart = kName.substring(colonptr+1);
        }
        String uriStr = resolvePrefixToURI(prefix);
        IdentityConstraint kId = (IdentityConstraint)fIdentityConstraintNames.get(uriStr+","+localpart);
        if (kId== null) {
            reportSchemaError(SchemaMessageProvider.KeyRefReferNotFound,
                              new Object[]{krName,kName});
            return;
        }
View Full Code Here

Examples of org.apache.xerces.validators.schema.identity.IdentityConstraint

        public void endElement() {
            if (fGlobalMapStack.isEmpty()) return; // must be an invalid doc!
            Hashtable oldMap = (Hashtable)fGlobalMapStack.pop();
            Enumeration keys = oldMap.keys();
            while(keys.hasMoreElements()) {
                IdentityConstraint id = (IdentityConstraint)keys.nextElement();
                ValueStoreBase oldVal = (ValueStoreBase)oldMap.get(id);
                if(oldVal != null) {
                    ValueStoreBase currVal = (ValueStoreBase)fGlobalIDConstraintMap.get(id);
                    if (currVal == null)
                        fGlobalIDConstraintMap.put(id, oldVal);
View Full Code Here

Examples of org.apache.xerces.validators.schema.identity.IdentityConstraint

        /** Returns the value store associated to the specified field. */
        public ValueStoreBase getValueStoreFor(Field field) {
            if (DEBUG_VALUE_STORES) {
                System.out.println("<VS>: "+toString()+"#getValueStoreFor("+field+")");
            }
            IdentityConstraint identityConstraint = field.getIdentityConstraint();
            return (ValueStoreBase)fIdentityConstraint2ValueStoreMap.get(identityConstraint);
        } // getValueStoreFor(Field):ValueStoreBase
View Full Code Here

Examples of org.apache.xerces.validators.schema.identity.IdentityConstraint

        if ( colonptr > 0) {
            prefix = kName.substring(0,colonptr);
            localpart = kName.substring(colonptr+1);
        }
        String uriStr = resolvePrefixToURI(prefix);
        IdentityConstraint kId = (IdentityConstraint)fIdentityConstraintNames.get(uriStr+","+localpart);
        if (kId== null) {
            reportSchemaError(SchemaMessageProvider.KeyRefReferNotFound,
                              new Object[]{krName,kName});
            return;
        }

        String eName = getElementNameFor(krElem);
        KeyRef keyRef = new KeyRef(krName, kId, eName);

        // add to element decl
        traverseIdentityConstraint(keyRef, krElem);
        if(keyRef.getFieldCount() != kId.getFieldCount()){
                 reportSchemaError(SchemaMessageProvider.CardinalityNotEqual, new Object[]{krName,kName});
                 return ;
        }

        // add key reference to element decl
View Full Code Here

Examples of org.apache.xmlbeans.impl.common.IdentityConstraint

        _errorListener = (Collection) options.get(XmlOptions.ERROR_LISTENER);

        if (_errorListener == null)
            _errorListener = defaultErrorListener;

        _constraintEngine = new IdentityConstraint(_errorListener, type.isDocumentType());

        _globalTypes = globalLoader;
        _chars = new Chars();
        _rootType = type;
        _rootField = field;
View Full Code Here

Examples of org.apache.xmlbeans.impl.common.IdentityConstraint

        _errorListener = (Collection) options.get(XmlOptions.ERROR_LISTENER);

        if (_errorListener == null)
            _errorListener = defaultErrorListener;

        _constraintEngine = new IdentityConstraint(_errorListener, type.isDocumentType());

        _globalTypes = globalLoader;
        _chars = new Chars();
        _rootType = type;
        _rootField = field;
View Full Code Here

Examples of org.apache.xmlbeans.impl.common.IdentityConstraint

        _treatLaxAsSkip = options.hasOption(XmlOptions.VALIDATE_TREAT_LAX_AS_SKIP);

        if (_errorListener == null)
            _errorListener = defaultErrorListener;

        _constraintEngine = new IdentityConstraint(_errorListener, type.isDocumentType());

        _globalTypes = globalLoader;
        _rootType = type;
        _rootField = field;
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.