org.apache.xerces.impl.xs.assertion

## Class XSAssertImpl

- java.lang.Object
- - org.apache.xerces.impl.xs.AbstractXPath2EngineImpl
  - - org.apache.xerces.impl.xs.assertion.XSAssertImpl

- All Implemented Interfaces:
    XSAssert, org.apache.xerces.xs.XSObject

      public class XSAssertImpl
      extends AbstractXPath2EngineImpl
      implements XSAssert

  XML Schema 1.1 'assertion' component.
  Version:
    $Id: XSAssertImpl.java 1890307 2021-05-29 09:07:37Z mukulg $
  Author:
    Mukul Gandhi, IBM

  # INTERNAL:

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

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XSAssertImpl(org.apache.xerces.xs.XSTypeDefinition type, org.apache.xerces.xs.XSObjectList annotations, XSDHandler schemaHandler)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(XSAssertImpl pAssertion)`
    `org.apache.xerces.xs.XSObjectList` | `getAnnotations()` A sequence of [annotations] or an empty `XSObjectList`
    `short` | `getAssertKind()`
    `java.lang.String` | `getAttrName()`
    `java.lang.String` | `getAttrValue()`
    `org.eclipse.wst.xml.xpath2.processor.ast.XPath` | `getCompiledXPathExpr()`
    `java.lang.String` | `getMessage()`
    `java.lang.String` | `getName()` The name of type `NCName`, as defined in XML Namespaces, of this declaration specified in the `{name}` property of the component or `null` if the definition of this component does not have a `{name}` property.
    `java.lang.String` | `getNamespace()` The [target namespace] of this object, or `null` if it is unspecified.
    `org.apache.xerces.xs.XSNamespaceItem` | `getNamespaceItem()` A namespace schema information item corresponding to the target namespace of the component, if it is globally declared; or `null` otherwise.
    `XSDHandler` | `getSchemaHandler()`
    `Test` | `getTest()` [test]: an XPath 2.0 expression
    `java.lang.String` | `getTestStr()`
    `short` | `getType()` The `type` of this object, i.e.
    `org.apache.xerces.xs.XSTypeDefinition` | `getTypeDefinition()` The type associated with the assertion
    `short` | `getVariety()`
    `NamespaceSupport` | `getXPath2NamespaceContext()`
    `java.lang.String` | `getXPathDefaultNamespace()`
    `void` | `setAnnotations(org.apache.xerces.xs.XSObjectList annotations)`
    `void` | `setAssertKind(short assertKind)` Sets the kind of assertion this is.
    `void` | `setAttrName(java.lang.String attrName)`
    `void` | `setAttrValue(java.lang.String attrValue)`
    `void` | `setCompiledExpr(org.eclipse.wst.xml.xpath2.processor.ast.XPath compiledXPathExpr)`
    `void` | `setMessage(java.lang.String message)`
    `void` | `setTest(Test expr, org.w3c.dom.Element schemaContextElem)`
    `void` | `setTypeDefinition(org.apache.xerces.xs.XSTypeDefinition typeDefn)`
    `void` | `setVariety(short variety)`
    `void` | `setXPath2NamespaceContext(NamespaceSupport namespaceContext)`
    `void` | `setXPathDefaultNamespace(java.lang.String namespace)`

    - ### Methods inherited from class org.apache.xerces.impl.xs.AbstractXPath2EngineImpl

      `addNamespaceBindingToXPath2DynamicContext, compileXPathStr, evaluateXPathExpr, initXPath2DynamicContext`

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

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

- - ### Constructor Detail

    - #### XSAssertImpl

          public XSAssertImpl(org.apache.xerces.xs.XSTypeDefinition type,
                      org.apache.xerces.xs.XSObjectList annotations,
                      XSDHandler schemaHandler)

  - ### Method Detail

    - #### setTest

          public void setTest(Test expr,
                     org.w3c.dom.Element schemaContextElem)

    - #### setCompiledExpr

          public void setCompiledExpr(org.eclipse.wst.xml.xpath2.processor.ast.XPath compiledXPathExpr)

    - #### setAnnotations

          public void setAnnotations(org.apache.xerces.xs.XSObjectList annotations)

    - #### setXPathDefaultNamespace

          public void setXPathDefaultNamespace(java.lang.String namespace)

    - #### setXPath2NamespaceContext

          public void setXPath2NamespaceContext(NamespaceSupport namespaceContext)

    - #### setAssertKind

          public void setAssertKind(short assertKind)

      Sets the kind of assertion this is. This could be one of the following: -> an assertion from a complexType : XSConstants.ASSERTION -> an assertion facet from a "complexType -> simpleContent" : XSConstants.ASSERTION_FACET -> an assertion facet from a simpleType : XSConstants.ASSERTION_FACET

    - #### setAttrName

          public void setAttrName(java.lang.String attrName)

    - #### setAttrValue

          public void setAttrValue(java.lang.String attrValue)

    - #### setTypeDefinition

          public void setTypeDefinition(org.apache.xerces.xs.XSTypeDefinition typeDefn)

    - #### setMessage

          public void setMessage(java.lang.String message)

    - #### setVariety

          public void setVariety(short variety)

    - #### getAnnotations

          public org.apache.xerces.xs.XSObjectList getAnnotations()

      Description copied from interface: `XSAssert`
      A sequence of [annotations] or an empty `XSObjectList`
      Specified by:
        `getAnnotations` in interface `XSAssert`

    - #### getTestStr

          public java.lang.String getTestStr()

    - #### getCompiledXPathExpr

          public org.eclipse.wst.xml.xpath2.processor.ast.XPath getCompiledXPathExpr()

    - #### getTest

          public Test getTest()

      Description copied from interface: `XSAssert`
      [test]: an XPath 2.0 expression
      Specified by:
        `getTest` in interface `XSAssert`

    - #### getTypeDefinition

          public org.apache.xerces.xs.XSTypeDefinition getTypeDefinition()

      Description copied from interface: `XSAssert`
      The type associated with the assertion
      Specified by:
        `getTypeDefinition` in interface `XSAssert`

    - #### getXPathDefaultNamespace

          public java.lang.String getXPathDefaultNamespace()

    - #### getName

          public java.lang.String getName()

      Description copied from interface: `org.apache.xerces.xs.XSObject`
      The name of type `NCName`, as defined in XML Namespaces, of this declaration specified in the `{name}` property of the component or `null` if the definition of this component does not have a `{name}` property. For anonymous types, the processor must construct and expose an anonymous type name that is distinct from the name of every named type and the name of every other anonymous type.
      Specified by:
        `getName` in interface `org.apache.xerces.xs.XSObject`
      See Also:
        `XSObject.getName()`

    - #### getNamespace

          public java.lang.String getNamespace()

      Description copied from interface: `org.apache.xerces.xs.XSObject`
      The [target namespace] of this object, or `null` if it is unspecified.
      Specified by:
        `getNamespace` in interface `org.apache.xerces.xs.XSObject`
      See Also:
        `XSObject.getNamespace()`

    - #### getNamespaceItem

          public org.apache.xerces.xs.XSNamespaceItem getNamespaceItem()

      Description copied from interface: `org.apache.xerces.xs.XSObject`
      A namespace schema information item corresponding to the target namespace of the component, if it is globally declared; or `null` otherwise.
      Specified by:
        `getNamespaceItem` in interface `org.apache.xerces.xs.XSObject`
      See Also:
        `XSObject.getNamespaceItem()`

    - #### getType

          public short getType()

      Description copied from interface: `org.apache.xerces.xs.XSObject`
      The `type` of this object, i.e. `ELEMENT_DECLARATION`.
      Specified by:
        `getType` in interface `org.apache.xerces.xs.XSObject`

    - #### getAttrName

          public java.lang.String getAttrName()

    - #### getAttrValue

          public java.lang.String getAttrValue()

    - #### getXPath2NamespaceContext

          public NamespaceSupport getXPath2NamespaceContext()

    - #### getMessage

          public java.lang.String getMessage()

    - #### getVariety

          public short getVariety()

    - #### getSchemaHandler

          public XSDHandler getSchemaHandler()

    - #### getAssertKind

          public short getAssertKind()

    - #### equals

          public boolean equals(XSAssertImpl pAssertion)

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