chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1425870 [6/13] - in /chemistry/objectivecmis/trunk: ./ ObjectiveCMIS.xcodeproj/ ObjectiveCMIS.xcodeproj/project.xcworkspace/ ObjectiveCMIS/ ObjectiveCMIS/Bindings/ ObjectiveCMIS/Bindings/AtomPub/ ObjectiveCMIS/Bindings/AtomPub/AtomPubParse...
Date Wed, 26 Dec 2012 10:48:37 GMT
Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/Objects/CMISLinkRelations.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/Objects/CMISLinkRelations.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/Objects/CMISLinkRelations.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/Objects/CMISLinkRelations.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,34 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+#import <Foundation/Foundation.h>
+
+@interface CMISLinkRelations : NSObject
+
+@property (nonatomic, strong, readonly) NSSet *linkRelationSet;
+
+- (id)initWithLinkRelationSet:(NSSet *)linkRelationSet;
+
+/**
+ Returns the link href for the link relation. If more than one object exists for the link relation, 
+ then nil is returned.  If no relation is found, nil is returned.
+ */
+- (NSString *)linkHrefForRel:(NSString *)rel;
+
+/**
+ Returns the link href for the link relation & link type. If more than one object exists for the link relation, 
+ then nil is returned.  If no relation is found, nil is returned.
+ */
+- (NSString *)linkHrefForRel:(NSString *)rel type:(NSString *)type;
+
+@end

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/Objects/CMISLinkRelations.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/Objects/CMISLinkRelations.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/Objects/CMISLinkRelations.m?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/Objects/CMISLinkRelations.m (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/Objects/CMISLinkRelations.m Wed Dec 26 10:48:33 2012
@@ -0,0 +1,67 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import "CMISLinkRelations.h"
+
+@interface CMISLinkRelations ()
+@property (nonatomic, strong, readwrite) NSSet *linkRelationSet;
+@end
+
+@implementation CMISLinkRelations
+
+@synthesize linkRelationSet = _linkRelationSet;
+
+- (id)initWithLinkRelationSet:(NSSet *)linkRelationSet
+{
+    self = [super init];
+    if (self)
+    {
+        self.linkRelationSet = linkRelationSet;
+    }
+    return self;
+}
+
+- (NSString *)linkHrefForRel:(NSString *)rel
+{
+    return [self linkHrefForRel:rel type:nil];
+}
+
+- (NSString *)linkHrefForRel:(NSString *)rel type:(NSString *)type
+{
+    NSArray *predicateArgsArray = nil;
+    
+    NSString *predicateFormat = @"(rel == %@)";
+    if (type != nil && type.length > 0)
+    {
+        predicateFormat = [predicateFormat stringByAppendingString:@"&& (type == %@)"];
+        predicateArgsArray = [NSArray arrayWithObjects:rel, type, nil];
+    }
+    else 
+    {
+        predicateArgsArray = [NSArray arrayWithObject:rel];
+    }
+    
+    NSPredicate *predicate = [NSPredicate predicateWithFormat:predicateFormat argumentArray:predicateArgsArray];
+    NSSet *filteredSet = [self.linkRelationSet filteredSetUsingPredicate:predicate];
+    if ([filteredSet count] == 1)
+    {
+        return [filteredSet.anyObject valueForKey:@"href"];
+    }
+    
+    // We will only get here if the link to return is ambiguous or if no link is found for the rel/type
+    
+    return nil;
+}
+
+@end

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/Objects/CMISLinkRelations.m
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/Objects/CMISWorkspace.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/Objects/CMISWorkspace.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/Objects/CMISWorkspace.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/Objects/CMISWorkspace.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,47 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+
+@class CMISRepositoryInfo;
+@class CMISSessionParameters;
+@class CMISLinkRelations;
+
+@interface CMISWorkspace : NSObject
+
+@property (nonatomic, strong) CMISSessionParameters *sessionParameters;
+@property (nonatomic, strong) CMISRepositoryInfo *repositoryInfo;
+
+/**
+* An array containing the parsed CMISAtomCollections.
+*/
+@property (nonatomic, strong) NSMutableArray *collections;
+
+/**
+ * An array of CMISAtomLink objects for the workspace
+ */
+@property (nonatomic, strong) CMISLinkRelations *linkRelations;
+
+@property (nonatomic, strong) NSString *objectByIdUriTemplate;
+@property (nonatomic, strong) NSString *objectByPathUriTemplate;
+@property (nonatomic, strong) NSString *typeByIdUriTemplate;
+@property (nonatomic, strong) NSString *queryUriTemplate;
+
+/**
+ * Returns the href link for a collection defined with the given type.
+  * Returns nil if none is found.
+ */
+- (NSString *)collectionHrefForCollectionType:(NSString *)collectionType;
+
+@end
\ No newline at end of file

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/Objects/CMISWorkspace.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/Objects/CMISWorkspace.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/Objects/CMISWorkspace.m?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/Objects/CMISWorkspace.m (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/Objects/CMISWorkspace.m Wed Dec 26 10:48:33 2012
@@ -0,0 +1,48 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import "CMISWorkspace.h"
+#import "CMISRepositoryInfo.h"
+#import "CMISSessionParameters.h"
+#import "CMISAtomCollection.h"
+
+@implementation CMISWorkspace
+
+@synthesize sessionParameters = _sessionParameters;
+@synthesize repositoryInfo = _repositoryInfo;
+
+@synthesize collections = _collections;
+@synthesize linkRelations = _linkRelations;
+
+@synthesize objectByIdUriTemplate = _objectByIdUriTemplate;
+@synthesize queryUriTemplate = _queryUriTemplate;
+@synthesize typeByIdUriTemplate = _typeByIdUriTemplate;
+@synthesize objectByPathUriTemplate = _objectByPathUriTemplate;
+
+- (NSString *)collectionHrefForCollectionType:(NSString *)collectionType
+{
+    if (self.collections != nil)
+    {
+        for (CMISAtomCollection *collection in self.collections)
+        {
+            if ([collection.type isEqualToString:collectionType])
+            {
+                return collection.href;
+            }
+        }
+    }
+    return nil;
+}
+
+@end
\ No newline at end of file

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/AtomPub/Objects/CMISWorkspace.m
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISAclService.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISAclService.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISAclService.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISAclService.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,19 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+
+@protocol CMISAclService <NSObject>
+
+@end

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISAclService.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBinding.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBinding.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBinding.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBinding.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,64 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import "CMISAclService.h"
+#import "CMISDiscoveryService.h"
+#import "CMISMultiFilingService.h"
+#import "CMISObjectService.h"
+#import "CMISPolicyService.h"
+#import "CMISRelationshipService.h"
+#import "CMISRepositoryService.h"
+#import "CMISNavigationService.h"
+#import "CMISVersioningService.h"
+
+@protocol CMISBinding <NSObject>
+
+// The ACL service object for the binding
+@property (nonatomic, strong, readonly) id<CMISAclService> aclService;
+
+// The discovery service object for the binding
+@property (nonatomic, strong, readonly) id<CMISDiscoveryService> discoveryService;
+
+// The multi filing service object for the binding
+@property (nonatomic, strong, readonly) id<CMISMultiFilingService> multiFilingService;
+
+// The object service object for the binding
+@property (nonatomic, strong, readonly) id<CMISObjectService> objectService;
+
+// The policy service object for the binding
+@property (nonatomic, strong, readonly) id<CMISPolicyService> policyService;
+
+// The relationship service object for the binding
+@property (nonatomic, strong, readonly) id<CMISRelationshipService> relationshipService;
+
+// The repository service object for the binding
+@property (nonatomic, strong, readonly) id<CMISRepositoryService> repositoryService;
+
+// The navigation service object for the binding
+@property (nonatomic, strong, readonly) id<CMISNavigationService> navigationService;
+
+// The versioning service object for the binding
+@property (nonatomic, strong, readonly) id<CMISVersioningService> versioningService;
+
+
+- (void)close;
+
+@optional
+
+- (void)clearAllCaches;
+
+- (void)clearCacheForRepositoryId:(NSString*)repositoryId;
+
+@end

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBinding.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBindingFactory.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBindingFactory.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBindingFactory.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBindingFactory.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,22 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+#import <Foundation/Foundation.h>
+#import "CMISSessionParameters.h"
+
+@interface CMISBindingFactory : NSObject
+
+// Returns an instance of a CMISBinding using the given session parameters
+- (id<CMISBinding>)bindingWithParameters:(CMISSessionParameters *)sessionParameters;
+
+@end

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBindingFactory.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBindingFactory.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBindingFactory.m?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBindingFactory.m (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBindingFactory.m Wed Dec 26 10:48:33 2012
@@ -0,0 +1,36 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import "CMISBindingFactory.h"
+#import "CMISAtomPubBinding.h"
+
+@implementation CMISBindingFactory
+
+- (id<CMISBinding>)bindingWithParameters:(CMISSessionParameters *)sessionParameters
+{
+    // TODO: Add default parameters to the session, if not already present.
+    
+    // TODO: Allow for the creation of custom binding implementations using NSClassFromString.
+
+    id<CMISBinding> binding = nil;
+    if (sessionParameters.bindingType == CMISBindingTypeAtomPub)
+    {
+        binding = [[CMISAtomPubBinding alloc] initWithSessionParameters:sessionParameters];
+    }
+
+    return binding;
+}
+
+
+@end

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBindingFactory.m
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBindingSession.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBindingSession.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBindingSession.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBindingSession.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,45 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import "CMISSessionParameters.h"
+#import "CMISAuthenticationProvider.h"
+
+extern NSString * const kCMISBindingSessionKeyAtomPubUrl;
+extern NSString * const kCMISBindingSessionKeyObjectByIdUriBuilder;
+extern NSString * const kCMISBindingSessionKeyObjectByPathUriBuilder;
+extern NSString * const kCMISBindingSessionKeyTypeByIdUriBuilder;
+extern NSString * const kCMISBindingSessionKeyQueryUri;
+
+extern NSString * const kCMISBindingSessionKeyQueryCollection;
+
+extern NSString * const kCMISBindingSessionKeyLinkCache;
+
+@interface CMISBindingSession : NSObject
+
+@property (nonatomic, strong, readonly) NSString *username;
+@property (nonatomic, strong, readonly) NSString *repositoryId;
+@property (nonatomic, strong, readonly) id<CMISAuthenticationProvider> authenticationProvider;
+
+- (id)initWithSessionParameters:(CMISSessionParameters *)sessionParameters;
+
+// Object storage methods
+- (NSArray *)allKeys;
+- (id)objectForKey:(id)key;
+- (id)objectForKey:(id)key withDefaultValue:(id)defaultValue;
+- (void)setObject:(id)object forKey:(id)key;
+- (void)addEntriesFromDictionary:(NSDictionary *)dictionary;
+- (void)removeKey:(id)key;
+
+@end

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBindingSession.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBindingSession.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBindingSession.m?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBindingSession.m (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBindingSession.m Wed Dec 26 10:48:33 2012
@@ -0,0 +1,96 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import "CMISBindingSession.h"
+
+NSString * const kCMISBindingSessionKeyAtomPubUrl = @"cmis_session_key_atompub_url";
+NSString * const kCMISBindingSessionKeyObjectByIdUriBuilder = @"cmis_session_key_objectbyid_uri_builder";
+NSString * const kCMISBindingSessionKeyObjectByPathUriBuilder = @"cmis_session_key_objectbypath_uri_builder";
+NSString * const kCMISBindingSessionKeyTypeByIdUriBuilder = @"cmis_session_key_type_by_id_uri_builder";
+NSString * const kCMISBindingSessionKeyQueryUri = @"cmis_session_key_query_uri";
+
+NSString * const kCMISBindingSessionKeyQueryCollection = @"cmis_session_key_query_collection";
+
+NSString * const kCMISBindingSessionKeyLinkCache = @"cmis_session_key_link_cache";
+
+@interface CMISBindingSession ()
+@property (nonatomic, strong, readwrite) NSString *username;
+@property (nonatomic, strong, readwrite) NSString *repositoryId;
+@property (nonatomic, strong, readwrite) id<CMISAuthenticationProvider> authenticationProvider;
+@property (nonatomic, strong, readwrite) NSMutableDictionary *sessionData;
+@end
+
+@implementation CMISBindingSession
+
+@synthesize username = _username;
+@synthesize repositoryId = _repositoryId;
+@synthesize authenticationProvider = _authenticationProvider;
+@synthesize sessionData = _sessionData;
+
+- (id)initWithSessionParameters:(CMISSessionParameters *)sessionParameters
+{
+    self = [super init];
+    if (self)
+    {
+        self.sessionData = [[NSMutableDictionary alloc] init];
+        
+        // grab common data from session parameters
+        self.username = sessionParameters.username;
+        self.repositoryId = sessionParameters.repositoryId;
+        self.authenticationProvider = sessionParameters.authenticationProvider;
+        
+        // store all other data in the dictionary
+        [self.sessionData setObject:sessionParameters.atomPubUrl forKey:kCMISBindingSessionKeyAtomPubUrl];
+        
+        for (id key in sessionParameters.allKeys) 
+        {
+            [self.sessionData setObject:[sessionParameters objectForKey:key] forKey:key];
+        }
+    }
+    
+    return self;
+}
+
+- (NSArray *)allKeys
+{
+    return [self.sessionData allKeys];
+}
+
+- (id)objectForKey:(id)key
+{
+    return [self.sessionData objectForKey:key];
+}
+
+- (id)objectForKey:(id)key withDefaultValue:(id)defaultValue
+{
+    NSObject *value = [self.sessionData objectForKey:key];
+    return value != nil ? value : defaultValue;
+}
+
+- (void)setObject:(id)object forKey:(id)key
+{
+    [self.sessionData setObject:object forKey:key];
+}
+
+- (void)addEntriesFromDictionary:(NSDictionary *)dictionary
+{
+    [self.sessionData addEntriesFromDictionary:dictionary];
+}
+
+- (void)removeKey:(id)key
+{
+    [self.sessionData removeObjectForKey:key];
+}
+
+@end

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISBindingSession.m
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISDiscoveryService.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISDiscoveryService.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISDiscoveryService.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISDiscoveryService.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,37 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import "CMISEnums.h"
+
+@class CMISObjectList;
+
+@protocol CMISDiscoveryService <NSObject>
+
+/**
+* (optional) Integer maxItems: This is the maximum number of items to return in a response.
+*                              The repository MUST NOT exceed this maximum. Default is repository-specific.
+(optional) Integer skipCount: This is the number of potential results that the repository MUST skip/page over
+                              before returning any results. Defaults to 0.
+*/
+// TODO: add all params which are required by spec
+- (void)query:(NSString *)statement searchAllVersions:(BOOL)searchAllVersions
+                                 includeRelationShips:(CMISIncludeRelationship)includeRelationships
+                                      renditionFilter:(NSString *)renditionFilter
+                              includeAllowableActions:(BOOL)includeAllowableActions
+                                             maxItems:(NSNumber *)maxItems
+                                            skipCount:(NSNumber *)skipCount
+                                      completionBlock:(void (^)(CMISObjectList *objectList, NSError *error))completionBlock;
+
+@end

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISDiscoveryService.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISLinkCache.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISLinkCache.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISLinkCache.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISLinkCache.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,35 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+
+@class CMISLinkRelations;
+@class CMISBindingSession;
+
+
+@interface CMISLinkCache : NSObject
+
+- (id)initWithBindingSession:(CMISBindingSession *)bindingSession;
+
+- (NSString *)linkForObjectId:(NSString *)objectId andRelation:(NSString *)rel;
+
+- (NSString *)linkForObjectId:(NSString *)objectId andRelation:(NSString *)rel andType:(NSString *)type;
+
+- (void)addLinks:(CMISLinkRelations *)links forObjectId:(NSString *)objectId;
+
+- (void)removeLinksForObjectId:(NSString *)objectId;
+
+- (void)removeAllLinks;
+
+@end
\ No newline at end of file

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISLinkCache.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISLinkCache.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISLinkCache.m?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISLinkCache.m (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISLinkCache.m Wed Dec 26 10:48:33 2012
@@ -0,0 +1,105 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+#import "CMISLinkCache.h"
+#import "CMISBindingSession.h"
+
+// Default link cache size is 50 entries
+#define DEFAULT_LINK_CACHE_SIZE 50
+
+@interface CMISLinkCache () <NSCacheDelegate>
+
+/**
+ * Using an NSCache, as it gives us automatic cache cleanup and thread-safe operations
+ * https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSCache_Class/Reference/Reference.html
+ */
+@property (nonatomic, strong) NSCache *linkCache;
+
+@end
+
+@implementation CMISLinkCache
+
+@synthesize linkCache = _linkCache;
+
+- (id)initWithBindingSession:(CMISBindingSession *)bindingSession
+{
+    self = [super init];
+    if (self)
+    {
+        [self setupLinkCache:bindingSession];
+
+    }
+    return self;
+}
+
+- (void)setupLinkCache:(CMISBindingSession *)bindingSession
+{
+    self.linkCache = [[NSCache alloc] init];
+
+    id linkCacheSize = [bindingSession objectForKey:kCMISSessionParameterLinkCacheSize];
+    if (linkCacheSize != nil)
+    {
+        if ([[linkCacheSize class] isEqual:[NSNumber class]])
+        {
+            self.linkCache.countLimit = [(NSNumber *) linkCacheSize unsignedIntValue];
+        }
+        else
+        {
+            log(@"Invalid object set for %@ session parameter. Ignoring and using default instead", kCMISSessionParameterLinkCacheSize);
+        }
+    }
+
+    if (self.linkCache.countLimit <= 0)
+    {
+        self.linkCache.countLimit = DEFAULT_LINK_CACHE_SIZE;
+    }
+
+    // Uncomment for debugging
+//    self.linkCache.delegate = self;
+}
+
+- (NSString *)linkForObjectId:(NSString *)objectId andRelation:(NSString *)rel
+{
+    CMISLinkRelations *linkRelations = [self.linkCache objectForKey:objectId];
+    return [linkRelations linkHrefForRel:rel];
+}
+
+- (NSString *)linkForObjectId:(NSString *)objectId andRelation:(NSString *)rel andType:(NSString *)type
+{
+    CMISLinkRelations *linkRelations = [self.linkCache objectForKey:objectId];
+    return [linkRelations linkHrefForRel:rel type:type];
+}
+
+- (void)addLinks:(CMISLinkRelations *)links forObjectId:(NSString *)objectId
+{
+    [self.linkCache setObject:links forKey:objectId];
+}
+
+- (void)removeLinksForObjectId:(NSString *)objectId
+{
+    [self.linkCache removeObjectForKey:objectId];
+}
+
+- (void)removeAllLinks
+{
+    [self.linkCache removeAllObjects];
+}
+
+
+// Debugging
+//- (void)cache:(NSCache *)cache willEvictObject:(id)obj
+//{
+//    log(@"Link cache will evict cached links for object '%@'", obj);
+//}
+
+@end
\ No newline at end of file

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISLinkCache.m
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISMultiFilingService.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISMultiFilingService.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISMultiFilingService.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISMultiFilingService.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,19 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+
+@protocol CMISMultiFilingService <NSObject>
+
+@end

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISMultiFilingService.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISNavigationService.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISNavigationService.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISNavigationService.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISNavigationService.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,48 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import "CMISEnums.h"
+
+@class CMISFolder;
+@class CMISObjectList;
+
+@protocol CMISNavigationService <NSObject>
+
+/*
+ * Retrieves the children for the given object identifier.
+ */
+- (void)retrieveChildren:(NSString *)objectId orderBy:(NSString *)orderBy
+                  filter:(NSString *)filter includeRelationShips:(CMISIncludeRelationship)includeRelationship
+         renditionFilter:(NSString *)renditionFilter includeAllowableActions:(BOOL)includeAllowableActions
+      includePathSegment:(BOOL)includePathSegment skipCount:(NSNumber *)skipCount
+                maxItems:(NSNumber *)maxItems
+         completionBlock:(void (^)(CMISObjectList *objectList, NSError *error))completionBlock;
+
+/**
+* Retrieves the parent of a given object.
+* Returns a list of CMISObjectData objects
+*
+* TODO: OpenCMIS returns an ObjectParentData object .... is this necessary?
+*/
+- (void)retrieveParentsForObject:(NSString *)objectId
+                      withFilter:(NSString *)filter
+        withIncludeRelationships:(CMISIncludeRelationship)includeRelationship
+             withRenditionFilter:(NSString *)renditionFilter
+     withIncludeAllowableActions:(BOOL)includeAllowableActions
+  withIncludeRelativePathSegment:(BOOL)includeRelativePathSegment
+                 completionBlock:(void (^)(NSArray *parents, NSError *error))completionBlock;
+
+
+@end

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISNavigationService.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISObjectList.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISObjectList.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISObjectList.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISObjectList.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,45 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+#import <Foundation/Foundation.h>
+#import "CMISEnums.h"
+
+@protocol CMISBinding;
+
+
+/**
+  * Class to hold the result of executing a query
+  */
+@interface CMISObjectList : NSObject
+
+/**
+ * Array of CMISObjectData, representing a result of some query
+ */
+@property (nonatomic, strong) NSArray *objects;
+
+/**
+* TRUE if the Repository contains additional items after those contained in the response.
+* FALSE otherwise. If TRUE, a request with a larger skipCount or larger maxItems is expected
+* to return additional results (unless the contents of the repository has changed).
+*/
+@property BOOL hasMoreItems;
+
+/**
+ * If the repository knows the total number of items in a result set, the repository SHOULD include the number here.
+ * If the repository does not know the number of items in a result set, this parameter SHOULD not be set.
+ * The value in the parameter MAY NOT be accurate the next time the client retrieves the result set
+ * or the next page in the result set.
+*/
+@property NSInteger numItems;
+
+@end
\ No newline at end of file

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISObjectList.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISObjectList.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISObjectList.m?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISObjectList.m (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISObjectList.m Wed Dec 26 10:48:33 2012
@@ -0,0 +1,36 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import "CMISObjectList.h"
+
+
+@implementation CMISObjectList
+
+@synthesize objects = _objects;
+@synthesize hasMoreItems = _hasMoreItems;
+@synthesize numItems = _numItems;
+
+- (id)init
+{
+    self = [super init];
+    if (self)
+    {
+        self.objects = [NSArray array];
+        self.numItems = 0;
+        self.hasMoreItems = NO;
+    }
+    return self;
+}
+
+@end
\ No newline at end of file

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISObjectList.m
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISObjectService.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISObjectService.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISObjectService.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISObjectService.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,191 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import "CMISObjectData.h"
+
+@class CMISDocument;
+@class CMISStringInOutParameter;
+@class CMISRequest;
+
+@protocol CMISObjectService <NSObject>
+
+/**
+ *Retrieves the object with the given object identifier.
+ *
+ */
+- (void)retrieveObject:(NSString *)objectId
+            withFilter:(NSString *)filter
+andIncludeRelationShips:(CMISIncludeRelationship)includeRelationship
+   andIncludePolicyIds:(BOOL)includePolicyIds
+    andRenditionFilder:(NSString *)renditionFilter
+         andIncludeACL:(BOOL)includeACL
+andIncludeAllowableActions:(BOOL)includeAllowableActions
+       completionBlock:(void (^)(CMISObjectData *objectData, NSError *error))completionBlock;
+
+/**
+ *Retrieves an object using its path.
+ *
+ */
+- (void)retrieveObjectByPath:(NSString *)path
+                  withFilter:(NSString *)filter
+     andIncludeRelationShips:(CMISIncludeRelationship)includeRelationship
+         andIncludePolicyIds:(BOOL)includePolicyIds
+          andRenditionFilder:(NSString *)renditionFilter
+               andIncludeACL:(BOOL)includeACL
+  andIncludeAllowableActions:(BOOL)includeAllowableActions
+             completionBlock:(void (^)(CMISObjectData *objectData, NSError *error))completionBlock;
+
+/**
+* Gets the content stream for the specified Document object, or gets a rendition stream for a specified
+* rendition of a document or folder object. Downloads the content to a local file.
+*
+*/
+- (CMISRequest*)downloadContentOfObject:(NSString *)objectId
+                           withStreamId:(NSString *)streamId
+                                 toFile:(NSString *)filePath
+                        completionBlock:(void (^)(NSError *error))completionBlock
+                          progressBlock:(void (^)(unsigned long long bytesDownloaded, unsigned long long bytesTotal))progressBlock;
+
+/**
+ * Gets the content stream for the specified Document object, or gets a rendition stream for a specified
+ * rendition of a document or folder object. Downloads the content to an output stream.
+ *
+ */
+- (CMISRequest*)downloadContentOfObject:(NSString *)objectId
+                           withStreamId:(NSString *)streamId
+                         toOutputStream:(NSOutputStream *)outputStream
+                        completionBlock:(void (^)(NSError *error))completionBlock
+                          progressBlock:(void (^)(unsigned long long bytesDownloaded, unsigned long long bytesTotal))progressBlock;
+
+/**
+ * Deletes the content stream for the specified document object.
+  *
+  * A Repository MAY automatically create new Document versions as part of this service method.
+  * Therefore, the objectId output NEED NOT be identical to the objectId input
+  *
+  * NOTE for atom pub binding: deleteContentStream: This does not return the new object id and change token as specified by the domain model.
+  * This is not possible without introducing a new HTTP header.
+ */
+- (void)deleteContentOfObject:(CMISStringInOutParameter *)objectIdParam
+              withChangeToken:(CMISStringInOutParameter *)changeTokenParam
+              completionBlock:(void (^)(NSError *error))completionBlock;
+
+/**
+ * Changes the content of the given document to the content of a given file.
+ *
+ * Optional overwrite flag: If TRUE (default), then the Repository MUST replace the existing content stream for the
+ * object (if any) with the input contentStream. If FALSE, then the Repository MUST only set the input
+ * contentStream for the object if the object currently does not have a content-stream.
+ *
+ * NOTE for atom pub binding: This does not return the new object id and change token as specified by the domain model.
+ * (This is not possible without introducing a new HTTP header).
+ */
+- (CMISRequest*)changeContentOfObject:(CMISStringInOutParameter *)objectIdParam
+                      toContentOfFile:(NSString *)filePath
+                withOverwriteExisting:(BOOL)overwrite
+                      withChangeToken:(CMISStringInOutParameter *)changeTokenParam
+                      completionBlock:(void (^)(NSError *error))completionBlock
+                        progressBlock:(void (^)(unsigned long long bytesUploaded, unsigned long long bytesTotal))progressBlock;
+
+/**
+ * Changes the content of the given document to the content from a give input stream.
+ *
+ * Optional overwrite flag: If TRUE (default), then the Repository MUST replace the existing content stream for the
+ * object (if any) with the input contentStream. If FALSE, then the Repository MUST only set the input
+ * contentStream for the object if the object currently does not have a content-stream.
+ *
+ * NOTE for atom pub binding: This does not return the new object id and change token as specified by the domain model.
+ * (This is not possible without introducing a new HTTP header).
+ */
+- (CMISRequest*)changeContentOfObject:(CMISStringInOutParameter *)objectId
+               toContentOfInputStream:(NSInputStream *)inputStream
+                        bytesExpected:(unsigned long long)bytesExpected
+                         withFilename:(NSString *)filename
+                withOverwriteExisting:(BOOL)overwrite
+                      withChangeToken:(CMISStringInOutParameter *)changeToken
+                      completionBlock:(void (^)(NSError *error))completionBlock
+                        progressBlock:(void (^)(unsigned long long bytesUploaded, unsigned long long bytesTotal))progressBlock;
+
+/**
+* uploads the file from the given path to the given folder.
+*
+*/
+- (CMISRequest*)createDocumentFromFilePath:(NSString *)filePath
+                              withMimeType:(NSString *)mimeType
+                            withProperties:(CMISProperties *)properties
+                                  inFolder:(NSString *)folderObjectId
+                           completionBlock:(void (^)(NSString *objectId, NSError *error))completionBlock
+                             progressBlock:(void (^)(unsigned long long bytesUploaded, unsigned long long bytesTotal))progressBlock;
+
+/**
+ * uploads the file from the given input stream to the given folder.
+ *
+ */
+- (CMISRequest*)createDocumentFromInputStream:(NSInputStream *)inputStream
+                                 withMimeType:(NSString *)mimeType
+                               withProperties:(CMISProperties *)properties
+                                     inFolder:(NSString *)folderObjectId
+                                bytesExpected:(unsigned long long)bytesExpected // optional
+                              completionBlock:(void (^)(NSString *objectId, NSError *error))completionBlock
+                                progressBlock:(void (^)(unsigned long long bytesUploaded, unsigned long long bytesTotal))progressBlock;
+
+/**
+* Deletes the given object.
+*
+* The allVersions parameter is currently ignored.
+*/
+- (void)deleteObject:(NSString *)objectId allVersions:(BOOL)allVersions completionBlock:(void (^)(BOOL objectDeleted, NSError *error))completionBlock;
+
+/**
+* Creates a new folder with given properties under the provided parent folder.
+*/
+- (void)createFolderInParentFolder:(NSString *)folderObjectId
+                    withProperties:(CMISProperties *)properties
+                   completionBlock:(void (^)(NSString *objectId, NSError *error))completionBlock;
+
+/**
+ * Deletes the given folder and all of its subfolder and files
+ *
+ * Returns a list of objects which failed to be deleted.
+ *
+ */
+- (void)deleteTree:(NSString *)folderObjectId
+        allVersion:(BOOL)allVersions
+     unfileObjects:(CMISUnfileObject)unfileObjects
+ continueOnFailure:(BOOL)continueOnFailure
+   completionBlock:(void (^)(NSArray *failedObjects, NSError *error))completionBlock;
+
+/**
+ * Updates the properties of the given object.
+ */
+- (void)updatePropertiesForObject:(CMISStringInOutParameter *)objectIdParam
+                   withProperties:(CMISProperties *)properties
+                  withChangeToken:(CMISStringInOutParameter *)changeTokenParam
+                  completionBlock:(void (^)(NSError *error))completionBlock;
+
+/**
+ * Gets the list of associated Renditions for the specified object.
+ * Only rendition attributes are returned, not rendition stream
+ *
+ * Note: the paging parameters (maxItems and skipCount) are not used in the atom pub binding.
+ *       Ie. the whole set is <b>always</b> returned.
+ */
+- (void)retrieveRenditions:(NSString *)objectId
+            withRenditionFilter:(NSString *)renditionFilter
+                   withMaxItems:(NSNumber *)maxItems
+                  withSkipCount:(NSNumber *)skipCount
+           completionBlock:(void (^)(NSArray *renditions, NSError *error))completionBlock;
+
+@end

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISObjectService.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISPolicyService.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISPolicyService.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISPolicyService.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISPolicyService.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,19 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+
+@protocol CMISPolicyService <NSObject>
+
+@end

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISPolicyService.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISPropertyDefinition.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISPropertyDefinition.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISPropertyDefinition.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISPropertyDefinition.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,42 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import "CMISEnums.h"
+
+
+// TODO: type specific properties, see cmis spec line 527
+@interface CMISPropertyDefinition : NSObject
+
+
+@property (nonatomic, strong) NSString *id;
+@property (nonatomic, strong) NSString *localName;
+@property (nonatomic, strong) NSString *localNamespace;
+@property (nonatomic, strong) NSString *displayName;
+@property (nonatomic, strong) NSString *queryName;
+@property (nonatomic, strong) NSString *description;
+@property CMISPropertyType propertyType;
+@property CMISCardinality cardinality;
+@property CMISUpdatability updatability;
+
+@property BOOL isInherited;
+@property BOOL isRequired;
+@property BOOL isQueryable;
+@property BOOL isOrderable;
+@property BOOL isOpenChoice;
+
+@property (nonatomic, strong) NSArray *defaultValues;
+@property (nonatomic, strong) NSArray *choices;
+
+@end
\ No newline at end of file

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISPropertyDefinition.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISPropertyDefinition.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISPropertyDefinition.m?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISPropertyDefinition.m (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISPropertyDefinition.m Wed Dec 26 10:48:33 2012
@@ -0,0 +1,37 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import "CMISPropertyDefinition.h"
+
+
+@implementation CMISPropertyDefinition
+
+@synthesize id = _id;
+@synthesize localName = _localName;
+@synthesize localNamespace = _localNamespace;
+@synthesize displayName = _displayName;
+@synthesize queryName = _queryName;
+@synthesize description = _description;
+@synthesize propertyType = _propertyType;
+@synthesize cardinality = _cardinality;
+@synthesize updatability = _updatability;
+@synthesize isInherited = _isInherited;
+@synthesize isRequired = _isRequired;
+@synthesize isQueryable = _isQueryable;
+@synthesize isOrderable = _isOrderable;
+@synthesize isOpenChoice = _isOpenChoice;
+@synthesize defaultValues = _defaultValues;
+@synthesize choices = _choices;
+
+@end
\ No newline at end of file

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISPropertyDefinition.m
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISQueryResult.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISQueryResult.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISQueryResult.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISQueryResult.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,87 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+
+@class CMISPropertyData;
+@class CMISAllowableActions;
+@class CMISObjectData;
+@class CMISProperties;
+@class CMISSession;
+
+
+@interface CMISQueryResult : NSObject
+
+/**
+* Returns a list of all properties (objects of type CMISPropertyData) in this query result.
+*/
+@property(nonatomic, strong, readonly) CMISProperties *properties;
+@property(nonatomic, strong, readonly) CMISAllowableActions *allowableActions;
+@property(nonatomic, strong, readonly) NSArray *renditions; // Array of CMISRenditions
+
+/**
+* Initializes this query result.
+*/
+- (id)initWithCmisObjectData:(CMISObjectData *)cmisObjectData andWithSession:(CMISSession *)session;
+
+/**
+* Convience method for the initializer.
+*/
++ (CMISQueryResult *)queryResultUsingCmisObjectData:(CMISObjectData *)cmisObjectData andWithSession:(CMISSession *)session;
+
+/**
+* Returns a property by id.
+* <p>
+* Since repositories are not obligated to add property ids to their query
+* result properties, this method might not always work as expected with
+* some repositories. Use {@link #getPropertyByQueryName(String)} instead.
+*/
+- (CMISPropertyData *)propertyForId:(NSString *)id;
+
+/**
+* Returns a property by query name or alias.
+*/
+- (CMISPropertyData *)properyForQueryName:(NSString *)queryName;
+
+/**
+* Returns a property (single) value by id.
+*/
+- (id)properyValueForId:(NSString *)propertyId;
+
+/**
+* Returns a property (single) value by query name or alias.
+*
+* @see #getPropertyByQueryName(String)
+*/
+- (id)propertyValueForQueryName:(NSString *)queryName;
+
+/**
+* Returns a property multi-value by id.
+*/
+- (NSArray *)propertyMultiValueById:(NSString *)id;
+
+/**
+* Returns a property multi-value by query name or alias.
+*/
+- (NSArray *)propertyMultiValueByQueryName:(NSString *)queryName;
+
+// TODO: implement following methods found in openCMIS
+//    /**
+//     * Returns the relationships if they were requested.
+//     */
+//    List<Relationship> getRelationships();
+//
+
+
+@end
\ No newline at end of file

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISQueryResult.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISQueryResult.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISQueryResult.m?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISQueryResult.m (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISQueryResult.m Wed Dec 26 10:48:33 2012
@@ -0,0 +1,96 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import "CMISQueryResult.h"
+#import "CMISPropertyData.h"
+#import "CMISAllowableActions.h"
+#import "CMISObjectData.h"
+#import "CMISRendition.h"
+#import "CMISSession.h"
+
+@interface CMISQueryResult()
+
+@property(nonatomic, strong, readwrite) CMISProperties *properties;
+@property(nonatomic, strong, readwrite) CMISAllowableActions *allowableActions;
+@property(nonatomic, strong, readwrite) NSArray *renditions;
+
+@end
+
+
+@implementation CMISQueryResult
+
+@synthesize properties = _properties;
+@synthesize allowableActions = _allowableActions;
+@synthesize renditions = _renditions;
+
+
+- (id)initWithCmisObjectData:(CMISObjectData *)cmisObjectData andWithSession:(CMISSession *)session
+{
+    self = [super init];
+    if (self)
+    {
+        self.properties = cmisObjectData.properties;
+        self.allowableActions = cmisObjectData.allowableActions;
+
+        if (cmisObjectData.renditions != nil)
+        {
+            NSMutableArray *renditions = [NSMutableArray array];
+            for (CMISRenditionData *renditionData in cmisObjectData.renditions)
+            {
+                [renditions addObject:[[CMISRendition alloc] initWithRenditionData:renditionData andObjectId:cmisObjectData.identifier andSession:session]];
+            }
+            self.renditions = renditions;
+        }
+    }
+    return self;
+}
+
++ (CMISQueryResult *)queryResultUsingCmisObjectData:(CMISObjectData *)cmisObjectData andWithSession:(CMISSession *)session
+{
+    CMISQueryResult *queryResult = [[CMISQueryResult alloc] initWithCmisObjectData:cmisObjectData andWithSession:session];
+    return queryResult;
+}
+
+- (CMISPropertyData *)propertyForId:(NSString *)id
+{
+    return [self.properties propertyForId:id];
+}
+
+- (CMISPropertyData *)properyForQueryName:(NSString *)queryName
+{
+    return [self.properties propertyForQueryName:queryName];
+}
+
+- (id)properyValueForId:(NSString *)propertyId
+{
+    return [self.properties propertyValueForId:propertyId];
+}
+
+- (id)propertyValueForQueryName:(NSString *)queryName
+{
+    return [self.properties propertyValueForQueryName:queryName];
+}
+
+- (NSArray *)propertyMultiValueById:(NSString *)id
+{
+    return [self.properties propertyMultiValueById:id];
+}
+
+- (NSArray *)propertyMultiValueByQueryName:(NSString *)queryName
+{
+    return [self.properties propertyMultiValueByQueryName:queryName];
+}
+
+
+@end
\ No newline at end of file

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISQueryResult.m
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISRelationshipService.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISRelationshipService.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISRelationshipService.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISRelationshipService.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,19 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+
+@protocol CMISRelationshipService <NSObject>
+
+@end

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISRelationshipService.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISRenditionData.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISRenditionData.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISRenditionData.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISRenditionData.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,50 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+#import <Foundation/Foundation.h>
+
+
+@interface CMISRenditionData : NSObject
+
+/**  Identifies the rendition stream. */
+@property (nonatomic, strong) NSString *streamId;
+
+/** The MIME type of the rendition stream. */
+@property (nonatomic, strong) NSString *mimeType;
+
+/** Human readable information about the rendition (optional). */
+@property (nonatomic, strong) NSString *title;
+
+/** A categorization String associated with the rendition (optional). */
+@property (nonatomic, strong) NSString *kind;
+
+/** The length of the rendition stream in bytes (optional). */
+@property (nonatomic, strong) NSNumber *length;
+
+/** Typically used for 'image' renditions (expressed as pixels). SHOULD be present if kind = cmis:thumbnail (optional). */
+@property (nonatomic, strong) NSNumber *height;
+
+/** Typically used for 'image' renditions (expressed as pixels). SHOULD be present if kind = cmis:thumbnail. */
+@property (nonatomic, strong) NSNumber *width;
+
+/**
+*  If specified, then the rendition can also be accessed as a document object in the CMIS services.
+*  If not set, then the rendition can only be accessed via the rendition services. Referential integrity of this ID is repository-specific.
+*
+* TODO: needs to be changed to more generic 'ObjectId'
+*/
+@property (nonatomic, strong) NSString *renditionDocumentId;
+
+- (id)initWithRenditionData:(CMISRenditionData *)renditionData;
+
+@end
\ No newline at end of file

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISRenditionData.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISRenditionData.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISRenditionData.m?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISRenditionData.m (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISRenditionData.m Wed Dec 26 10:48:33 2012
@@ -0,0 +1,46 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+#import "CMISRenditionData.h"
+
+
+@implementation CMISRenditionData
+
+@synthesize streamId = _streamId;
+@synthesize mimeType = _mimeType;
+@synthesize title = _title;
+@synthesize kind = _kind;
+@synthesize length = _length;
+@synthesize height = _height;
+@synthesize width = _width;
+@synthesize renditionDocumentId = _renditionDocumentId;
+
+- (id)initWithRenditionData:(CMISRenditionData *)renditionData
+{
+    self = [super init];
+    if (self)
+    {
+        self.streamId = renditionData.streamId;
+        self.mimeType = renditionData.mimeType;
+        self.title = renditionData.title;
+        self.kind = renditionData.kind;
+        self.length = renditionData.length;
+        self.height = renditionData.height;
+        self.width = renditionData.width;
+        self.renditionDocumentId = renditionData.renditionDocumentId;
+    }
+    return self;
+}
+
+
+@end
\ No newline at end of file

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISRenditionData.m
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISRepositoryService.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISRepositoryService.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISRepositoryService.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISRepositoryService.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,34 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import "CMISRepositoryInfo.h"
+
+@class CMISTypeDefinition;
+
+@protocol CMISRepositoryService <NSObject>
+
+/**
+* Returns an array of CMISRepositoryInfo objects representing the repositories available at the endpoint.
+*/
+- (void)retrieveRepositoriesWithCompletionBlock:(void (^)(NSArray *repositories, NSError *error))completionBlock;
+
+/**
+* Returns the repository info for the repository with the given id
+*/
+- (void)retrieveRepositoryInfoForId:(NSString *)repositoryId completionBlock:(void (^)(CMISRepositoryInfo *repositoryInfo, NSError *error))completionBlock;
+
+- (void)retrieveTypeDefinition:(NSString *)typeId completionBlock:(void (^)(CMISTypeDefinition *typeDefinition, NSError *error))completionBlock;
+
+@end

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISRepositoryService.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISTypeDefinition.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISTypeDefinition.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISTypeDefinition.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISTypeDefinition.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,45 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import "CMISEnums.h"
+
+@class CMISPropertyDefinition;
+
+
+@interface CMISTypeDefinition : NSObject
+
+@property (nonatomic, strong) NSString *id;
+@property (nonatomic, strong) NSString *localName;
+@property (nonatomic, strong) NSString *localNameSpace;
+@property (nonatomic, strong) NSString *displayName;
+@property (nonatomic, strong) NSString *queryName;
+@property (nonatomic, strong) NSString *description;
+@property CMISBaseType baseTypeId;
+
+@property BOOL isCreatable;
+@property BOOL isFileable;
+@property BOOL isQueryable;
+@property BOOL isFullTextIndexed;
+@property BOOL isIncludedInSupertypeQuery;
+@property BOOL isControllablePolicy;
+@property BOOL isControllableAcl;
+
+// Mapping of property id <-> CMISPropertyDefinition
+@property (nonatomic, strong, readonly) NSDictionary *propertyDefinitions;
+
+- (void)addPropertyDefinition:(CMISPropertyDefinition *)propertyDefinition;
+- (CMISPropertyDefinition *)propertyDefinitionForId:(NSString *)propertyId;
+
+@end
\ No newline at end of file

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISTypeDefinition.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISTypeDefinition.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISTypeDefinition.m?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISTypeDefinition.m (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISTypeDefinition.m Wed Dec 26 10:48:33 2012
@@ -0,0 +1,63 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import "CMISTypeDefinition.h"
+#import "CMISPropertyDefinition.h"
+
+@interface CMISTypeDefinition ()
+
+@property (nonatomic, strong) NSMutableDictionary *internalPropertyDefinitions;
+
+@end
+
+
+@implementation CMISTypeDefinition
+
+@synthesize id = _id;
+@synthesize localName = _localName;
+@synthesize localNameSpace = _localNameSpace;
+@synthesize displayName = _displayName;
+@synthesize queryName = _queryName;
+@synthesize description = _description;
+@synthesize baseTypeId = _baseTypeId;
+@synthesize isCreatable = _isCreatable;
+@synthesize isFileable = _isFileable;
+@synthesize isQueryable = _isQueryable;
+@synthesize isFullTextIndexed = _isFullTextIndexed;
+@synthesize isIncludedInSupertypeQuery = _isIncludedInSupertypeQuery;
+@synthesize isControllablePolicy = _isControllablePolicy;
+@synthesize isControllableAcl = _isControllableAcl;
+@synthesize propertyDefinitions = _propertyDefinitions;
+@synthesize internalPropertyDefinitions = _internalPropertyDefinitions;
+
+- (NSDictionary *)propertyDefinitions
+{
+    return self.internalPropertyDefinitions;
+}
+
+- (void)addPropertyDefinition:(CMISPropertyDefinition *)propertyDefinition
+{
+    if (self.internalPropertyDefinitions == nil)
+    {
+        self.internalPropertyDefinitions = [[NSMutableDictionary alloc] init];
+    }
+    [self.internalPropertyDefinitions setObject:propertyDefinition forKey:propertyDefinition.id];
+}
+
+- (CMISPropertyDefinition *)propertyDefinitionForId:(NSString *)propertyId
+{
+    return [self.internalPropertyDefinitions objectForKey:propertyId];
+}
+
+@end
\ No newline at end of file

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISTypeDefinition.m
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISVersioningService.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISVersioningService.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISVersioningService.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISVersioningService.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,62 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+#import "CMISEnums.h"
+
+@class CMISCollection;
+@class CMISObject;
+@class CMISObjectData;
+
+@protocol CMISVersioningService <NSObject>
+
+/**
+ * Get a the latest Document object in the Version Series.
+ */
+- (void)retrieveObjectOfLatestVersion:(NSString *)objectId
+                                major:(BOOL)major
+                               filter:(NSString *)filter
+                 includeRelationShips:(CMISIncludeRelationship)includeRelationships
+                     includePolicyIds:(BOOL)includePolicyIds
+                      renditionFilter:(NSString *)renditionFilter
+                           includeACL:(BOOL)includeACL
+              includeAllowableActions:(BOOL)includeAllowableActions
+                      completionBlock:(void (^)(CMISObjectData *objectData, NSError *error))completionBlock;
+
+/*
+ * Returns the list of all Document Object in the given version series, sorted by creationDate descending (ie youngest first)
+ */
+- (void)retrieveAllVersions:(NSString *)objectId
+                     filter:(NSString *)filter
+    includeAllowableActions:(BOOL)includeAllowableActions
+            completionBlock:(void (^)(NSArray *objects, NSError *error))completionBlock;
+
+/* deprecated
+- (CMISObjectData *)retrieveObjectOfLatestVersion:(NSString *)objectId
+                                            major:(BOOL)major
+                                           filter:(NSString *)filter
+                             includeRelationShips:(CMISIncludeRelationship)includeRelationships
+                                 includePolicyIds:(BOOL)includePolicyIds
+                                  renditionFilter:(NSString *)renditionFilter
+                                       includeACL:(BOOL)includeACL
+                          includeAllowableActions:(BOOL)includeAllowableActions
+                                            error:(NSError **)error;
+
+- (NSArray *)retrieveAllVersions:(NSString *)objectId
+                          filter:(NSString *)filter
+         includeAllowableActions:(BOOL)includeAllowableActions
+                           error:(NSError * *)error;
+ */
+
+@end

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Bindings/CMISVersioningService.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISCollection.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISCollection.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISCollection.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISCollection.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,23 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import <Foundation/Foundation.h>
+
+@interface CMISCollection : NSObject
+
+@property (nonatomic, strong, readonly)NSArray *items;
+
+- (id)initWithItems:(NSArray *)items;
+
+@end

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISCollection.h
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISCollection.m
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISCollection.m?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISCollection.m (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISCollection.m Wed Dec 26 10:48:33 2012
@@ -0,0 +1,35 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import "CMISCollection.h"
+
+@interface CMISCollection ()
+@property (nonatomic, strong, readwrite) NSArray *items;
+@end
+
+@implementation CMISCollection
+
+@synthesize items = _items;
+
+- (id)initWithItems:(NSArray *)items
+{
+    if (self = [super init])
+    {
+        self.items = items;
+    }
+    
+    return self;
+}
+
+@end

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISCollection.m
------------------------------------------------------------------------------
    svn:eol-style = native

Added: chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISDocument.h
URL: http://svn.apache.org/viewvc/chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISDocument.h?rev=1425870&view=auto
==============================================================================
--- chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISDocument.h (added)
+++ chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISDocument.h Wed Dec 26 10:48:33 2012
@@ -0,0 +1,99 @@
+/*
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+ */
+
+#import "CMISFileableObject.h"
+
+@class CMISOperationContext;
+@class CMISRequest;
+
+@interface CMISDocument : CMISFileableObject <NSURLConnectionDataDelegate>
+
+@property (nonatomic, strong, readonly) NSString *contentStreamId;
+@property (nonatomic, strong, readonly) NSString *contentStreamFileName;
+@property (nonatomic, strong, readonly) NSString *contentStreamMediaType;
+@property (readonly) unsigned long long contentStreamLength;
+
+@property (nonatomic, strong, readonly) NSString *versionLabel;
+@property (readonly) BOOL isLatestVersion;
+@property (readonly) BOOL isMajorVersion;
+@property (readonly) BOOL isLatestMajorVersion;
+@property (nonatomic, strong, readonly) NSString *versionSeriesId;
+
+/**
+* Retrieves a collection of all versions of this document.
+*/
+- (void)retrieveAllVersionsWithCompletionBlock:(void (^)(CMISCollection *allVersionsOfDocument, NSError *error))completionBlock;
+
+/**
+* Retrieves a collection of all versions of this document.
+*/
+- (void)retrieveAllVersionsWithOperationContext:(CMISOperationContext *)operationContext completionBlock:(void (^)(CMISCollection *collection, NSError *error))completionBlock;
+
+/**
+* Retrieves the lastest version of this document.
+*/
+- (void)retrieveObjectOfLatestVersionWithMajorVersion:(BOOL)major completionBlock:(void (^)(CMISDocument *document, NSError *error))completionBlock;
+
+/**
+* Retrieves the lastest version of this document.
+*/
+- (void)retrieveObjectOfLatestVersionWithMajorVersion:(BOOL)major
+                                 withOperationContext:(CMISOperationContext *)operationContext
+                                      completionBlock:(void (^)(CMISDocument *document, NSError *error))completionBlock;
+
+/**
+* Downloads the content to a local file and returns the filepath.
+* This is a synchronous call and will not return until the file is written to the given path.
+*/
+- (CMISRequest*)downloadContentToFile:(NSString *)filePath
+                      completionBlock:(void (^)(NSError *error))completionBlock
+                        progressBlock:(void (^)(unsigned long long bytesDownloaded, unsigned long long bytesTotal))progressBlock;
+
+/**
+ * Changes the content of this document to the content of the given file.
+ *
+ * Optional overwrite flag: If TRUE (default), then the Repository MUST replace the existing content stream for the
+ * object (if any) with the input contentStream. If FALSE, then the Repository MUST only set the input
+ * contentStream for the object if the object currently does not have a content-stream.
+ */
+- (CMISRequest*)changeContentToContentOfFile:(NSString *)filePath
+                       withOverwriteExisting:(BOOL)overwrite
+                             completionBlock:(void (^)(NSError *error))completionBlock
+                               progressBlock:(void (^)(unsigned long long bytesUploaded, unsigned long long bytesTotal))progressBlock;
+
+/**
+ * Changes the content of this document to the content of the given input stream.
+ *
+ * Optional overwrite flag: If TRUE (default), then the Repository MUST replace the existing content stream for the
+ * object (if any) with the input contentStream. If FALSE, then the Repository MUST only set the input
+ * contentStream for the object if the object currently does not have a content-stream.
+ */
+- (CMISRequest*)changeContentToContentOfInputStream:(NSInputStream *)inputStream
+                                      bytesExpected:(unsigned long long)bytesExpected
+                                       withFileName:(NSString *)filename
+                              withOverwriteExisting:(BOOL)overwrite
+                                    completionBlock:(void (^)(NSError *error))completionBlock
+                                      progressBlock:(void (^)(unsigned long long bytesUploaded, unsigned long long bytesTotal))progressBlock;
+
+/**
+ * Deletes the content of this document.
+ */
+- (void)deleteContentWithCompletionBlock:(void (^)(NSError *error))completionBlock;
+
+/**
+* Deletes the document from the document store.
+*/
+- (void)deleteAllVersionsWithCompletionBlock:(void (^)(BOOL documentDeleted, NSError *error))completionBlock;
+
+@end

Propchange: chemistry/objectivecmis/trunk/ObjectiveCMIS/Client/CMISDocument.h
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message