|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.saxonica.schema.SchemaStructure
com.saxonica.schema.Assertion
public class Assertion
An Assertion schema component (See XML Schema 1.1 Part 1 Working Draft)
| Constructor Summary | |
|---|---|
Assertion(EnterpriseConfiguration config,
XPathExpression condition,
XPathVariable valueVariable,
String text)
Create an Assertion component |
|
| Method Summary | |
|---|---|
boolean |
equals(Object other)
equals() is used when deciding whether two assertions are equal, as part of the type subsumption algorithm. |
XPathExpression |
getCondition()
Get the XPath expression representing the assertion. |
String |
getConditionText()
Get the original text of the condition. |
String |
getMessage()
Get the user-defined error message associated with the assertion |
XPathStaticContext |
getStaticContext()
Get the static context for the expression |
XPathVariable |
getValueVariable()
Get the variable bound to the name $value |
int |
hashCode()
Hashcode is used when deciding whether two assertions are equal, as part of the type subsumption algorithm. |
void |
serialize(SchemaModelSerializer serializer)
Serialize the schema component |
void |
setMessage(String message)
Set the user-defined error message associated with the assertion |
void |
setStaticContext(XPathStaticContext staticContext)
Set the static context for the expression. |
List<Item> |
test(Item contextItem,
ValueRepresentation value,
Controller controller)
Evaluate the assertion |
| Methods inherited from class com.saxonica.schema.SchemaStructure |
|---|
elaborate, fixup, getColumnNumber, getConfiguration, getFixupStatus, getLineNumber, getPublicId, getRedefinitionLevel, getSchemaDocumentURI, getSystemId, getValidationStatus, lookForCycles, setConfiguration, setFixupStatus, setLineNumber, setLocator, setRedefinitionLevel, setSchemaDocumentURI, setSystemId, setValidationStatus |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Assertion(EnterpriseConfiguration config,
XPathExpression condition,
XPathVariable valueVariable,
String text)
config - the Saxon configurationcondition - the compiled XPath expressionvalueVariable - the variable to hold $value (may be null)text - the original text of the XPath expression| Method Detail |
|---|
public XPathExpression getCondition()
public XPathVariable getValueVariable()
public String getConditionText()
public void setMessage(String message)
message - the message defined using the saxon:message attribute, if presentpublic String getMessage()
public void setStaticContext(XPathStaticContext staticContext)
staticContext - the static contextpublic XPathStaticContext getStaticContext()
public List<Item> test(Item contextItem,
ValueRepresentation value,
Controller controller)
contextItem - the item to be used as the context item in evaluating the conditionvalue - the simple value to be tested, if any. If present, and if the expression
uses $value, this value will be bound to the variable $value for evaluating the assertion.controller - May be null. If present, will be used to provide context information
including the current error listener, URIResolver, and document pool, current date/time, etc.
public int hashCode()
hashCode in class Objectpublic boolean equals(Object other)
equals in class Object
public void serialize(SchemaModelSerializer serializer)
throws XPathException
serialize in interface SerializableSchemaComponentserializer - the object responsible for performing the serialization
XPathException - if serialization fails
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||