com.saxonica.schema
Class Assertion

java.lang.Object
  extended by com.saxonica.schema.SchemaStructure
      extended by com.saxonica.schema.Assertion
All Implemented Interfaces:
Serializable, SourceLocator

public class Assertion
extends SchemaStructure

An Assertion schema component (See XML Schema 1.1 Part 1 Working Draft)

See Also:
Serialized Form

Constructor Summary
Assertion(SchemaAwareConfiguration config, XPathExpression condition, String text)
           
 
Method Summary
 boolean equals(Object other)
          equals() is used when deciding whether two assertions are equal, as part of the type subsumption algorithm.
 String getBaseURI()
          Get the base URI of the XPath expression
 XPathExpression getCondition()
          Get the XPath expression representing the assertion.
 String getConditionText()
          Get the original text of the condition.
 NamespaceResolver getNamespaceContext()
          Get the namespace context for evaluating the XPath expression
 int hashCode()
          Hashcode is used when deciding whether two assertions are equal, as part of the type subsumption algorithm.
 void setBaseURI(String baseURI)
          Set the base URI of the XPath expression.
 void setNamespaceContext(NamespaceResolver resolver)
          Set the namespace context.
 
Methods inherited from class com.saxonica.schema.SchemaStructure
elaborate, fixup, getColumnNumber, getConfiguration, getFixupStatus, getLineNumber, getPublicId, getSystemId, getValidationStatus, lookForCycles, setConfiguration, setFixupStatus, setLineNumber, setLocator, setSystemId, setValidationStatus
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Assertion

public Assertion(SchemaAwareConfiguration config,
                 XPathExpression condition,
                 String text)
Method Detail

getCondition

public XPathExpression getCondition()
Get the XPath expression representing the assertion. If xs:report is used, this will be the negation of the condition in the source schema.

Returns:
the XPath expression

getConditionText

public String getConditionText()
Get the original text of the condition.


setNamespaceContext

public void setNamespaceContext(NamespaceResolver resolver)
Set the namespace context. This is needed to allow the assertion to be serialized, so that the namespace context can be replicated when it is reloaded.


getNamespaceContext

public NamespaceResolver getNamespaceContext()
Get the namespace context for evaluating the XPath expression


setBaseURI

public void setBaseURI(String baseURI)
Set the base URI of the XPath expression. This is needed to allow the assertion to be serialized.


getBaseURI

public String getBaseURI()
Get the base URI of the XPath expression


hashCode

public int hashCode()
Hashcode is used when deciding whether two assertions are equal, as part of the type subsumption algorithm. Assertions are equal if their XPath expressions are equal.

Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
equals() is used when deciding whether two assertions are equal, as part of the type subsumption algorithm. Assertions are equal if their XPath expressions are equal.

Overrides:
equals in class Object


Copyright (C) Michael H. Kay. All rights reserved.