Пример #1
0
 private HttpUriRequest createRequest(IWebPath path) {
   final IWebPath parent = path.getParentPath();
   String basePath = parent.getParentPath().getFullPath();
   String newPath = basePath + "foo/" + path.getPathComponent();
   final URI originalUri = path.getUri();
   try {
     final URI newUri =
         new URI(originalUri.getScheme(), originalUri.getAuthority(), newPath, null, null);
     return new HttpGet(newUri);
   } catch (URISyntaxException e) {
     // TODO Auto-generated catch block
     e.printStackTrace();
     return null;
   }
 }
Пример #2
0
 private boolean hasSuitablePath(IPathState ps) {
   final IWebPath parentPath = ps.getPath().getParentPath();
   return (parentPath != null && parentPath.getParentPath() != null);
 }