This class can be used in the same way as Verifier.
This class also checks XML Schema's identity constraint.
| Modifier and Type | Field and Description |
|---|---|
| private final Map | activeScopes
a map from |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| protected final XMLSchemaGrammar | grammar
the grammar object against which we are validating. |
| private final Map | keyValues
a map from |
| protected final Vector | matchers
active mathcers. |
| private final Map | referenceScope
a map from keyref |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected boolean | Returns: true if this is a new value.adds a new KeyValue to the value set. |
| public void | characters(char[]
the characters from the XML document buf, int the start position in the array start, int the number of characters to read from the array len)Overrides com. Implements org. |
| public void | endDocument()
Overrides com. Implements org. |
| public void | endElement(String
the Namespace URI, or the empty string if the
element has no Namespace URI or if Namespace
processing is not being performed namespaceUri, String the local name (without prefix), or the
empty string if Namespace processing is not being
performed localName, String the qualified XML name (with prefix), or the
empty string if qualified names are not available qName)Overrides com. Implements org. |
| protected Datatype[] | feedAttribute(Acceptor child, String uri, String localName, String qName, String value)
Overrides com. |
| protected SelectorMatcher | |
| protected KeyValue[] | getKeyValues(SelectorMatcher scope)
gets the all |
| public static String | |
| public static String | localizeMessage(String propertyName, Object[] args)
|
| protected void | onNextAcceptorReady(StartTagInfo sti, Acceptor next)
Overrides com. |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| public void | startDocument()
Overrides com. Implements org. |
| activeScopes | back to summary |
|---|---|
| private final Map<IdentityConstraint, LightStack> activeScopes a map from | |
| ERR_DOUBLE_MATCH | back to summary |
|---|---|
| public static final String ERR_DOUBLE_MATCH | |
| ERR_NOT_UNIQUE | back to summary |
|---|---|
| public static final String ERR_NOT_UNIQUE | |
| ERR_NOT_UNIQUE_DIAG | back to summary |
|---|---|
| public static final String ERR_NOT_UNIQUE_DIAG | |
| ERR_UNDEFINED_KEY | back to summary |
|---|---|
| public static final String ERR_UNDEFINED_KEY | |
| ERR_UNMATCHED_KEY_FIELD | back to summary |
|---|---|
| public static final String ERR_UNMATCHED_KEY_FIELD | |
| grammar | back to summary |
|---|---|
| protected final XMLSchemaGrammar grammar the grammar object against which we are validating. | |
| keyValues | back to summary |
|---|---|
| private final Map<SelectorMatcher, Set<Object>> keyValues a map from | |
| matchers | back to summary |
|---|---|
| protected final Vector<Matcher> matchers active mathcers. | |
| referenceScope | back to summary |
|---|---|
| private final Map<SelectorMatcher, SelectorMatcher> referenceScope a map from keyref | |
| IDConstraintChecker | back to summary |
|---|---|
| public IDConstraintChecker(XMLSchemaGrammar grammar, ErrorHandler errorHandler) | |
| add | back to summary |
|---|---|
| protected void add(Matcher matcher) | |
| addKeyValue | back to summary |
|---|---|
| protected boolean addKeyValue(SelectorMatcher scope, KeyValue value) adds a new KeyValue to the value set.
| |
| characters | back to summary |
|---|---|
| public void characters(char[] buf, int start, int len) throws SAXException Overrides com. Implements org. Doc from org. Receive notification of character data. The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity so that the Locator provides useful information. The application must not attempt to read from the array outside of the specified range. Individual characters may consist of more than one Java
Your code should not assume that algorithms using
Note that some parsers will report whitespace in element
content using the
| |
| endDocument | back to summary |
|---|---|
| public void endDocument() throws SAXException Overrides com. Implements org. Doc from org. Receive notification of the end of a document. This method is invoked by the parser to signal it has reached the end of the document after successfully completing the parsing process. After the event, the parser will return the control to the application.
| |
| endElement | back to summary |
|---|---|
| public void endElement(String namespaceUri, String localName, String qName) throws SAXException Overrides com. Implements org. Doc from org. Receive notification of the end of an element. The SAX parser will invoke this method at the end of every
element in the XML document; there will be a corresponding
For information on the names, see startElement.
| |
| feedAttribute | back to summary |
|---|---|
| protected Datatype[] feedAttribute(Acceptor child, String uri, String localName, String qName, String value) throws SAXException Overrides com. | |
| getActiveScope | back to summary |
|---|---|
| protected SelectorMatcher getActiveScope(IdentityConstraint c) | |
| getKeyValues | back to summary |
|---|---|
| protected KeyValue[] getKeyValues(SelectorMatcher scope) gets the all | |
| localizeMessage | back to summary |
|---|---|
| public static String localizeMessage(String propertyName, Object arg) | |
| localizeMessage | back to summary |
|---|---|
| public static String localizeMessage(String propertyName, Object[] args) | |
| onNextAcceptorReady | back to summary |
|---|---|
| protected void onNextAcceptorReady(StartTagInfo sti, Acceptor next) throws SAXException Overrides com. Doc from com. this method is called from the startElement method after the tag name is processed and the child acceptor is created. This method is called before the attributes are consumed. derived class can use this method to do something useful. | |
| popActiveScope | back to summary |
|---|---|
| protected void popActiveScope(IdentityConstraint c, SelectorMatcher matcher) | |
| pushActiveScope | back to summary |
|---|---|
| protected void pushActiveScope(IdentityConstraint c, SelectorMatcher matcher) | |
| remove | back to summary |
|---|---|
| protected void remove(Matcher matcher) | |
| reportError | back to summary |
|---|---|
| protected void reportError(ErrorInfo ei, String propKey, Object[] args) throws SAXException reports an error. | |
| reportError | back to summary |
|---|---|
| protected void reportError(Locator loc, ErrorInfo ei, String propKey, Object[] args) throws SAXException | |
| startDocument | back to summary |
|---|---|
| public void startDocument() throws SAXException Overrides com. Implements org. Doc from org. Receive notification of the beginning of a document. The SAX parser will invoke this method only once, before any
other event callbacks (except for
| |