Metadata in the object info window can be updated.
authorMiltiadis Vasilakis <mvasilak@gmail.com>
Thu, 1 Sep 2011 10:03:33 +0000 (13:03 +0300)
committerMiltiadis Vasilakis <mvasilak@gmail.com>
Thu, 1 Sep 2011 10:03:33 +0000 (13:03 +0300)
Other minor fixes.

pithos-macos.xcodeproj/project.pbxproj
pithos-macos/MetadataKeyFormatter.h [new file with mode: 0644]
pithos-macos/MetadataKeyFormatter.m [new file with mode: 0644]
pithos-macos/MetadataKeyTransformer.h [new file with mode: 0644]
pithos-macos/MetadataKeyTransformer.m [new file with mode: 0644]
pithos-macos/PithosNodeInfoController.xib
pithos-macos/PithosObjectNode.h
pithos-macos/PithosObjectNode.m

index b47c1b6..424d7b8 100644 (file)
@@ -28,7 +28,6 @@
                610DD34A13E6BD8B00ED982F /* ASIPithosRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD33C13E6BD8B00ED982F /* ASIPithosRequest.m */; };
                610DD34E13E6BEF400ED982F /* PithosBrowserController.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD34D13E6BEF400ED982F /* PithosBrowserController.m */; };
                610DD35013E6C00E00ED982F /* PithosBrowserController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 610DD34F13E6C00E00ED982F /* PithosBrowserController.xib */; };
-               610DD35213E6C08500ED982F /* libz.1.2.3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 610DD35113E6C08500ED982F /* libz.1.2.3.dylib */; };
                610DD35413E6C09100ED982F /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 610DD35313E6C09100ED982F /* CoreServices.framework */; };
                610DD35613E6C0A700ED982F /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 610DD35513E6C0A700ED982F /* SystemConfiguration.framework */; };
                610DD35913E6C3D200ED982F /* PithosNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 610DD35813E6C3D100ED982F /* PithosNode.m */; };
@@ -42,6 +41,9 @@
                611FFCB313EBF40900E43E18 /* ImageAndTextCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 611FFCB213EBF40900E43E18 /* ImageAndTextCell.m */; };
                6121250913F033F500063041 /* PithosBrowserPreviewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6121250813F033F400063041 /* PithosBrowserPreviewController.xib */; };
                6139837113EFEECC004CE444 /* FileSystemBrowserCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6139837013EFEECC004CE444 /* FileSystemBrowserCell.m */; };
+               615615DD140CECDB00017BD4 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 615615DC140CECDB00017BD4 /* libz.dylib */; };
+               615A444E140F8A5700308614 /* MetadataKeyTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 615A444D140F8A5700308614 /* MetadataKeyTransformer.m */; };
+               615A4451140F8A7F00308614 /* MetadataKeyFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 615A4450140F8A7F00308614 /* MetadataKeyFormatter.m */; };
                616FC0AF13F91BA400140A33 /* PithosNodeInfoController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 616FC0AE13F91BA400140A33 /* PithosNodeInfoController.xib */; };
                616FC0B313F97D0800140A33 /* PithosNodeInfoController.m in Sources */ = {isa = PBXBuildFile; fileRef = 616FC0B213F97D0800140A33 /* PithosNodeInfoController.m */; };
                617460F1140BE45C00D333A1 /* BytesExtendedSizeTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 617460F0140BE45C00D333A1 /* BytesExtendedSizeTransformer.m */; };
                610DD34C13E6BEF400ED982F /* PithosBrowserController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PithosBrowserController.h; sourceTree = "<group>"; };
                610DD34D13E6BEF400ED982F /* PithosBrowserController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PithosBrowserController.m; sourceTree = "<group>"; };
                610DD34F13E6C00E00ED982F /* PithosBrowserController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PithosBrowserController.xib; sourceTree = "<group>"; };
-               610DD35113E6C08500ED982F /* libz.1.2.3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.1.2.3.dylib; path = usr/lib/libz.1.2.3.dylib; sourceTree = SDKROOT; };
                610DD35313E6C09100ED982F /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; };
                610DD35513E6C0A700ED982F /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
                610DD35713E6C3D100ED982F /* PithosNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PithosNode.h; sourceTree = "<group>"; };
                6121250813F033F400063041 /* PithosBrowserPreviewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PithosBrowserPreviewController.xib; sourceTree = "<group>"; };
                6139836F13EFEECC004CE444 /* FileSystemBrowserCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileSystemBrowserCell.h; path = "pithos-macos/FileSystemBrowserCell.h"; sourceTree = "<group>"; };
                6139837013EFEECC004CE444 /* FileSystemBrowserCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FileSystemBrowserCell.m; path = "pithos-macos/FileSystemBrowserCell.m"; sourceTree = "<group>"; };
+               615615DC140CECDB00017BD4 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
+               615A444C140F8A5700308614 /* MetadataKeyTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MetadataKeyTransformer.h; path = "pithos-macos/MetadataKeyTransformer.h"; sourceTree = "<group>"; };
+               615A444D140F8A5700308614 /* MetadataKeyTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MetadataKeyTransformer.m; path = "pithos-macos/MetadataKeyTransformer.m"; sourceTree = "<group>"; };
+               615A444F140F8A7F00308614 /* MetadataKeyFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MetadataKeyFormatter.h; path = "pithos-macos/MetadataKeyFormatter.h"; sourceTree = "<group>"; };
+               615A4450140F8A7F00308614 /* MetadataKeyFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MetadataKeyFormatter.m; path = "pithos-macos/MetadataKeyFormatter.m"; sourceTree = "<group>"; };
                616FC0AE13F91BA400140A33 /* PithosNodeInfoController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PithosNodeInfoController.xib; sourceTree = "<group>"; };
                616FC0B113F97D0800140A33 /* PithosNodeInfoController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PithosNodeInfoController.h; sourceTree = "<group>"; };
                616FC0B213F97D0800140A33 /* PithosNodeInfoController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PithosNodeInfoController.m; sourceTree = "<group>"; };
                        isa = PBXFrameworksBuildPhase;
                        buildActionMask = 2147483647;
                        files = (
+                               615615DD140CECDB00017BD4 /* libz.dylib in Frameworks */,
                                610DD35613E6C0A700ED982F /* SystemConfiguration.framework in Frameworks */,
                                610DD35413E6C09100ED982F /* CoreServices.framework in Frameworks */,
-                               610DD35213E6C08500ED982F /* libz.1.2.3.dylib in Frameworks */,
                                610DD2F613E6BB2000ED982F /* Cocoa.framework in Frameworks */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                610DD2F413E6BB2000ED982F /* Frameworks */ = {
                        isa = PBXGroup;
                        children = (
-                               610DD35113E6C08500ED982F /* libz.1.2.3.dylib */,
+                               615615DC140CECDB00017BD4 /* libz.dylib */,
                                610DD2F513E6BB2000ED982F /* Cocoa.framework */,
                                610DD35313E6C09100ED982F /* CoreServices.framework */,
                                610DD35513E6C0A700ED982F /* SystemConfiguration.framework */,
                6139837313F01CFC004CE444 /* Utilities */ = {
                        isa = PBXGroup;
                        children = (
+                               615A442E140E5ECA00308614 /* Formatters */,
                                6180C22713FAED1D00BCA40B /* Cells */,
                                6180C22813FAED4B00BCA40B /* Value Transformers */,
                        );
                        name = Utilities;
                        sourceTree = "<group>";
                };
+               615A442E140E5ECA00308614 /* Formatters */ = {
+                       isa = PBXGroup;
+                       children = (
+                               615A444F140F8A7F00308614 /* MetadataKeyFormatter.h */,
+                               615A4450140F8A7F00308614 /* MetadataKeyFormatter.m */,
+                       );
+                       name = Formatters;
+                       sourceTree = "<group>";
+               };
                6180C22713FAED1D00BCA40B /* Cells */ = {
                        isa = PBXGroup;
                        children = (
                                617460F0140BE45C00D333A1 /* BytesExtendedSizeTransformer.m */,
                                6180C22C13FBF1FC00BCA40B /* LastModifiedDateTransformer.h */,
                                6180C22D13FBF1FD00BCA40B /* LastModifiedDateTransformer.m */,
+                               615A444C140F8A5700308614 /* MetadataKeyTransformer.h */,
+                               615A444D140F8A5700308614 /* MetadataKeyTransformer.m */,
                        );
                        name = "Value Transformers";
                        sourceTree = "<group>";
                                6180C22B13FAEF4B00BCA40B /* BytesSizeTransformer.m in Sources */,
                                6180C22E13FBF1FD00BCA40B /* LastModifiedDateTransformer.m in Sources */,
                                617460F1140BE45C00D333A1 /* BytesExtendedSizeTransformer.m in Sources */,
+                               615A444E140F8A5700308614 /* MetadataKeyTransformer.m in Sources */,
+                               615A4451140F8A7F00308614 /* MetadataKeyFormatter.m in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
diff --git a/pithos-macos/MetadataKeyFormatter.h b/pithos-macos/MetadataKeyFormatter.h
new file mode 100644 (file)
index 0000000..26bbb49
--- /dev/null
@@ -0,0 +1,39 @@
+//
+//  MetadataKeyFormatter.h
+//  pithos-macos
+//
+// Copyright 2011 GRNET S.A. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
+
+@interface MetadataKeyFormatter : NSFormatter
+@end
diff --git a/pithos-macos/MetadataKeyFormatter.m b/pithos-macos/MetadataKeyFormatter.m
new file mode 100644 (file)
index 0000000..066579c
--- /dev/null
@@ -0,0 +1,72 @@
+//
+//  MetadataKeyFormatter.m
+//  pithos-macos
+//
+// Copyright 2011 GRNET S.A. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
+
+#import "MetadataKeyFormatter.h"
+
+@implementation MetadataKeyFormatter
+
+- (NSString *)stringForObjectValue:(id)anObject {
+       if (anObject != nil)
+               return [NSString stringWithString:anObject];
+       return nil;
+}
+
+- (BOOL)getObjectValue:(id *)anObject forString:(NSString *)string errorDescription:(NSString **)error {
+       *anObject = [NSString stringWithString:string];
+       return YES;
+}
+
+- (BOOL)isPartialStringValid:(NSString *)partialString newEditingString:(NSString **)newString errorDescription:(NSString **)error {
+       if ([partialString length] == 0) {
+        *newString = nil;
+        return NO;
+    }
+    
+       unichar aChar;  
+       for (int i = 0; i < [partialString length]; i++) {
+               aChar = [partialString characterAtIndex:i];
+               if (!(aChar == '_' || (aChar >= '0' && aChar <= '9') || (aChar >= 'A' && aChar <= 'Z') || (aChar >= 'a' && aChar <= 'z'))) {
+                       *newString = nil;
+                       return NO;
+               }
+       }
+
+       *newString = [partialString lowercaseString];
+       return NO;
+}
+
+@end
diff --git a/pithos-macos/MetadataKeyTransformer.h b/pithos-macos/MetadataKeyTransformer.h
new file mode 100644 (file)
index 0000000..1621da0
--- /dev/null
@@ -0,0 +1,39 @@
+//
+//  MetadataKeyTransformer.h
+//  pithos-macos
+//
+// Copyright 2011 GRNET S.A. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
+
+@interface MetadataKeyTransformer : NSValueTransformer
+@end
diff --git a/pithos-macos/MetadataKeyTransformer.m b/pithos-macos/MetadataKeyTransformer.m
new file mode 100644 (file)
index 0000000..ef9ee7c
--- /dev/null
@@ -0,0 +1,60 @@
+//
+//  MetadataKeyTransformer.m
+//  pithos-macos
+//
+// Copyright 2011 GRNET S.A. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+// 
+//   1. Redistributions of source code must retain the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer.
+// 
+//   2. Redistributions in binary form must reproduce the above
+//      copyright notice, this list of conditions and the following
+//      disclaimer in the documentation and/or other materials
+//      provided with the distribution.
+// 
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+// 
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
+
+#import "MetadataKeyTransformer.h"
+
+@implementation MetadataKeyTransformer
+
++ (Class)transformedValueClass {
+       return [NSString class];
+}
+
++ (BOOL)allowsReverseTransformation {
+       return NO;
+}
+
+- (id)transformedValue:(id)value {
+    if (value == nil)
+               return nil;
+    return [[(NSString *)value stringByReplacingOccurrencesOfString:@"-" withString:@"_"] lowercaseString];
+}
+
++ (void)initialize {
+    [[NSValueTransformer class] setValueTransformer:[self new] forName:@"MetadataKeyTransformer"];
+}
+
+@end
index de2b7b0..85445b3 100644 (file)
@@ -60,7 +60,7 @@
                                <string key="NSWindowTitle">Window</string>
                                <string key="NSWindowClass">NSWindow</string>
                                <nil key="NSViewClass"/>
-                               <string key="NSWindowContentMaxSize">{400, 510}</string>
+                               <string key="NSWindowContentMaxSize">{400, 515}</string>
                                <string key="NSWindowContentMinSize">{265, 515}</string>
                                <object class="NSView" key="NSWindowView" id="1006">
                                        <reference key="NSNextResponder"/>
                                                </object>
                                                <object class="NSScrollView" id="544793652">
                                                        <reference key="NSNextResponder" ref="1006"/>
-                                                       <int key="NSvFlags">268</int>
+                                                       <int key="NSvFlags">270</int>
                                                        <object class="NSMutableArray" key="NSSubviews">
                                                                <bool key="EncodedWithXMLCoder">YES</bool>
                                                                <object class="NSClipView" id="105333262">
                                                        <string key="NSFrame">{{27, 7}, {18, 18}}</string>
                                                        <reference key="NSSuperview" ref="1006"/>
                                                        <reference key="NSWindow"/>
-                                                       <reference key="NSNextKeyView"/>
+                                                       <reference key="NSNextKeyView" ref="889445631"/>
                                                        <bool key="NSEnabled">YES</bool>
                                                        <object class="NSButtonCell" key="NSCell" id="104364229">
                                                                <int key="NSCellFlags">-2080244224</int>
                                                                <reference key="NSTextColor" ref="162787576"/>
                                                        </object>
                                                </object>
+                                               <object class="NSButton" id="870983347">
+                                                       <reference key="NSNextResponder" ref="1006"/>
+                                                       <int key="NSvFlags">265</int>
+                                                       <string key="NSFrame">{{193, 5}, {62, 19}}</string>
+                                                       <reference key="NSSuperview" ref="1006"/>
+                                                       <reference key="NSWindow"/>
+                                                       <reference key="NSNextKeyView"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSButtonCell" key="NSCell" id="978069596">
+                                                               <int key="NSCellFlags">-2080244224</int>
+                                                               <int key="NSCellFlags2">134217728</int>
+                                                               <string key="NSContents">Revert</string>
+                                                               <object class="NSFont" key="NSSupport" id="1072536285">
+                                                                       <string key="NSName">LucidaGrande</string>
+                                                                       <double key="NSSize">12</double>
+                                                                       <int key="NSfFlags">16</int>
+                                                               </object>
+                                                               <reference key="NSControlView" ref="870983347"/>
+                                                               <int key="NSButtonFlags">-2038152961</int>
+                                                               <int key="NSButtonFlags2">164</int>
+                                                               <string key="NSAlternateContents"/>
+                                                               <string key="NSKeyEquivalent"/>
+                                                               <int key="NSPeriodicDelay">400</int>
+                                                               <int key="NSPeriodicInterval">75</int>
+                                                       </object>
+                                               </object>
+                                               <object class="NSButton" id="889445631">
+                                                       <reference key="NSNextResponder" ref="1006"/>
+                                                       <int key="NSvFlags">265</int>
+                                                       <string key="NSFrame">{{123, 5}, {62, 19}}</string>
+                                                       <reference key="NSSuperview" ref="1006"/>
+                                                       <reference key="NSWindow"/>
+                                                       <reference key="NSNextKeyView" ref="870983347"/>
+                                                       <bool key="NSEnabled">YES</bool>
+                                                       <object class="NSButtonCell" key="NSCell" id="631288671">
+                                                               <int key="NSCellFlags">-2080244224</int>
+                                                               <int key="NSCellFlags2">134217728</int>
+                                                               <string key="NSContents">Apply</string>
+                                                               <reference key="NSSupport" ref="1072536285"/>
+                                                               <reference key="NSControlView" ref="889445631"/>
+                                                               <int key="NSButtonFlags">-2038152961</int>
+                                                               <int key="NSButtonFlags2">164</int>
+                                                               <string key="NSAlternateContents"/>
+                                                               <string key="NSKeyEquivalent"/>
+                                                               <int key="NSPeriodicDelay">400</int>
+                                                               <int key="NSPeriodicInterval">75</int>
+                                                       </object>
+                                               </object>
                                        </object>
                                        <string key="NSFrame">{{7, 11}, {265, 515}}</string>
                                        <reference key="NSSuperview"/>
                                </object>
                                <string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
                                <string key="NSMinSize">{265, 537}</string>
-                               <string key="NSMaxSize">{400, 532}</string>
+                               <string key="NSMaxSize">{400, 537}</string>
                        </object>
                        <object class="NSUserDefaultsController" id="942694500">
                                <bool key="NSSharedInstance">YES</bool>
                                <string key="NSInitialKey">key</string>
                                <string key="NSInitialValue">value</string>
                        </object>
+                       <object class="NSCustomObject" id="974608694">
+                               <string key="NSClassName">MetadataKeyFormatter</string>
+                       </object>
                </object>
                <object class="IBObjectContainer" key="IBDocument.Objects">
                        <object class="NSMutableArray" key="connectionRecords">
                                                <string key="label">content: arrangedObjects</string>
                                                <reference key="source" ref="334049559"/>
                                                <reference key="destination" ref="1051118663"/>
-                                               <object class="NSNibBindingConnector" key="connector">
+                                               <object class="NSNibBindingConnector" key="connector" id="968192847">
                                                        <reference key="NSSource" ref="334049559"/>
                                                        <reference key="NSDestination" ref="1051118663"/>
                                                        <string key="NSLabel">content: arrangedObjects</string>
                                </object>
                                <object class="IBConnectionRecord">
                                        <object class="IBBindingConnection" key="connection">
-                                               <string key="label">value: arrangedObjects.key</string>
-                                               <reference key="source" ref="252536226"/>
-                                               <reference key="destination" ref="1051118663"/>
-                                               <object class="NSNibBindingConnector" key="connector">
-                                                       <reference key="NSSource" ref="252536226"/>
-                                                       <reference key="NSDestination" ref="1051118663"/>
-                                                       <string key="NSLabel">value: arrangedObjects.key</string>
-                                                       <string key="NSBinding">value</string>
-                                                       <string key="NSKeyPath">arrangedObjects.key</string>
-                                                       <int key="NSNibBindingConnectorVersion">2</int>
-                                               </object>
-                                       </object>
-                                       <int key="connectionID">132</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBBindingConnection" key="connection">
-                                               <string key="label">value: arrangedObjects.value</string>
-                                               <reference key="source" ref="1030856867"/>
-                                               <reference key="destination" ref="1051118663"/>
-                                               <object class="NSNibBindingConnector" key="connector">
-                                                       <reference key="NSSource" ref="1030856867"/>
-                                                       <reference key="NSDestination" ref="1051118663"/>
-                                                       <string key="NSLabel">value: arrangedObjects.value</string>
-                                                       <string key="NSBinding">value</string>
-                                                       <string key="NSKeyPath">arrangedObjects.value</string>
-                                                       <int key="NSNibBindingConnectorVersion">2</int>
-                                               </object>
-                                       </object>
-                                       <int key="connectionID">134</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBBindingConnection" key="connection">
-                                               <string key="label">contentDictionary: self.node.pithosObject.metadata</string>
-                                               <reference key="source" ref="1051118663"/>
-                                               <reference key="destination" ref="1001"/>
-                                               <object class="NSNibBindingConnector" key="connector">
-                                                       <reference key="NSSource" ref="1051118663"/>
-                                                       <reference key="NSDestination" ref="1001"/>
-                                                       <string key="NSLabel">contentDictionary: self.node.pithosObject.metadata</string>
-                                                       <string key="NSBinding">contentDictionary</string>
-                                                       <string key="NSKeyPath">self.node.pithosObject.metadata</string>
-                                                       <int key="NSNibBindingConnectorVersion">2</int>
-                                               </object>
-                                       </object>
-                                       <int key="connectionID">166</int>
-                               </object>
-                               <object class="IBConnectionRecord">
-                                       <object class="IBBindingConnection" key="connection">
                                                <string key="label">value: node.icon</string>
                                                <reference key="source" ref="470064219"/>
                                                <reference key="destination" ref="1001"/>
                                        </object>
                                        <int key="connectionID">184</int>
                                </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">add:</string>
+                                               <reference key="source" ref="1051118663"/>
+                                               <reference key="destination" ref="294638385"/>
+                                       </object>
+                                       <int key="connectionID">187</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: arrangedObjects.value</string>
+                                               <reference key="source" ref="1030856867"/>
+                                               <reference key="destination" ref="1051118663"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="1030856867"/>
+                                                       <reference key="NSDestination" ref="1051118663"/>
+                                                       <string key="NSLabel">value: arrangedObjects.value</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">arrangedObjects.value</string>
+                                                       <object class="NSDictionary" key="NSOptions">
+                                                               <string key="NS.key.0">NSValidatesImmediately</string>
+                                                               <boolean value="YES" key="NS.object.0"/>
+                                                       </object>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">190</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">selectionIndexes: selectionIndexes</string>
+                                               <reference key="source" ref="334049559"/>
+                                               <reference key="destination" ref="1051118663"/>
+                                               <object class="NSNibBindingConnector" key="connector" id="486813519">
+                                                       <reference key="NSSource" ref="334049559"/>
+                                                       <reference key="NSDestination" ref="1051118663"/>
+                                                       <string key="NSLabel">selectionIndexes: selectionIndexes</string>
+                                                       <string key="NSBinding">selectionIndexes</string>
+                                                       <string key="NSKeyPath">selectionIndexes</string>
+                                                       <reference key="NSPreviousConnector" ref="968192847"/>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">249</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">sortDescriptors: sortDescriptors</string>
+                                               <reference key="source" ref="334049559"/>
+                                               <reference key="destination" ref="1051118663"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="334049559"/>
+                                                       <reference key="NSDestination" ref="1051118663"/>
+                                                       <string key="NSLabel">sortDescriptors: sortDescriptors</string>
+                                                       <string key="NSBinding">sortDescriptors</string>
+                                                       <string key="NSKeyPath">sortDescriptors</string>
+                                                       <reference key="NSPreviousConnector" ref="486813519"/>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">251</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBActionConnection" key="connection">
+                                               <string key="label">remove:</string>
+                                               <reference key="source" ref="1051118663"/>
+                                               <reference key="destination" ref="298407635"/>
+                                       </object>
+                                       <int key="connectionID">253</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">contentDictionary: node.pithosObject.metadata</string>
+                                               <reference key="source" ref="1051118663"/>
+                                               <reference key="destination" ref="1001"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="1051118663"/>
+                                                       <reference key="NSDestination" ref="1001"/>
+                                                       <string key="NSLabel">contentDictionary: node.pithosObject.metadata</string>
+                                                       <string key="NSBinding">contentDictionary</string>
+                                                       <string key="NSKeyPath">node.pithosObject.metadata</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">256</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBOutletConnection" key="connection">
+                                               <string key="label">formatter</string>
+                                               <reference key="source" ref="144287600"/>
+                                               <reference key="destination" ref="974608694"/>
+                                       </object>
+                                       <int key="connectionID">258</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">enabled: canRemove</string>
+                                               <reference key="source" ref="298407635"/>
+                                               <reference key="destination" ref="1051118663"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="298407635"/>
+                                                       <reference key="NSDestination" ref="1051118663"/>
+                                                       <string key="NSLabel">enabled: canRemove</string>
+                                                       <string key="NSBinding">enabled</string>
+                                                       <string key="NSKeyPath">canRemove</string>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">262</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">target: node</string>
+                                               <reference key="source" ref="889445631"/>
+                                               <reference key="destination" ref="1001"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="889445631"/>
+                                                       <reference key="NSDestination" ref="1001"/>
+                                                       <string key="NSLabel">target: node</string>
+                                                       <string key="NSBinding">target</string>
+                                                       <string key="NSKeyPath">node</string>
+                                                       <object class="NSDictionary" key="NSOptions">
+                                                               <string key="NS.key.0">NSSelectorName</string>
+                                                               <string key="NS.object.0">applyInfo</string>
+                                                       </object>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">283</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">target: node</string>
+                                               <reference key="source" ref="870983347"/>
+                                               <reference key="destination" ref="1001"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="870983347"/>
+                                                       <reference key="NSDestination" ref="1001"/>
+                                                       <string key="NSLabel">target: node</string>
+                                                       <string key="NSBinding">target</string>
+                                                       <string key="NSKeyPath">node</string>
+                                                       <object class="NSDictionary" key="NSOptions">
+                                                               <string key="NS.key.0">NSSelectorName</string>
+                                                               <string key="NS.object.0">refreshInfo</string>
+                                                       </object>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">285</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: node.pithosObject.publicURI</string>
+                                               <reference key="source" ref="645911602"/>
+                                               <reference key="destination" ref="1001"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="645911602"/>
+                                                       <reference key="NSDestination" ref="1001"/>
+                                                       <string key="NSLabel">value: node.pithosObject.publicURI</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">node.pithosObject.publicURI</string>
+                                                       <object class="NSDictionary" key="NSOptions">
+                                                               <string key="NS.key.0">NSNullPlaceholder</string>
+                                                               <string key="NS.object.0">-</string>
+                                                       </object>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">288</int>
+                               </object>
+                               <object class="IBConnectionRecord">
+                                       <object class="IBBindingConnection" key="connection">
+                                               <string key="label">value: arrangedObjects.key</string>
+                                               <reference key="source" ref="252536226"/>
+                                               <reference key="destination" ref="1051118663"/>
+                                               <object class="NSNibBindingConnector" key="connector">
+                                                       <reference key="NSSource" ref="252536226"/>
+                                                       <reference key="NSDestination" ref="1051118663"/>
+                                                       <string key="NSLabel">value: arrangedObjects.key</string>
+                                                       <string key="NSBinding">value</string>
+                                                       <string key="NSKeyPath">arrangedObjects.key</string>
+                                                       <object class="NSDictionary" key="NSOptions">
+                                                               <bool key="EncodedWithXMLCoder">YES</bool>
+                                                               <object class="NSArray" key="dict.sortedKeys">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <string>NSValidatesImmediately</string>
+                                                                       <string>NSValueTransformerName</string>
+                                                               </object>
+                                                               <object class="NSMutableArray" key="dict.values">
+                                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                                       <boolean value="YES"/>
+                                                                       <string>MetadataKeyTransformer</string>
+                                                               </object>
+                                                       </object>
+                                                       <int key="NSNibBindingConnectorVersion">2</int>
+                                               </object>
+                                       </object>
+                                       <int key="connectionID">289</int>
+                               </object>
                        </object>
                        <object class="IBMutableOrderedSet" key="objectRecords">
                                <object class="NSArray" key="orderedObjects">
                                                        <reference ref="645911602"/>
                                                        <reference ref="304298489"/>
                                                        <reference ref="459717130"/>
+                                                       <reference ref="870983347"/>
+                                                       <reference ref="889445631"/>
                                                </object>
                                                <reference key="parent" ref="1005"/>
                                        </object>
                                                        <reference ref="334049559"/>
                                                </object>
                                                <reference key="parent" ref="1006"/>
+                                               <string key="objectName">Scroll View - Table View - Metadata</string>
                                        </object>
                                        <object class="IBObjectRecord">
                                                <int key="objectID">54</int>
                                                <int key="objectID">60</int>
                                                <reference key="object" ref="922780356"/>
                                                <reference key="parent" ref="1030856867"/>
+                                               <string key="objectName">Text Field Cell - Text Cell</string>
                                        </object>
                                        <object class="IBObjectRecord">
                                                <int key="objectID">61</int>
                                                        <reference ref="436016527"/>
                                                </object>
                                                <reference key="parent" ref="1006"/>
-                                               <string key="objectName">Content Type</string>
+                                               <string key="objectName">Public URL</string>
                                        </object>
                                        <object class="IBObjectRecord">
                                                <int key="objectID">93</int>
                                                <int key="objectID">125</int>
                                                <reference key="object" ref="1051118663"/>
                                                <reference key="parent" ref="0"/>
+                                               <string key="objectName">Dictionary Controller (Metadata)</string>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">257</int>
+                                               <reference key="object" ref="974608694"/>
+                                               <reference key="parent" ref="0"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">263</int>
+                                               <reference key="object" ref="870983347"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="978069596"/>
+                                               </object>
+                                               <reference key="parent" ref="1006"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">264</int>
+                                               <reference key="object" ref="978069596"/>
+                                               <reference key="parent" ref="870983347"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">265</int>
+                                               <reference key="object" ref="889445631"/>
+                                               <object class="NSMutableArray" key="children">
+                                                       <bool key="EncodedWithXMLCoder">YES</bool>
+                                                       <reference ref="631288671"/>
+                                               </object>
+                                               <reference key="parent" ref="1006"/>
+                                       </object>
+                                       <object class="IBObjectRecord">
+                                               <int key="objectID">266</int>
+                                               <reference key="object" ref="631288671"/>
+                                               <reference key="parent" ref="889445631"/>
                                        </object>
                                </object>
                        </object>
                                        <string>23.IBPluginDependency</string>
                                        <string>24.IBPluginDependency</string>
                                        <string>25.IBPluginDependency</string>
+                                       <string>257.IBPluginDependency</string>
                                        <string>26.IBPluginDependency</string>
+                                       <string>263.IBPluginDependency</string>
+                                       <string>264.IBPluginDependency</string>
+                                       <string>265.IBPluginDependency</string>
+                                       <string>266.IBPluginDependency</string>
                                        <string>27.IBPluginDependency</string>
                                        <string>28.IBPluginDependency</string>
                                        <string>29.IBPluginDependency</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                        <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+                                       <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
                                </object>
                        </object>
                        <object class="NSMutableDictionary" key="unlocalizedProperties">
                                <reference key="dict.values" ref="0"/>
                        </object>
                        <nil key="sourceID"/>
-                       <int key="maxID">184</int>
+                       <int key="maxID">289</int>
                </object>
                <object class="IBClassDescriber" key="IBDocument.Classes">
                        <object class="NSMutableArray" key="referencedPartialClassDescriptions">
                                <bool key="EncodedWithXMLCoder">YES</bool>
                                <object class="IBPartialClassDescription">
+                                       <string key="className">MetadataKeyFormatter</string>
+                                       <string key="superclassName">NSFormatter</string>
+                                       <object class="IBClassDescriptionSource" key="sourceIdentifier">
+                                               <string key="majorKey">IBProjectSource</string>
+                                               <string key="minorKey">./Classes/MetadataKeyFormatter.h</string>
+                                       </object>
+                               </object>
+                               <object class="IBPartialClassDescription">
                                        <string key="className">PithosNodeInfoController</string>
                                        <string key="superclassName">NSWindowController</string>
                                        <object class="IBClassDescriptionSource" key="sourceIdentifier">
index 5d13d35..7f51202 100644 (file)
 #import "PithosNode.h"
 @class ASIPithosContainer;
 @class ASIPithosObject;
+@class ASIPithosObjectRequest;
 
 @interface PithosObjectNode : PithosNode {
     ASIPithosContainer *pithosContainer;
     ASIPithosObject *pithosObject;
+    
+    ASIPithosObjectRequest *applyMetadataObjectRequest;
+    ASIPithosObjectRequest *refreshMetadataObjectRequest;
 }
 
 - (id)initWithPithosContainer:(ASIPithosContainer *)aPithosContainer pithosObject:(ASIPithosObject *)aPithosObject;
@@ -49,4 +53,7 @@
 @property (nonatomic, retain) ASIPithosContainer *pithosContainer;
 @property (nonatomic, retain) ASIPithosObject *pithosObject;
 
+- (void)applyInfo;
+- (void)refreshInfo;
+
 @end
\ No newline at end of file
index 42cda66..f0acf27 100644 (file)
 
 #import "PithosObjectNode.h"
 #import "ASIPithosRequest.h"
+#import "ASIPithosObjectRequest.h"
 #import "ASIPithosContainer.h"
 #import "ASIPithosObject.h"
+#import "ASIDownloadCache.h"
 #import "PithosNodeInfoController.h"
 
 @implementation PithosObjectNode
 
 - (id)initWithPithosContainer:(ASIPithosContainer *)aPithosContainer pithosObject:(ASIPithosObject *)aPithosObject {
     if ((self = [super init])) {
-        pithosContainer = [aPithosContainer retain];
-        pithosObject = [aPithosObject retain];
+        self.pithosContainer = aPithosContainer;
+        self.pithosObject = aPithosObject;
         isLeafItem = YES;
     }
     return self;
 }
 
 - (void)dealloc {
+    [refreshMetadataObjectRequest clearDelegatesAndCancel];
+    [refreshMetadataObjectRequest release];
+    [applyMetadataObjectRequest clearDelegatesAndCancel];
+    [applyMetadataObjectRequest release];
     [pithosObject release];
     [pithosContainer release];
     [super dealloc];
     return icon;
 }
 
+#pragma mark -
+#pragma mark Info
+
+- (void)applyInfo {
+    @synchronized(self) {
+        if (applyMetadataObjectRequest == nil) {
+            applyMetadataObjectRequest = [[ASIPithosObjectRequest updateObjectMetadataRequestWithContainerName:pithosContainer.name 
+                                                                                                    objectName:pithosObject.name 
+                                                                                               contentEncoding:nil
+                                                                                            contentDisposition:nil 
+                                                                                                      manifest:nil 
+                                                                                                       sharing:nil 
+                                                                                                      isPublic:ASIPithosObjectRequestPublicIgnore 
+                                                                                                      metadata:pithosObject.metadata
+                                                                                                        update:NO] retain];
+            applyMetadataObjectRequest.delegate = self;
+            [applyMetadataObjectRequest startAsynchronous];
+        }
+    }
+}
+
+- (void)refreshInfo {
+    @synchronized(self) {
+        if (refreshMetadataObjectRequest == nil) {
+            refreshMetadataObjectRequest = [[ASIPithosObjectRequest objectMetadataRequestWithContainerName:pithosContainer.name 
+                                                                                                objectName:pithosObject.name] retain];
+            refreshMetadataObjectRequest.delegate = self;
+            refreshMetadataObjectRequest.downloadCache = [ASIDownloadCache sharedCache];
+            [refreshMetadataObjectRequest startAsynchronous];
+        }
+    }
+}
+
+
+#pragma mark -
+#pragma mark ASIHTTPRequestDelegate
+
+- (void)requestFinished:(ASIHTTPRequest *)request {
+    NSLog(@"URL: %@", [request url]);
+    NSLog(@"cached: %d", [request didUseCachedResponse]);
+    
+    if ([request isEqualTo:applyMetadataObjectRequest]) {
+        @synchronized(self) {
+            [applyMetadataObjectRequest release];
+            applyMetadataObjectRequest = nil;
+        }
+        [self refreshInfo];
+    } else if ([request isEqualTo:refreshMetadataObjectRequest]) {
+        self.pithosObject = [refreshMetadataObjectRequest object];
+        @synchronized(self) {
+            [refreshMetadataObjectRequest release];
+            refreshMetadataObjectRequest = nil;
+        }
+    }
+}
+
+- (void)requestFailed:(ASIHTTPRequest *)request {
+    if ([request isEqualTo:applyMetadataObjectRequest]) {
+        // XXX do something on error, cleanup
+        NSLog(@"error:%@", [applyMetadataObjectRequest error]);
+        @synchronized(self) {
+            [applyMetadataObjectRequest release];
+            applyMetadataObjectRequest = nil;
+        }
+    } else if ([request isEqualTo:refreshMetadataObjectRequest]) {
+        // XXX do something on error, cleanup
+        NSLog(@"error:%@", [refreshMetadataObjectRequest error]);
+        @synchronized(self) {
+            [refreshMetadataObjectRequest release];
+            refreshMetadataObjectRequest = nil;
+        }
+    }
+}
+
 @end