Package com.saxonica.ee.validate
Class KeySelectorWatch
- java.lang.Object
- 
- com.saxonica.ee.stream.watch.AbstractWatch
- 
- com.saxonica.ee.stream.watch.PatternWatch
- 
- com.saxonica.ee.validate.SelectorWatch
- 
- com.saxonica.ee.validate.KeySelectorWatch
 
 
 
 
- 
- All Implemented Interfaces:
- Watch
 
 public class KeySelectorWatch extends SelectorWatch This class watches the selector for a key or unique constraint
- 
- 
Constructor SummaryConstructors Constructor Description KeySelectorWatch(ConstraintChecker checker, IdentityConstraint uniqueConstraint)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddKeyRef(RefSelectorWatch watch)Add a RefSelectorWatch to support a keyRef that refers to this key or unique constraintsprotected voidcheckRow(AtomicSequence[] currentRow, boolean isTarget, Location locationId)Method to check that a row (that is, the collection of fields corresponding to one selected node) is valid.- 
Methods inherited from class com.saxonica.ee.validate.SelectorWatchclose, endSelectedParentNode, reportValidationError, startSelectedParentNode
 - 
Methods inherited from class com.saxonica.ee.stream.watch.PatternWatchgetAnchorNode, getSelection, matchesNode, matchesNodesOfKind, open, processItem, setAnchorNode, setSelection
 - 
Methods inherited from class com.saxonica.ee.stream.watch.AbstractWatchgetNamespaceResolver, getPipelineConfiguration, setNamespaceResolver, setPipelineConfiguration
 
- 
 
- 
- 
- 
Constructor Detail- 
KeySelectorWatchpublic KeySelectorWatch(ConstraintChecker checker, IdentityConstraint uniqueConstraint) 
 
- 
 - 
Method Detail- 
addKeyRefpublic void addKeyRef(RefSelectorWatch watch) Add a RefSelectorWatch to support a keyRef that refers to this key or unique constraints- Parameters:
- watch- the RefSelectorWatch which needs to be notified of all values encountered for this key
 
 - 
checkRowprotected void checkRow(AtomicSequence[] currentRow, boolean isTarget, Location locationId) throws XPathException Method to check that a row (that is, the collection of fields corresponding to one selected node) is valid. This implentation augments that in the superclass by notifying all interested keyref's of the values in this row.- Overrides:
- checkRowin class- SelectorWatch
- Parameters:
- currentRow- the values of the set of fields
- isTarget- set to true if this is a value of the key referred to by a key reference, rather than a value for this constraint's own selected fields.
- locationId- identifies the location of the selected node
- Throws:
- ValidationException- May be raised if the value of the row (that is, the combination of fields) violates the constraint
- XPathException
 
 
- 
 
-