org.apache.xerces.impl.xs.assertion
Class XSAssertImpl

java.lang.Object
  extended byorg.apache.xerces.impl.xs.AbstractPsychoPathImpl
      extended byorg.apache.xerces.impl.xs.assertion.XSAssertImpl
All Implemented Interfaces:
XSAssert, org.apache.xerces.xs.XSObject

public class XSAssertImpl
extends AbstractPsychoPathImpl
implements XSAssert

XML Schema 1.1 'assertion' component.

Version:
$Id: XSAssertImpl.java 1038854 2010-11-24 22:41:05Z mukulg $
Author:
Mukul Gandhi, IBM

INTERNAL:

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

Field Summary
protected  short assertKind
           
protected  java.lang.String attrName
           
protected  java.lang.String attrValue
           
protected  org.apache.xerces.xs.XSObjectList fAnnotations
          Optional annotations
protected  org.eclipse.wst.xml.xpath2.processor.ast.XPath fCompiledXPath
          Compiled XPath 2.0 expression
protected  XSDHandler fSchemaHandler
           
protected  Test fTestExpr
          Xerces object representing the assert 'test' attribute
protected  org.apache.xerces.xs.XSTypeDefinition fTypeDefinition
          The type definition associated with the assertion component
protected  short fVariety
           
protected  NamespaceSupport fXPath2NamespaceContext
          XPath 2.0 namespace context.
protected  java.lang.String fXPathDefaultNamespace
          Default XPath namespace
protected  java.lang.String message
           
 
Constructor Summary
XSAssertImpl(org.apache.xerces.xs.XSTypeDefinition type, org.apache.xerces.xs.XSObjectList annotations, XSDHandler schemaHandler)
          Constructor
 
Method Summary
 boolean equals(XSAssertImpl pAssertion)
           
 org.apache.xerces.xs.XSObjectList getAnnotations()
          A sequence of [annotations] or an empty XSObjectList
 java.lang.String getAttrName()
          Get the attribute name
 java.lang.String getAttrValue()
          Get the attribute value
 org.eclipse.wst.xml.xpath2.processor.ast.XPath getCompiledXPath()
           
 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.
 Test getTest()
          [test]: an XPath 2.0 expression
 java.lang.String getTestStr()
           
 short getType()
          Get the type of the object
 org.apache.xerces.xs.XSTypeDefinition getTypeDefinition()
          The type associated with the assertion
 short getVariety()
           
 NamespaceSupport getXPath2NamespaceContext()
          Get the XPath 2.0 namespace context
 java.lang.String getXPathDefaultNamespace()
           
 void setAnnotations(org.apache.xerces.xs.XSObjectList annotations)
          Sets the assertion annotations
 void setAssertKind(short assertKind)
          Sets the kind of assertion this is.
 void setAttrName(java.lang.String attrName)
          Sets the attribute name
 void setAttrValue(java.lang.String attrValue)
          Sets the attribute value
 void setMessage(java.lang.String message)
           
 void setTest(Test expr)
          Sets the test attribute value
 void setTypeDefinition(org.apache.xerces.xs.XSTypeDefinition typeDefn)
           
 void setVariety(short variety)
           
 void setXPath2NamespaceContext(NamespaceSupport namespaceContext)
          Sets the XPath 2.0 namespace context
 void setXPathDefaultNamespace(java.lang.String namespace)
          Sets the xpath default namespace
 
Methods inherited from class org.apache.xerces.impl.xs.AbstractPsychoPathImpl
compileXPathStr, evaluatePsychoPathExpr, initDynamicContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

assertKind

protected short assertKind

fTypeDefinition

protected org.apache.xerces.xs.XSTypeDefinition fTypeDefinition
The type definition associated with the assertion component


fTestExpr

protected Test fTestExpr
Xerces object representing the assert 'test' attribute


fCompiledXPath

protected org.eclipse.wst.xml.xpath2.processor.ast.XPath fCompiledXPath
Compiled XPath 2.0 expression


fAnnotations

protected org.apache.xerces.xs.XSObjectList fAnnotations
Optional annotations


fXPathDefaultNamespace

protected java.lang.String fXPathDefaultNamespace
Default XPath namespace


fXPath2NamespaceContext

protected NamespaceSupport fXPath2NamespaceContext
XPath 2.0 namespace context. Derived from XSDocumentInfo in Xerces schema "component traversers".


attrName

protected java.lang.String attrName

attrValue

protected java.lang.String attrValue

fSchemaHandler

protected XSDHandler fSchemaHandler

message

protected java.lang.String message

fVariety

protected short fVariety
Constructor Detail

XSAssertImpl

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

Method Detail

setTest

public void setTest(Test expr)
Sets the test attribute value


setAnnotations

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


setXPathDefaultNamespace

public void setXPathDefaultNamespace(java.lang.String namespace)
Sets the xpath default namespace


setXPath2NamespaceContext

public void setXPath2NamespaceContext(NamespaceSupport namespaceContext)
Sets the XPath 2.0 namespace context


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)
Sets the attribute name


setAttrValue

public void setAttrValue(java.lang.String attrValue)
Sets the attribute value


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

getCompiledXPath

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

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

setTypeDefinition

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

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()
Get the type of the object

Specified by:
getType in interface org.apache.xerces.xs.XSObject

getAttrName

public java.lang.String getAttrName()
Get the attribute name


getAttrValue

public java.lang.String getAttrValue()
Get the attribute value


getXPath2NamespaceContext

public NamespaceSupport getXPath2NamespaceContext()
Get the XPath 2.0 namespace context


equals

public boolean equals(XSAssertImpl pAssertion)

setMessage

public void setMessage(java.lang.String message)

getMessage

public java.lang.String getMessage()

setVariety

public void setVariety(short variety)

getVariety

public short getVariety()


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