Package org.apache.xerces.impl.xs.identity

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


            // handle everything *but* keyref's.
            for (int i = oldCount - 1; i >= newCount; i--) {
                XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
                if (matcher instanceof Selector.Matcher) {
                    Selector.Matcher selMatcher = (Selector.Matcher) matcher;
                    IdentityConstraint id;
                    if ((id = selMatcher.getIdentityConstraint()) != null
                            && id.getCategory() != IdentityConstraint.IC_KEYREF) {
                        fValueStoreCache.transplant(id, selMatcher.getInitialDepth());
                    }
                }
            }
           
            // now handle keyref's/...
            for (int i = oldCount - 1; i >= newCount; i--) {
                XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
                if (matcher instanceof Selector.Matcher) {
                    Selector.Matcher selMatcher = (Selector.Matcher) matcher;
                    IdentityConstraint id;
                    if ((id = selMatcher.getIdentityConstraint()) != null
                            && id.getCategory() == IdentityConstraint.IC_KEYREF) {
                        ValueStoreBase values =
                            fValueStoreCache.getValueStoreFor(id, selMatcher.getInitialDepth());
                        if (values != null) // nothing to do if nothing matched!
                            values.endDocumentFragment();
                    }
View Full Code Here


            }

            Iterator entries = oldMap.entrySet().iterator();
            while (entries.hasNext()) {
                Map.Entry entry = (Map.Entry) entries.next();
                IdentityConstraint id = (IdentityConstraint) entry.getKey();
                ValueStoreBase oldVal = (ValueStoreBase) entry.getValue();
                if (oldVal != null) {
                    ValueStoreBase currVal = (ValueStoreBase) fGlobalIDConstraintMap.get(id);
                    if (currVal == null) {
                        fGlobalIDConstraintMap.put(id, oldVal);
View Full Code Here

            if (oldMap == null)
                return;

            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

            fAttrChecker.returnAttrArray(attrValues, schemaDoc);
            return;
        }

        UniqueOrKey key = null;
        IdentityConstraint ret = (IdentityConstraint)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.IDENTITYCONSTRAINT_TYPE, kName, krElem);
        // if ret == null, we've already reported an error in getGlobalDecl
        // we report an error only when ret != null, and the return type keyref
        if (ret != null) {
            if (ret.getCategory() == IdentityConstraint.IC_KEY ||
                ret.getCategory() == IdentityConstraint.IC_UNIQUE) {
                key = (UniqueOrKey)ret;
            } else {
                reportSchemaError("src-resolve", new Object[]{kName.rawname, "identity constraint key/unique"}, krElem);
            }
        }
View Full Code Here

            if (oldMap == null)
                return;

            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

        // handle everything *but* keyref's.
        for (int i = oldCount - 1; i >= newCount; i--) {
            XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
            if (matcher instanceof Selector.Matcher) {
                Selector.Matcher selMatcher = (Selector.Matcher) matcher;
                IdentityConstraint id;
                if ((id = selMatcher.getIdentityConstraint()) != null
                    && id.getCategory() != IdentityConstraint.IC_KEYREF) {
                    fValueStoreCache.transplant(id, selMatcher.getInitialDepth());
                }
            }
        }

        // now handle keyref's/...
        for (int i = oldCount - 1; i >= newCount; i--) {
            XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
            if (matcher instanceof Selector.Matcher) {
                Selector.Matcher selMatcher = (Selector.Matcher) matcher;
                IdentityConstraint id;
                if ((id = selMatcher.getIdentityConstraint()) != null
                    && id.getCategory() == IdentityConstraint.IC_KEYREF) {
                    ValueStoreBase values =
                        fValueStoreCache.getValueStoreFor(id, selMatcher.getInitialDepth());
                    if (values != null) // nothing to do if nothing matched!
                        values.endDocumentFragment();
                }
View Full Code Here

            fAttrChecker.returnAttrArray(attrValues, schemaDoc);
            return;
        }

        UniqueOrKey key = null;
        IdentityConstraint ret = (IdentityConstraint)fSchemaHandler.getGlobalDecl(schemaDoc, XSDHandler.IDENTITYCONSTRAINT_TYPE, kName, krElem);
        // if ret == null, we've already reported an error in getGlobalDecl
        // we report an error only when ret != null, and the return type keyref
        if (ret != null) {
            if (ret.getCategory() == IdentityConstraint.IC_KEY ||
                ret.getCategory() == IdentityConstraint.IC_UNIQUE) {
                key = (UniqueOrKey)ret;
            } else {
                reportSchemaError("src-resolve", new Object[]{kName.rawname, "identity constraint key/unique"}, krElem);
            }
        }
View Full Code Here

      if (oldMap == null)
        return;

      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

    // handle everything *but* keyref's.
    for (int i = oldCount - 1; i >= newCount; i--) {
      XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
      if (matcher instanceof Selector.Matcher) {
        Selector.Matcher selMatcher = (Selector.Matcher) matcher;
        IdentityConstraint id;
        if ((id = selMatcher.getIdentityConstraint()) != null
          && id.getCategory() != IdentityConstraint.IC_KEYREF) {
          fValueStoreCache.transplant(id, selMatcher.getInitialDepth());
        }
      }
    }

    // now handle keyref's/...
    for (int i = oldCount - 1; i >= newCount; i--) {
      XPathMatcher matcher = fMatcherStack.getMatcherAt(i);
      if (matcher instanceof Selector.Matcher) {
        Selector.Matcher selMatcher = (Selector.Matcher) matcher;
        IdentityConstraint id;
        if ((id = selMatcher.getIdentityConstraint()) != null
          && id.getCategory() == IdentityConstraint.IC_KEYREF) {
          ValueStoreBase values =
            fValueStoreCache.getValueStoreFor(id, selMatcher.getInitialDepth());
          if (values != null) // nothing to do if nothing matched!
            values.endDocumentFragment();
        }
View Full Code Here

      reportSchemaError("s4s-att-must-appear", new Object[] { SchemaSymbols.ELT_KEYREF, SchemaSymbols.ATT_REFER }, paramElement);
      this.fAttrChecker.returnAttrArray(arrayOfObject, paramXSDocumentInfo);
      return;
    }
    UniqueOrKey localUniqueOrKey = null;
    IdentityConstraint localIdentityConstraint = (IdentityConstraint)this.fSchemaHandler.getGlobalDecl(paramXSDocumentInfo, 5, localQName, paramElement);
    if (localIdentityConstraint != null)
      if ((localIdentityConstraint.getCategory() == 1) || (localIdentityConstraint.getCategory() == 3))
        localUniqueOrKey = (UniqueOrKey)localIdentityConstraint;
      else
        reportSchemaError("src-resolve", new Object[] { localQName.rawname, "identity constraint key/unique" }, paramElement);
    if (localUniqueOrKey == null)
    {
View Full Code Here

TOP

Related Classes of org.apache.xerces.impl.xs.identity.IdentityConstraint

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.