public class IDConstraintChecker extends Verifier
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 |
|---|---|
static String |
ERR_DOUBLE_MATCH |
static String |
ERR_NOT_UNIQUE |
static String |
ERR_NOT_UNIQUE_DIAG |
static String |
ERR_UNDEFINED_KEY |
static String |
ERR_UNMATCHED_KEY_FIELD |
protected XMLSchemaGrammar |
grammar
the grammar object against which we are validating.
|
protected Vector |
matchers
active mathcers.
|
current, docDecl, ERR_DUPLICATE_ID, ERR_MISSING_ATTRIBUTE, ERR_UNCOMPLETED_CONTENT, ERR_UNEXPECTED_ATTRIBUTE, ERR_UNEXPECTED_ELEMENT, ERR_UNEXPECTED_STARTTAG, ERR_UNEXPECTED_TEXT, ERR_UNSOLD_IDREF, errorHandler, hadError, panicLeveldummyLocator, idrefs, ids, locator, namespaceSupport, performIDcheck| Constructor and Description |
|---|
IDConstraintChecker(XMLSchemaGrammar grammar,
ErrorHandler errorHandler) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
add(Matcher matcher) |
protected boolean |
addKeyValue(SelectorMatcher scope,
com.sun.msv.verifier.identity.KeyValue value)
adds a new KeyValue to the value set.
|
void |
characters(char[] buf,
int start,
int len) |
void |
endDocument() |
void |
endElement(String namespaceUri,
String localName,
String qName) |
protected org.relaxng.datatype.Datatype[] |
feedAttribute(Acceptor child,
String uri,
String localName,
String qName,
String value) |
protected SelectorMatcher |
getActiveScope(IdentityConstraint c) |
protected com.sun.msv.verifier.identity.KeyValue[] |
getKeyValues(SelectorMatcher scope)
gets the all
KeyValues that were added within the specified scope. |
static String |
localizeMessage(String propertyName,
Object arg) |
static String |
localizeMessage(String propertyName,
Object[] args) |
protected void |
onNextAcceptorReady(StartTagInfo sti,
Acceptor next)
this method is called from the startElement method
after the tag name is processed and the child acceptor is created.
|
protected void |
popActiveScope(IdentityConstraint c,
SelectorMatcher matcher) |
protected void |
pushActiveScope(IdentityConstraint c,
SelectorMatcher matcher) |
protected void |
remove(Matcher matcher) |
protected void |
reportError(ErrorInfo ei,
String propKey,
Object[] args)
reports an error.
|
protected void |
reportError(Locator loc,
ErrorInfo ei,
String propKey,
Object[] args) |
void |
startDocument() |
getCurrentElementType, getErrorHandler, getLastCharacterType, ignorableWhitespace, init, isValid, onDuplicateId, onError, onError, setErrorHandler, setPanicMode, startElement, verifyTextendPrefixMapping, getBaseUri, getLocator, isNotation, isUnparsedEntity, notationDecl, onID, processingInstruction, resolveNamespacePrefix, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDeclclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLocatorendPrefixMapping, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMappingprotected final XMLSchemaGrammar grammar
protected final Vector matchers
public static final String ERR_UNMATCHED_KEY_FIELD
public static final String ERR_NOT_UNIQUE
public static final String ERR_NOT_UNIQUE_DIAG
public static final String ERR_DOUBLE_MATCH
public static final String ERR_UNDEFINED_KEY
public IDConstraintChecker(XMLSchemaGrammar grammar, ErrorHandler errorHandler)
protected void add(Matcher matcher)
protected void remove(Matcher matcher)
protected SelectorMatcher getActiveScope(IdentityConstraint c)
protected void pushActiveScope(IdentityConstraint c, SelectorMatcher matcher)
protected void popActiveScope(IdentityConstraint c, SelectorMatcher matcher)
protected boolean addKeyValue(SelectorMatcher scope, com.sun.msv.verifier.identity.KeyValue value)
protected com.sun.msv.verifier.identity.KeyValue[] getKeyValues(SelectorMatcher scope)
KeyValues that were added within the specified scope.public void startDocument()
throws SAXException
startDocument in interface ContentHandlerstartDocument in class VerifierSAXExceptionpublic void endDocument()
throws SAXException
endDocument in interface ContentHandlerendDocument in class VerifierSAXExceptionprotected void onNextAcceptorReady(StartTagInfo sti, Acceptor next) throws SAXException
VerifierThis method is called before the attributes are consumed.
derived class can use this method to do something useful.
onNextAcceptorReady in class VerifierSAXExceptionprotected org.relaxng.datatype.Datatype[] feedAttribute(Acceptor child, String uri, String localName, String qName, String value) throws SAXException
feedAttribute in class VerifierSAXExceptionpublic void characters(char[] buf,
int start,
int len)
throws SAXException
characters in interface ContentHandlercharacters in class VerifierSAXExceptionpublic void endElement(String namespaceUri, String localName, String qName) throws SAXException
endElement in interface ContentHandlerendElement in class VerifierSAXExceptionprotected void reportError(ErrorInfo ei, String propKey, Object[] args) throws SAXException
SAXExceptionprotected void reportError(Locator loc, ErrorInfo ei, String propKey, Object[] args) throws SAXException
SAXExceptionCopyright © 2016 Oracle Corporation. All Rights Reserved.