|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.msv.verifier.identity.Matcher
com.sun.msv.verifier.identity.PathMatcher
public abstract class PathMatcher
Base implementation of XPath matching engine. It only supports the subset defined in XML Schema Part 1. Extra care must be taken to call the testInitialMatch method after the creation of an object. Match to an attribute is not supported. It is implemented in FieldPathMatcher class. The onMatched method is called when the specified XPath matches the current element. Derived classes should implement this method to do something useful.
Field Summary | |
---|---|
protected Matcher[] |
children
child matchers. |
Fields inherited from class com.sun.msv.verifier.identity.Matcher |
---|
owner |
Constructor Summary | |
---|---|
protected |
PathMatcher(IDConstraintChecker owner,
XPath[] paths)
|
Method Summary | |
---|---|
protected void |
characters(char[] buf,
int start,
int len)
|
protected void |
endElement(Datatype type)
|
protected int |
getDepth()
|
protected void |
onAttribute(String namespaceURI,
String localName,
String value,
Datatype type)
|
protected abstract void |
onAttributeMatched(String namespaceURI,
String localName,
String value,
Datatype type)
this method is called when the attribute matches the XPath. |
protected abstract void |
onElementMatched(String namespaceURI,
String localName)
this method is called when the element matches the XPath. |
protected void |
onRemoved()
called when this bundle is deactivated. |
protected void |
start(String namespaceURI,
String localName)
this method should be called immediately after the installment of this PathMatcher. |
protected void |
startElement(String namespaceURI,
String localName)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Matcher[] children
Constructor Detail |
---|
protected PathMatcher(IDConstraintChecker owner, XPath[] paths)
Method Detail |
---|
protected void start(String namespaceURI, String localName) throws SAXException
SAXException
protected abstract void onElementMatched(String namespaceURI, String localName) throws SAXException
SAXException
protected abstract void onAttributeMatched(String namespaceURI, String localName, String value, Datatype type) throws SAXException
SAXException
protected void startElement(String namespaceURI, String localName) throws SAXException
SAXException
protected void onAttribute(String namespaceURI, String localName, String value, Datatype type) throws SAXException
SAXException
protected final int getDepth()
protected void endElement(Datatype type) throws SAXException
endElement
in class Matcher
SAXException
protected void characters(char[] buf, int start, int len) throws SAXException
characters
in class Matcher
SAXException
protected void onRemoved() throws SAXException
SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |