Package org.alfresco.service.namespace
Class RegexQNamePattern
- java.lang.Object
-
- org.alfresco.service.namespace.RegexQNamePattern
-
- All Implemented Interfaces:
QNamePattern
@AlfrescoPublicApi public class RegexQNamePattern extends Object implements QNamePattern
Provides matching betweenqnamesusing regular expression matching.A simple
conveniencepattern matcher is also provided that will match any qname.- Author:
- Derek Hulley
- See Also:
String.matches(java.lang.String)
-
-
Field Summary
Fields Modifier and Type Field Description static QNamePatternMATCH_ALLA helper pattern matcher that will match all qnames
-
Constructor Summary
Constructors Constructor Description RegexQNamePattern(String combinedPattern)RegexQNamePattern(String namespaceUriPattern, String localNamePattern)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisMatch(QName qname)Checks if the given qualified name matches the pattern represented by this instanceStringtoString()
-
-
-
Field Detail
-
MATCH_ALL
public static final QNamePattern MATCH_ALL
A helper pattern matcher that will match all qnames
-
-
Constructor Detail
-
RegexQNamePattern
public RegexQNamePattern(String namespaceUriPattern, String localNamePattern)
- Parameters:
namespaceUriPattern- a regex pattern that will be applied to the namespace URIlocalNamePattern- a regex pattern that will be applied to the local name
-
RegexQNamePattern
public RegexQNamePattern(String combinedPattern)
- Parameters:
combinedPattern- a regex pattern that will be applied to the full qname string representation- See Also:
QName.toString()
-
-
Method Detail
-
isMatch
public boolean isMatch(QName qname)
Description copied from interface:QNamePatternChecks if the given qualified name matches the pattern represented by this instance- Specified by:
isMatchin interfaceQNamePattern- Parameters:
qname- the value to check against this pattern- Returns:
- Returns true if the regex pattern provided match thos of the provided qname
-
-