Empty trash deletes everything under trash by using the deleteFolder method
[pithos-web-client] / src / gr / grnet / pithos / web / client / tagtree / Tag.java
index 7386965..42640dd 100644 (file)
@@ -60,76 +60,6 @@ public class Tag extends Resource {
         return name;
     }
 
-//    public void populate(Response response) {
-//        String header = response.getHeader("Last-Modified");
-//        if (header != null)
-//            lastModified = DateTimeFormat.getFormat(PredefinedFormat.RFC_2822).parse(header);
-//
-//        header = response.getHeader("X-Container-Bytes-Used");
-//        if (header != null)
-//            bytesUsed = Long.valueOf(header);
-//
-//        subfolders.clear(); //This is necessary in case we update a pre-existing Tag so that stale subfolders won't show up
-//        files.clear();
-//        JSONValue json = JSONParser.parseStrict(response.getText());
-//        JSONArray array = json.isArray();
-//        if (array != null) {
-//            for (int i=0; i<array.size(); i++) {
-//                JSONObject o = array.get(i).isObject();
-//                if (o != null) {
-//                    String contentType = unmarshallString(o, "content_type");
-//                    if (o.containsKey("subdir") || (contentType != null && (contentType.startsWith("application/directory") || contentType.startsWith("application/folder")))) {
-//                        Tag f = new Tag();
-//                        f.populate(this, o, container);
-//                        subfolders.add(f);
-//                    }
-//                    else {
-//                        File file = new File();
-//                        file.populate(this, o, container);
-//                        files.add(file);
-//                    }
-//                }
-//            }
-//        }
-//    }
-//
-//    public void populate(Tag parent, JSONObject o, String aContainer) {
-//        this.parent = parent;
-//        String path = null;
-//        if (o.containsKey("subdir")) {
-//            path = unmarshallString(o, "subdir");
-//        }
-//        else {
-//            path = unmarshallString(o, "name");
-//            lastModified = unmarshallDate(o, "last_modified");
-//        }
-//        if (path.endsWith("/"))
-//            path = path.substring(0, path.length() - 1);
-//        if (path.contains("/"))
-//            name = path.substring(path.lastIndexOf("/") + 1, path.length()); //strip the prefix
-//        else
-//            name = path;
-//        if (aContainer != null) {
-//            container = aContainer;
-//            prefix = path;
-//        }
-//        else {
-//            container = name;
-//            prefix = "";
-//        }
-//    }
-//
-//    public static Tag createFromResponse(Response response, Tag result) {
-//        Tag f = null;
-//        if (result == null)
-//            f = new Tag();
-//        else
-//            f = result;
-//
-//        f.populate(response);
-//        return f;
-//    }
-
     @Override
     public boolean equals(Object other) {
         if (other instanceof Tag) {