org.xwiki.model.reference
Class RegexEntityReference
java.lang.Object
org.xwiki.model.reference.EntityReference
org.xwiki.model.reference.PartialEntityReference
org.xwiki.model.reference.RegexEntityReference
- All Implemented Interfaces:
- Serializable, Cloneable, Comparable<EntityReference>
public class RegexEntityReference
- extends PartialEntityReference
An EntityReference used to match another one.
This EntityReference contains a Pattern which will tries to match provided EntityReference
name and type.
The RegexEntityReference can be partial or contain holes, for example if only the space regex reference is
provided it will tries to match only space part of the provided reference and consider other parts as matched.
It's of course possible to mix regex and "normal" EntityReference member. In that case normal member
PartialEntityReference.equals(Object) method behave as usual and then call following member PartialEntityReference.equals(Object) etc.
- Since:
- 3.2M1
- Version:
- $Id: c0f926c92e1d47206167027c18026202ccfc3dd8 $
- See Also:
- Serialized Form
| Methods inherited from class org.xwiki.model.reference.EntityReference |
appendParent, compareTo, extractReference, getName, getParameter, getParent, getReversedReferenceChain, getRoot, getType, removeParent, replaceParent, setName, setParameter, setParameters, setParent, setType, toString |
RegexEntityReference
public RegexEntityReference(Pattern pattern,
EntityType type)
- Parameters:
pattern - the pattern used to match the nametype - the type of the reference
RegexEntityReference
public RegexEntityReference(Pattern pattern,
EntityType type,
EntityReference parent)
- Parameters:
pattern - the pattern used to match the nametype - the type of the referenceparent - the parent of the reference
getPattern
public Pattern getPattern()
- Returns:
- the pattern used to match the name
isNameEqual
protected boolean isNameEqual(String name)
- Overrides:
isNameEqual in class PartialEntityReference
- Parameters:
name - the name to compare to this name
- Returns:
- true of the passed name is equal to this name
Copyright © 2004–2014 XWiki. All rights reserved.