1 package org.simantics.graph.query;
4 public class UriUtils {
6 public static Path uriToPath(String uri) {
9 if(uri.startsWith("http:/")) {
12 segments = uri.substring(7).split("/");
16 int p = uri.indexOf('/');
18 return new PathRoot(uri);
20 segments = uri.substring(p+1).split("/");
21 cur = new PathRoot(uri.substring(0, p));
25 for(String segment : segments)
26 cur = new PathChild(segment, cur);