public class ResourceIdUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
extract(String rid,
String token,
String pattern)
Extracts the specified segment from a resource identifier using the
given pattern.
|
static String |
leaf(String rid)
Extracts the leaf portion of the specified resource id, i.e.
|
static String |
parent(String rid)
Extracts the parent portion of the specified resource id, i.e.
|
static String |
replace(String value,
String token,
String rid)
Substitutes the specified value into the supplied rid pattern.
|
public static String replace(String value, String token, String rid)
value
- value to be substitutedtoken
- name of the segmentrid
- pattern identifying the resource id path structurepublic static String extract(String rid, String token, String pattern)
Some examples of usage are as follows:
rid
- resource identifier to be parsedtoken
- name of the token to be extractedpattern
- pattern identifying segments of interestpublic static String leaf(String rid)
rid
- resource idCopyright © 2015. All Rights Reserved.