org.apache.xerces.impl.scd

## Class SCDResolver

- java.lang.Object
- - org.apache.xerces.impl.scd.SCDResolver

-     public class SCDResolver
      extends java.lang.Object

  Implements XML Schema: Component Designators (SCD) Currently, this implementation has following limitations
  1. the Schema Step is not supported
  2. the axis types; Extension axis, Assertions axis, Alternative axis, Context axis
  are not supported
  3. Extension accessors are not supported
  4. the top level Identity Constraint Definitions components are not supported.
  5. all the other Schema 1.1 constructs that are not listed here, are not supported.
  6. the schemaAttribute axis does not work as it is expected in the specification.
  7. in some situations, the SCPs that have been reduced by the elided-componet axis do not
  produce expected results
  8. the fundamental facets are not supported (but the constraining facets are supported).
  Version:
    $Id: SCDResolver.java 1023886 2010-10-18 16:23:20Z sandygao $
  Author:
    Ishan Jayawardena

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SCDResolver(org.apache.xerces.xs.XSModel xsModel)` Constructor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.apache.xerces.xs.XSObjectList` | `resolve(java.lang.String relativeSCD)` Resolves a relative SCD against the schema description schema component (i.e.
    `org.apache.xerces.xs.XSObjectList` | `resolve(java.lang.String scp, org.apache.xerces.xni.NamespaceContext nsContext)` Resolves an SCP against the schema description schema component (i.e.
    `org.apache.xerces.xs.XSObjectList` | `resolve(java.lang.String incompleteSCP, org.apache.xerces.xni.NamespaceContext nsContext, org.apache.xerces.xs.XSObject currentComponent)` Resolves an incomplete SCP against a given schema component
    `org.apache.xerces.xs.XSObjectList` | `resolve(java.lang.String incompleteSCD, org.apache.xerces.xs.XSObject currentComponent)` Resolves an incomplete SCD against a given schema component
    `java.lang.String` | `toString()`

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

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

- - ### Constructor Detail

    - #### SCDResolver

          public SCDResolver(org.apache.xerces.xs.XSModel xsModel)

      Constructor
      Parameters:
        `xsModel` - the schema description schema component

  - ### Method Detail

    - #### resolve

          public org.apache.xerces.xs.XSObjectList resolve(java.lang.String relativeSCD)
                                                    throws SCDException

      Resolves a relative SCD against the schema description schema component (i.e. the XSModel).
      Parameters:
        `relativeSCD` - the input relative SCD string in the form of,
        `[5] RelativeSchemaComponentDesignator ::= XmlnsPointerPart* XscdPointerPart`
        e.g. `xmlns(p=http://www.example.com/schema/po)xscd(/type::p:SKU/facet::pattern)`
      Returns:
        a list of XML schema components that are designated by the SCD, otherwise and empty `XSObjectList`
      Throws:
        `SCDException`

    - #### resolve

          public org.apache.xerces.xs.XSObjectList resolve(java.lang.String scp,
                                                  org.apache.xerces.xni.NamespaceContext nsContext)
                                                    throws SCDException

      Resolves an SCP against the schema description schema component (i.e. the XSModel).
      Parameters:
        `scp` - the input SCP to designate the components.
        e.g. `/type::p:SKU/facet::pattern`
        `nsContext` - namespace context details for the component names used in the SCP string
      Returns:
        a list of XML schema components that are designated by the SCP, otherwise and empty `XSObjectList`
      Throws:
        `SCDException`

    - #### resolve

          public org.apache.xerces.xs.XSObjectList resolve(java.lang.String incompleteSCP,
                                                  org.apache.xerces.xni.NamespaceContext nsContext,
                                                  org.apache.xerces.xs.XSObject currentComponent)
                                                    throws SCDException

      Resolves an incomplete SCP against a given schema component
      Parameters:
        `incompleteSCP` - the incomplete SCP. To emphasize the incompleteness of such paths, the current component step syntax may be used (.) for the head step. For example, if the initial source component is a complex type, the following paths are equivalent and designate the element declaration with the QName my:section within the sequence model group of that type:
        `model::sequence/schemaElement::my:section`
        `./model::sequence/schemaElement::my:section`
        `nsContext` - namespace context details for the component names used in the incomplete SCP string
        `currentComponent` - the initial source component
      Returns:
        the list of schema components that are designated by the incomplete SCP, otherwise an empty `XSObjectList`.
      Throws:
        `SCDException`

    - #### resolve

          public org.apache.xerces.xs.XSObjectList resolve(java.lang.String incompleteSCD,
                                                  org.apache.xerces.xs.XSObject currentComponent)
                                                    throws SCDException

      Resolves an incomplete SCD against a given schema component
      Parameters:
        `incompleteSCD` - the incomplete SCD string. which is in the form of
        `[5] RelativeSchemaComponentDesignator ::= XmlnsPointerPart* XscdPointerPart`
        but `XscdPointerPart` contains an incomplete SCP instead of a complete SCP.
        e.g. `xmlns(p=http://www.example.com/schema/po)xscd(./type::p:SKU/facet::pattern)` or `xmlns(p=http://www.example.com/schema/po)xscd(type::p:SKU/facet::pattern)`
        i.e. an incomplete SCP must not start with a '/'.
        `currentComponent` - the initial source component
      Returns:
        the list of schema components that are designated by the incomplete SCP, otherwise an empty `XSObjectList`.
      Throws:
        `SCDException`

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

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