org.apache.xerces.impl.xs

## Class XSConstraints

- java.lang.Object
- - org.apache.xerces.impl.xs.XSConstraints

-     public abstract class XSConstraints
      extends java.lang.Object

  Constraints shared by traversers and validator
  Version:
    $Id: XSConstraints.java 1358250 2012-07-06 14:56:43Z mrglavas $
  Author:
    Sandy Gao, IBM

  # INTERNAL:

    Usage of this class is not supported. It may be altered or removed at any time.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected short` | `fSchemaVersion`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `XSConstraints(XSComplexTypeDecl anyType, short schemaVersion)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `checkComplexDerivationOk(XSComplexTypeDecl derived, org.apache.xerces.xs.XSTypeDefinition base, short block)` check whether complex type derived is valid derived from base, given a subset of {restriction, extension}.
    `void` | `checkElementDeclsConsistent(XSComplexTypeDecl type, XSParticleDecl particle, SymbolHash elemDeclHash, SubstitutionGroupHandler sgHandler)`
    `protected void` | `checkElementDeclsConsistent(XSComplexTypeDecl type, XSParticleDecl particle, SymbolHash elemDeclHash, SubstitutionGroupHandler sgHandler, XSGrammarBucket grammarBucket, java.util.ArrayList wcList, java.util.Stack stack)`
    `protected abstract boolean` | `checkEmptyFacets(XSSimpleType baseType)`
    `boolean` | `checkSimpleDerivationOk(XSSimpleType derived, org.apache.xerces.xs.XSTypeDefinition base, short block)` check whether simple type derived is valid derived from base, given a subset of {restriction, extension}.
    `boolean` | `checkTypeDerivationOk(org.apache.xerces.xs.XSTypeDefinition derived, org.apache.xerces.xs.XSTypeDefinition base, short block)` check whether derived is valid derived from base, given a subset of {restriction, extension}.B
    `java.lang.Object` | `ElementDefaultValidImmediate(org.apache.xerces.xs.XSTypeDefinition type, java.lang.String value, ValidationContext context, ValidatedInfo vinfo)` check whether a value is a valid default for some type returns the compiled form of the value The parameter value could be either a String or a ValidatedInfo object
    `void` | `findElemInTable(XSComplexTypeDecl type, XSElementDecl elem, SymbolHash elemDeclHash)`
    `protected XSElementDecl` | `findExistingElement(XSElementDecl elem, SymbolHash elemDeclHash)`
    `void` | `fullSchemaChecking(XSGrammarBucket grammarBucket, SubstitutionGroupHandler SGHandler, CMBuilder cmBuilder, XMLErrorReporter errorReporter)` used to check the 3 constraints against each complex type (should be each model group): Unique Particle Attribution, Particle Derivation (Restriction), Element Declrations Consistent.
    `static XSParticleDecl` | `getEmptySequence()`
    `short` | `getSchemaVersion()`
    `protected abstract void` | `groupSubsumption(XSParticleDecl dParticle, XSParticleDecl bParticle, XSGrammarBucket grammarBucket, SubstitutionGroupHandler SGHandler, CMBuilder cmBuilder, XMLErrorReporter errorReporter, java.lang.String dName, SimpleLocator locator)`
    `abstract boolean` | `isSubsetOf(XSWildcardDecl wildcard, XSWildcardDecl superWildcard)`
    `boolean` | `isTypeTablesEquivalent(XSElementDecl elementDecl1, XSElementDecl elementDecl2)`
    `boolean` | `overlapUPA(java.lang.Object decl1, java.lang.Object decl2, SubstitutionGroupHandler sgHandler)`
    `protected boolean` | `overlapUPA(XSElementDecl element1, XSElementDecl element2, SubstitutionGroupHandler sgHandler)`
    `abstract boolean` | `overlapUPA(XSElementDecl element, XSWildcardDecl wildcard, SubstitutionGroupHandler sgHandler)`
    `boolean` | `overlapUPA(XSWildcardDecl wildcard1, XSWildcardDecl wildcard2)`
    `abstract XSWildcardDecl` | `performIntersectionWith(XSWildcardDecl wildcard, XSWildcardDecl otherWildcard, short processContents)`
    `abstract XSWildcardDecl` | `performUnionWith(XSWildcardDecl wildcard, XSWildcardDecl otherWildcard, short processContents)`
    `protected abstract void` | `typeSubsumption(XSComplexTypeDecl dType, XSComplexTypeDecl bType, XSGrammarBucket grammarBucket, SubstitutionGroupHandler SGHandler, CMBuilder cmBuilder, XMLErrorReporter errorReporter, SimpleLocator locator)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### fSchemaVersion

          protected final short fSchemaVersion

  - ### Constructor Detail

    - #### XSConstraints

          protected XSConstraints(XSComplexTypeDecl anyType,
                       short schemaVersion)

  - ### Method Detail

    - #### getEmptySequence

          public static XSParticleDecl getEmptySequence()

    - #### getSchemaVersion

          public final short getSchemaVersion()

    - #### isTypeTablesEquivalent

          public boolean isTypeTablesEquivalent(XSElementDecl elementDecl1,
                                       XSElementDecl elementDecl2)

    - #### checkTypeDerivationOk

          public boolean checkTypeDerivationOk(org.apache.xerces.xs.XSTypeDefinition derived,
                                      org.apache.xerces.xs.XSTypeDefinition base,
                                      short block)

      check whether derived is valid derived from base, given a subset of {restriction, extension}.B

    - #### checkSimpleDerivationOk

          public boolean checkSimpleDerivationOk(XSSimpleType derived,
                                        org.apache.xerces.xs.XSTypeDefinition base,
                                        short block)

      check whether simple type derived is valid derived from base, given a subset of {restriction, extension}.

    - #### checkComplexDerivationOk

          public boolean checkComplexDerivationOk(XSComplexTypeDecl derived,
                                         org.apache.xerces.xs.XSTypeDefinition base,
                                         short block)

      check whether complex type derived is valid derived from base, given a subset of {restriction, extension}.

    - #### ElementDefaultValidImmediate

          public java.lang.Object ElementDefaultValidImmediate(org.apache.xerces.xs.XSTypeDefinition type,
                                                      java.lang.String value,
                                                      ValidationContext context,
                                                      ValidatedInfo vinfo)

      check whether a value is a valid default for some type returns the compiled form of the value The parameter value could be either a String or a ValidatedInfo object

    - #### fullSchemaChecking

          public void fullSchemaChecking(XSGrammarBucket grammarBucket,
                                SubstitutionGroupHandler SGHandler,
                                CMBuilder cmBuilder,
                                XMLErrorReporter errorReporter)

      used to check the 3 constraints against each complex type (should be each model group): Unique Particle Attribution, Particle Derivation (Restriction), Element Declrations Consistent.

    - #### checkElementDeclsConsistent

          public void checkElementDeclsConsistent(XSComplexTypeDecl type,
                                         XSParticleDecl particle,
                                         SymbolHash elemDeclHash,
                                         SubstitutionGroupHandler sgHandler)
                                           throws XMLSchemaException

      Throws:
        `XMLSchemaException`

    - #### checkElementDeclsConsistent

          protected void checkElementDeclsConsistent(XSComplexTypeDecl type,
                                         XSParticleDecl particle,
                                         SymbolHash elemDeclHash,
                                         SubstitutionGroupHandler sgHandler,
                                         XSGrammarBucket grammarBucket,
                                         java.util.ArrayList wcList,
                                         java.util.Stack stack)
                                              throws XMLSchemaException

      Throws:
        `XMLSchemaException`

    - #### findElemInTable

          public void findElemInTable(XSComplexTypeDecl type,
                             XSElementDecl elem,
                             SymbolHash elemDeclHash)
                               throws XMLSchemaException

      Throws:
        `XMLSchemaException`

    - #### findExistingElement

          protected XSElementDecl findExistingElement(XSElementDecl elem,
                                          SymbolHash elemDeclHash)

    - #### overlapUPA

          protected boolean overlapUPA(XSElementDecl element1,
                           XSElementDecl element2,
                           SubstitutionGroupHandler sgHandler)

    - #### overlapUPA

          public boolean overlapUPA(XSWildcardDecl wildcard1,
                           XSWildcardDecl wildcard2)

    - #### overlapUPA

          public boolean overlapUPA(java.lang.Object decl1,
                           java.lang.Object decl2,
                           SubstitutionGroupHandler sgHandler)

    - #### isSubsetOf

          public abstract boolean isSubsetOf(XSWildcardDecl wildcard,
                           XSWildcardDecl superWildcard)

    - #### performUnionWith

          public abstract XSWildcardDecl performUnionWith(XSWildcardDecl wildcard,
                                        XSWildcardDecl otherWildcard,
                                        short processContents)

    - #### performIntersectionWith

          public abstract XSWildcardDecl performIntersectionWith(XSWildcardDecl wildcard,
                                               XSWildcardDecl otherWildcard,
                                               short processContents)

    - #### checkEmptyFacets

          protected abstract boolean checkEmptyFacets(XSSimpleType baseType)

    - #### overlapUPA

          public abstract boolean overlapUPA(XSElementDecl element,
                           XSWildcardDecl wildcard,
                           SubstitutionGroupHandler sgHandler)

    - #### groupSubsumption

          protected abstract void groupSubsumption(XSParticleDecl dParticle,
                              XSParticleDecl bParticle,
                              XSGrammarBucket grammarBucket,
                              SubstitutionGroupHandler SGHandler,
                              CMBuilder cmBuilder,
                              XMLErrorReporter errorReporter,
                              java.lang.String dName,
                              SimpleLocator locator)

    - #### typeSubsumption

          protected abstract void typeSubsumption(XSComplexTypeDecl dType,
                             XSComplexTypeDecl bType,
                             XSGrammarBucket grammarBucket,
                             SubstitutionGroupHandler SGHandler,
                             CMBuilder cmBuilder,
                             XMLErrorReporter errorReporter,
                             SimpleLocator locator)

Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.