private static List < Segment > parseSegments ( String origPathStr ) { String pathStr = origPathStr ; if ( ! pathStr . startsWith ( "/" ) ) { pathStr = pathStr + "/" ; } List < Segment > result = new ArrayList <> ( ) ; for ( String segmentStr : PATH_SPLITTER . split ( pathStr ) ) { Matcher m = SEGMENT_PATTERN . matcher ( segmentStr ) ; if ( ! m . matches ( ) ) { throw new IllegalArgumentException ( "Bad aql path: " + origPathStr ) ; } Segment segment = new Segment ( ) ; segment . attribute = m . group ( 1 ) ; segment . nodeId = m . groupCount ( ) >= 3 ? m . group ( 3 ) : null ; result . add ( segment ) ; } return result ; }
currently does not support paths with name constrains