public class AtlasPath extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AtlasPath.SegmentContext |
Modifier and Type | Field and Description |
---|---|
static String |
PATH_ARRAY_END |
static String |
PATH_ARRAY_START |
static String |
PATH_LIST_END |
static String |
PATH_LIST_START |
static String |
PATH_MAP_END |
static String |
PATH_MAP_START |
static String |
PATH_SEPARATOR |
static String |
PATH_SEPARATOR_ESCAPED |
Modifier and Type | Method and Description |
---|---|
AtlasPath |
appendField(String fieldName) |
static String |
cleanPathSegment(String pathSeg)
Remove all decoration other than path name from path segment expression.
|
AtlasPath |
deCollectionify(String collectionSegment) |
AtlasPath |
deParentify() |
static String |
getAttribute(String pathSeg) |
Integer |
getCollectionIndex(String segment) |
String |
getCollectionSegment() |
String |
getLastSegment() |
String |
getLastSegmentParent() |
AtlasPath |
getLastSegmentParentPath() |
String |
getOriginalPath() |
List<AtlasPath.SegmentContext> |
getSegmentContexts(boolean includeLeadingSlashSegment) |
List<String> |
getSegments() |
boolean |
hasCollection() |
boolean |
hasParent() |
static Integer |
indexOfSegment(String pathSegment)
Return collection index in the path segment expression passed in as an argument.
|
static boolean |
isArraySegment(String segment)
Returns true if specified path segment is array segment, otherwise false.
|
static Boolean |
isAttributeSegment(String pathSegment) |
static boolean |
isCollection(String path) |
Boolean |
isCollectionRoot() |
static Boolean |
isCollectionSegment(String pathSegment) |
Boolean |
isIndexedCollection() |
static Boolean |
isIndexedCollectionSegment(String pathSegment) |
static boolean |
isListSegment(String segment)
Returns true if specified path segment is list segment, otherwise false.
|
static boolean |
isMapSegment(String segment)
Returns true if specified path segment is map segment, otherwise false.
|
Boolean |
isRoot() |
static String |
overwriteCollectionIndex(String path,
int index) |
static String |
removeCollectionIndex(String segment) |
static String |
removeCollectionIndexes(String path) |
void |
setCollectionIndex(String segment,
Integer index) |
void |
setVacantCollectionIndex(Integer index) |
String |
toString() |
public static final String PATH_SEPARATOR
public static final String PATH_SEPARATOR_ESCAPED
public static final String PATH_ARRAY_START
public static final String PATH_ARRAY_END
public static final String PATH_LIST_START
public static final String PATH_LIST_END
public static final String PATH_MAP_START
public static final String PATH_MAP_END
public AtlasPath(String p)
public List<AtlasPath.SegmentContext> getSegmentContexts(boolean includeLeadingSlashSegment)
public String getLastSegment()
public boolean hasParent()
public boolean hasCollection()
public Boolean isIndexedCollection()
public Boolean isRoot()
public Boolean isCollectionRoot()
public String getLastSegmentParent()
public AtlasPath getLastSegmentParentPath()
public AtlasPath deParentify()
public static String cleanPathSegment(String pathSeg)
pathSeg
- path segment expression stringpublic static Integer indexOfSegment(String pathSegment)
null
if specified path segment expression doesn't have an index, or not
a collection.pathSegment
- path segment expressionpublic String getCollectionSegment()
public void setVacantCollectionIndex(Integer index)
public String getOriginalPath()
public static boolean isArraySegment(String segment)
segment
- path segment expressionpublic static boolean isListSegment(String segment)
segment
- path segment expressionpublic static boolean isMapSegment(String segment)
segment
- path segment expressionpublic static boolean isCollection(String path)
Copyright © 2018 JBoss by Red Hat. All rights reserved.