- All Implemented Interfaces:
- org.alfresco.service.namespace.QNamePattern
public class JCRPatternMatch
extends java.lang.Object
implements org.alfresco.service.namespace.QNamePattern
Checks if the QName matches the passed JCR pattern.
The pattern may be a full name or a partial name with one or more wildcard
characters ("*"), or a disjunction (using the "|" character to represent
logical OR) of these. For example,
isMatch("jcr:* | myapp:report | my doc")
Note that leading and trailing whitespace around a disjunct is ignored,
but whitespace within a disjunct forms part of the pattern to be matched.
The EBNF for namePattern is:
namePattern ::= disjunct {'|' disjunct}
disjunct ::= name [':' name]
name ::= '*' | ['*'] fragment {'*' fragment} ['*']
fragment ::= char {char}
char ::= nonspace | ' '
nonspace ::= (* Any Unicode character except: '/', ':', '[', ']', '*', ''', '"', '|' or any whitespace character *)