org.apache.xerces.impl.xs.alternative

## Class XSTypeAlternativeImpl

- java.lang.Object
- - org.apache.xerces.impl.xs.alternative.XSTypeAlternativeImpl

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

      public class XSTypeAlternativeImpl
      extends java.lang.Object
      implements org.apache.xerces.xs.XSTypeAlternative

  XML schema type alternative component.
  Version:
    $Id: XSTypeAlternativeImpl.java 1128992 2011-05-30 04:47:00Z mukulg $
  Author:
    Hiranya Jayathilaka, University of Moratuwa

  # 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 org.apache.xerces.xs.XSObjectList` | `fAnnotations` Optional annotations
    `protected java.lang.String` | `fBaseURI`
    `protected java.lang.String` | `fElementName` Name of the owning element
    `protected NamespaceSupport` | `fNamespaceContext`
    `protected Test` | `fTestExpr` The restricted XPath 2.0 expression that represents the test attribute
    `protected org.apache.xerces.xs.XSTypeDefinition` | `fTypeDefinition` The type definition associated with the type alternative component
    `protected java.lang.String` | `fXPathDefaultNamespace` Default XPath namespace

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XSTypeAlternativeImpl(java.lang.String elementName, org.apache.xerces.xs.XSTypeDefinition type, org.apache.xerces.xs.XSObjectList annotations)` Constructor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(XSTypeAlternativeImpl typeAlternative)`
    `org.apache.xerces.xs.XSObjectList` | `getAnnotations()` Get the optional annotations
    `java.lang.String` | `getBaseURI()`
    `java.lang.String` | `getElementName()`
    `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.
    `NamespaceSupport` | `getNamespaceContext()`
    `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.
    `Test` | `getTest()`
    `java.lang.String` | `getTestStr()` [test]: a restricted XPath 2.0 expression or null.
    `short` | `getType()` Get the type of the object
    `org.apache.xerces.xs.XSTypeDefinition` | `getTypeDefinition()` [type definition]: a valid type definition component
    `java.lang.String` | `getXPathDefaultNamespace()`
    `void` | `setAnnotations(org.apache.xerces.xs.XSObjectList annotations)`
    `void` | `setBaseURI(java.lang.String baseUri)`
    `void` | `setNamespaceContext(NamespaceSupport namespaceContext)`
    `void` | `setTest(Test expr)` Sets the test attribute value
    `void` | `setXPathDefauleNamespace(java.lang.String namespace)`
    `java.lang.String` | `toString()` Returns a String representation of this object

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

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

- - ### Field Detail

    - #### fElementName

          protected final java.lang.String fElementName

      Name of the owning element

    - #### fTestExpr

          protected Test fTestExpr

      The restricted XPath 2.0 expression that represents the test attribute

    - #### fTypeDefinition

          protected org.apache.xerces.xs.XSTypeDefinition fTypeDefinition

      The type definition associated with the type alternative component

    - #### fAnnotations

          protected org.apache.xerces.xs.XSObjectList fAnnotations

      Optional annotations

    - #### fXPathDefaultNamespace

          protected java.lang.String fXPathDefaultNamespace

      Default XPath namespace

    - #### fNamespaceContext

          protected NamespaceSupport fNamespaceContext

    - #### fBaseURI

          protected java.lang.String fBaseURI

  - ### Constructor Detail

    - #### XSTypeAlternativeImpl

          public XSTypeAlternativeImpl(java.lang.String elementName,
                               org.apache.xerces.xs.XSTypeDefinition type,
                               org.apache.xerces.xs.XSObjectList annotations)

      Constructor

  - ### Method Detail

    - #### setTest

          public void setTest(Test expr)

      Sets the test attribute value

    - #### setAnnotations

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

    - #### setXPathDefauleNamespace

          public void setXPathDefauleNamespace(java.lang.String namespace)

    - #### setNamespaceContext

          public void setNamespaceContext(NamespaceSupport namespaceContext)

    - #### setBaseURI

          public void setBaseURI(java.lang.String baseUri)

    - #### getNamespaceContext

          public NamespaceSupport getNamespaceContext()

    - #### getBaseURI

          public java.lang.String getBaseURI()

    - #### getElementName

          public java.lang.String getElementName()

    - #### getXPathDefaultNamespace

          public java.lang.String getXPathDefaultNamespace()

    - #### toString

          public java.lang.String toString()

      Returns a String representation of this object
      Overrides:
        `toString` in class `java.lang.Object`

    - #### equals

          public boolean equals(XSTypeAlternativeImpl typeAlternative)

    - #### getAnnotations

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

      Get the optional annotations
      Specified by:
        `getAnnotations` in interface `org.apache.xerces.xs.XSTypeAlternative`

    - #### getTestStr

          public java.lang.String getTestStr()

      Description copied from interface: `org.apache.xerces.xs.XSTypeAlternative`
      [test]: a restricted XPath 2.0 expression or null.
      Specified by:
        `getTestStr` in interface `org.apache.xerces.xs.XSTypeAlternative`

    - #### getTest

          public Test getTest()

    - #### getTypeDefinition

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

      Description copied from interface: `org.apache.xerces.xs.XSTypeAlternative`
      [type definition]: a valid type definition component
      Specified by:
        `getTypeDefinition` in interface `org.apache.xerces.xs.XSTypeAlternative`

    - #### 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()

      Get the type of the object
      Specified by:
        `getType` in interface `org.apache.xerces.xs.XSObject`

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