protected PathNode pathNode(String pattern){
  final String seq[]=pattern.split("/");
  final PathElt elements[]=new PathElt[seq.length];
  PathMod mod=null;
  for (int i=0; i < seq.length; i++) {
    final String s=seq[i];
    boolean inverse=s.charAt(0) == '^';
switch (s.charAt(s.length() - 1)) {
case '*':
      mod=PathMod.ZERO_OR_MORE;
    break;
case '+':
  mod=PathMod.ONE_OR_MORE;
break;
case '?':
mod=PathMod.ZERO_OR_ONE;
break;
}
String c=s.substring(inverse ? 1 : 0,s.length() - (mod != null ? 1 : 0));
elements[i]=new PathElt(constantNode(c),inverse,mod);
}
return new PathNode(new PathAlternative(new PathSequence(elements)));
}

protected PathNode pathNode ( String pattern ) { final String seq [ ] = pattern . split ( "/" ) ; final PathElt elements [ ] = new PathElt [ seq . length ] ; PathMod mod = null ; for ( int i = 0 ; i < seq . length ; i ++ ) { final String s = seq [ i ] ; boolean inverse = s . charAt ( 0 ) == '^' ; switch ( s . charAt ( s . length ( ) - 1 ) ) { case '*' : mod = PathMod . ZERO_OR_MORE ; break ; case '+' : mod = PathMod . ONE_OR_MORE ; break ; case '?' : mod = PathMod . ZERO_OR_ONE ; break ; } String c = s . substring ( inverse ? 1 : 0 , s . length ( ) - ( mod != null ? 1 : 0 ) ) ; elements [ i ] = new PathElt ( constantNode ( c ) , inverse , mod ) ; } return new PathNode ( new PathAlternative ( new PathSequence ( elements ) ) ) ; }
this method is only implemented in part . the issue is what patterns are supported . the desired support as of the intended contract of this method is that pattern can be any sparql property path expression without any whitespace , and where every property in the path is reduced to a single letter a - z . e . g . " ( a / b ? / c ) + | a | c * " the current support is that parenthesis , alternatives and negated properties are not supported .
