|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.saxonica.validate.FieldWatch
A FieldWatch is a class that is looking for nodes that match a field selector within a uniqueness or key constraint.
| Constructor Summary | |
FieldWatch(SelectorWatch parentWatch,
Selection selection,
Value[] currentRow,
int column)
Create a new FieldWatch |
|
| Method Summary | |
void |
activate(int typeCode,
int activationDepth)
Signal that an element has been found that matches the selection that this Watch is looking for. |
void |
close()
The close() method is called immediately before the Watch is destroyed, that is, when the element whose declaration scopes the constraint implemented by this Watch goes out of scope. |
void |
deactivate()
Signal that the endElement event has occurred for the element whose startElement event caused the Watch to be activated. |
int |
getActivationDepth()
If the Watch is active, return the activation depth (the depth in the XML tree at which it was activated; otherwise return -1 |
int |
getOriginDepth()
Get the depth within the XML hierarchy of the element whose element declaration contains the unique/key/keyref constraint that this Watch implements |
Selection |
getSelection()
Get the selection (that is, the restricted XPath expression) that definesthis the nodes that this Watch is looking for |
void |
notifyAttribute(int nameCode,
int typeCode,
java.lang.CharSequence value)
Notify an attribute to a Watch that has been activated. |
void |
notifyText(java.lang.CharSequence value)
Notify the character content of an element to a Watch that has been activated. |
void |
setConfiguration(Configuration config)
Set the NamePool in use |
void |
setOriginDepth(int depth)
Set the depth within the XML hierarchy of the element whose element declaration contains the unique/key/keyref constraint that this Watch implements |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FieldWatch(SelectorWatch parentWatch,
Selection selection,
Value[] currentRow,
int column)
parentWatch - The SelectorWatch to which field values should be
notifiedselection - The selection (that is, the restricted XPath expression)
used in this field of the constraintcurrentRow - represents the selected node whose fields are being
evaluatedcolumn - sequence number for this field within the constraint being
evaluated| Method Detail |
public Selection getSelection()
getSelection in interface Watchpublic void setConfiguration(Configuration config)
setConfiguration in interface Watchconfig - the NamePool in usepublic int getOriginDepth()
getOriginDepth in interface Watchpublic void setOriginDepth(int depth)
setOriginDepth in interface Watchdepth - The depth at which the watch is scoped
public void activate(int typeCode,
int activationDepth)
throws ValidationException
activate in interface WatchtypeCode - The type annotation of the element that matches the selectionactivationDepth - The depth in the XML tree at which the activation took place
ValidationException - May be raised if the constraint implemented by this
Watch is violatedpublic int getActivationDepth()
public void deactivate()
throws ValidationException
deactivate in interface WatchValidationException - May be raised if the constraint implemented by this
Watch is violated
public void notifyAttribute(int nameCode,
int typeCode,
java.lang.CharSequence value)
throws ValidationException
nameCode - Identifies the name of the attributetypeCode - The type annotation of the attributevalue - The value of the attribute
ValidationException - May be raised if the constraint implemented by this
Watch is violated
public void notifyText(java.lang.CharSequence value)
throws ValidationException
value - The textual content of the element
ValidationException - May be raised if the constraint implemented by this
Watch is violatedpublic void close()
close in interface Watch
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||