Examples of KeyRef


Examples of org.apache.xerces.impl.xs.identity.KeyRef

                            break;
                        }
                    case IdentityConstraint.IC_KEYREF :
                        {
                            String code = "KeyRefNotEnoughValues";
                            KeyRef keyref = (KeyRef) fIdentityConstraint;
                            String ename = fIdentityConstraint.getElementName();
                            String kname = (keyref.getKey()).getIdentityConstraintName();
                            reportSchemaError(code, new Object[] { ename, kname });
                            break;
                        }
                }
                return;
View Full Code Here

Examples of org.apache.xerces.impl.xs.identity.KeyRef

                        fValueStores.addElement(keyValueStore);
                        activateSelectorFor(icArray[i]);
                        break;
                    case (IdentityConstraint.IC_KEYREF) :
                        // initialize value stores for keyRef fields
                        KeyRef keyRef = (KeyRef) icArray[i];
                        toHash = new LocalIDKey(keyRef, fElementDepth);
                        KeyRefValueStore keyRefValueStore =
                            (KeyRefValueStore) fIdentityConstraint2ValueStoreMap.get(toHash);
                        if (keyRefValueStore == null) {
                            keyRefValueStore = new KeyRefValueStore(keyRef, null);
View Full Code Here

Examples of org.apache.xerces.impl.xs.identity.KeyRef

                        fValueStores.addElement(keyValueStore);
                        activateSelectorFor(icArray[i]);
                        break;
                    case (IdentityConstraint.IC_KEYREF) :
                        // initialize value stores for keyRef fields
                        KeyRef keyRef = (KeyRef) icArray[i];
                        toHash = new LocalIDKey(keyRef, fElementDepth);
                        KeyRefValueStore keyRefValueStore =
                            (KeyRefValueStore) fIdentityConstraint2ValueStoreMap.get(toHash);
                        if (keyRefValueStore == null) {
                            keyRefValueStore = new KeyRefValueStore(keyRef, null);
View Full Code Here

Examples of org.apache.xerces.impl.xs.identity.KeyRef

        if(key == null) {
            fAttrChecker.returnAttrArray(attrValues, schemaDoc);
            return;
        }

        KeyRef keyRef = new KeyRef(schemaDoc.fTargetNamespace, krName, element.fName, key);

        // add to element decl
        traverseIdentityConstraint(keyRef, krElem, schemaDoc, attrValues);

        //Schema Component Constraint: Identity-constraint Definition Properties Correct
        //2 If the {identity-constraint category} is keyref, the cardinality of the {fields} must equal that of the {fields} of the {referenced key}.
        if(key.getFieldCount() != keyRef.getFieldCount()) {
            reportSchemaError("c-props-correct.2" , new Object [] {krName,key.getIdentityConstraintName()}, krElem);
        } else {
            // add key reference to element decl
            // and stuff this in the grammar
            grammar.addIDConstraintDecl(element, keyRef);
View Full Code Here

Examples of org.apache.xerces.impl.xs.identity.KeyRef

                        fValueStores.add(keyValueStore);
                        activateSelectorFor(icArray[i]);
                        break;
                    case (IdentityConstraint.IC_KEYREF) :
                        // initialize value stores for keyRef fields
                        KeyRef keyRef = (KeyRef) icArray[i];
                        toHash = new LocalIDKey(keyRef, fElementDepth);
                        KeyRefValueStore keyRefValueStore =
                            (KeyRefValueStore) fIdentityConstraint2ValueStoreMap.get(toHash);
                        if (keyRefValueStore == null) {
                            keyRefValueStore = new KeyRefValueStore(keyRef, null, eDecl.getName());
View Full Code Here

Examples of org.apache.xerces.impl.xs.identity.KeyRef

                        fValueStores.addElement(keyValueStore);
                        activateSelectorFor(icArray[i]);
                        break;
                    case (IdentityConstraint.IC_KEYREF) :
                        // initialize value stores for keyRef fields
                        KeyRef keyRef = (KeyRef) icArray[i];
                        toHash = new LocalIDKey(keyRef, fElementDepth);
                        KeyRefValueStore keyRefValueStore =
                            (KeyRefValueStore) fIdentityConstraint2ValueStoreMap.get(toHash);
                        if (keyRefValueStore == null) {
                            keyRefValueStore = new KeyRefValueStore(keyRef, null);
View Full Code Here

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

                        reportSchemaError(code, new Object[]{ename,kname});
                        break;
                    }
                    case IdentityConstraint.KEYREF: {
                        int code = SchemaMessageProvider.KeyRefNotEnoughValues;
                        KeyRef keyref = (KeyRef)fIdentityConstraint;
                        String ename = fIdentityConstraint.getElementName();
                        String kname = (keyref.getKey()).getIdentityConstraintName();
                        reportSchemaError(code, new Object[]{ename,kname});
                        break;
                    }
                }
                return;
View Full Code Here

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

                    " has fewer <keyref> Identity Constraints than the base element"+
                    fStringPool.toString(baseElemName));
        } else {
            boolean found = true;
            for(int i=0; i<derivedKeyRef.size() && found; i++) {
                KeyRef id = (KeyRef)derivedKeyRef.elementAt(i);
                found = false;
                for(int j=0; j<baseKeyRef.size(); j++) {
                    if(id.equals((KeyRef)baseKeyRef.elementAt(j))) {
                        found = true;
                        break;
                    }
                }
            }
View Full Code Here

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

                              new Object[]{krName,kName});
            return;
        }
       
        String eName = getElementNameFor(krElem);
        KeyRef keyRef = new KeyRef(krName, kId, eName);

        // add to element decl
        traverseIdentityConstraint(keyRef, krElem);

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

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

            // initialize value stores for key reference fields
            Vector krVector = eDecl.keyRef;
            int krCount = krVector.size();
            for (int i = 0; i < krCount; i++) {
                KeyRef keyRef = (KeyRef)krVector.elementAt(i);
                KeyRefValueStore keyRefValueStore = new KeyRefValueStore(keyRef, null);
                fValueStores.addElement(keyRefValueStore);
                if (DEBUG_VALUE_STORES) {
                    System.out.println("<VS>: "+keyRef+" -> "+keyRefValueStore);
                }
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.