Changed "id" and "desc/description" properties to "identifier" and "summary", respectively, as the previous names having other meanings in Objective-C.
Also fixed XCode project warnings.
git-svn-id: https://svn.apache.org/repos/asf/chemistry/objectivecmis/branches/browser-binding@1591478 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ObjectiveCMIS.xcodeproj/project.pbxproj b/ObjectiveCMIS.xcodeproj/project.pbxproj
index f0e7994..0c666f9 100644
--- a/ObjectiveCMIS.xcodeproj/project.pbxproj
+++ b/ObjectiveCMIS.xcodeproj/project.pbxproj
@@ -1057,7 +1057,7 @@
8280729A15153DE800EF635C /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0500;
+ LastUpgradeCheck = 0510;
ORGANIZATIONNAME = "Apache Software Foundation";
};
buildConfigurationList = 8280729D15153DE800EF635C /* Build configuration list for PBXProject "ObjectiveCMIS" */;
@@ -1359,7 +1359,6 @@
828072C815153DE900EF635C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
DSTROOT = /tmp/ObjectiveCMIS.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "ObjectiveCMIS/ObjectiveCMIS-Prefix.pch";
@@ -1375,7 +1374,6 @@
828072C915153DE900EF635C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
DSTROOT = /tmp/ObjectiveCMIS.dst;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "ObjectiveCMIS/ObjectiveCMIS-Prefix.pch";
@@ -1391,7 +1389,6 @@
828072CB15153DE900EF635C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
@@ -1406,7 +1403,6 @@
828072CC15153DE900EF635C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
diff --git a/ObjectiveCMIS.xcodeproj/xcshareddata/xcschemes/ObjectiveCMIS.xcscheme b/ObjectiveCMIS.xcodeproj/xcshareddata/xcschemes/ObjectiveCMIS.xcscheme
index 6d6e93f..4c68dd1 100644
--- a/ObjectiveCMIS.xcodeproj/xcshareddata/xcschemes/ObjectiveCMIS.xcscheme
+++ b/ObjectiveCMIS.xcodeproj/xcshareddata/xcschemes/ObjectiveCMIS.xcscheme
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
- LastUpgradeVersion = "0500"
+ LastUpgradeVersion = "0510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
diff --git a/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISPropertyDefinitionParser.m b/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISPropertyDefinitionParser.m
index 4940297..8c9d520 100644
--- a/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISPropertyDefinitionParser.m
+++ b/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISPropertyDefinitionParser.m
@@ -113,7 +113,7 @@
self.parentDelegate = nil;
}
} else if ([elementName isEqualToString:kCMISCoreId]) {
- self.propertyDefinition.id = self.currentString;
+ self.propertyDefinition.identifier = self.currentString;
} else if ([elementName isEqualToString:kCMISCoreLocalName]) {
self.propertyDefinition.localName = self.currentString;
} else if ([elementName isEqualToString:kCMISCoreLocalNamespace]) {
@@ -123,7 +123,7 @@
} else if ([elementName isEqualToString:kCMISCoreQueryName]) {
self.propertyDefinition.queryName = self.currentString;
} else if ([elementName isEqualToString:kCMISCoreDescription]) {
- self.propertyDefinition.description = self.currentString;
+ self.propertyDefinition.summary = self.currentString;
} else if ([elementName isEqualToString:kCMISCoreCardinality]) {
if ([self.currentString isEqualToString:@"multi"]) {
self.propertyDefinition.cardinality = CMISCardinalityMulti;
diff --git a/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISRepositoryInfoParser.m b/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISRepositoryInfoParser.m
index 9c93680..aecf295 100644
--- a/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISRepositoryInfoParser.m
+++ b/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISRepositoryInfoParser.m
@@ -99,7 +99,7 @@
} else if ([elementName isEqualToString:kCMISCoreRepositoryName]) {
self.currentRepositoryInfo.name = self.currentString;
} else if ([elementName isEqualToString:kCMISCoreRepositoryDescription]) {
- self.currentRepositoryInfo.desc = self.currentString;
+ self.currentRepositoryInfo.summary = self.currentString;
} else if ([elementName isEqualToString:kCMISCoreVendorName]) {
self.currentRepositoryInfo.vendorName = self.currentString;
} else if ([elementName isEqualToString:kCMISCoreProductName]) {
diff --git a/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISTypeDefinitionAtomEntryParser.m b/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISTypeDefinitionAtomEntryParser.m
index c806e54..5cc186e 100644
--- a/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISTypeDefinitionAtomEntryParser.m
+++ b/ObjectiveCMIS/Bindings/AtomPub/AtomPubParser/CMISTypeDefinitionAtomEntryParser.m
@@ -111,7 +111,7 @@
self.isParsingTypeDefinition = NO;
} else if ([elementName isEqualToString:kCMISCoreId]) {
if (self.isParsingTypeDefinition){
- self.typeDefinition.id = self.currentString;
+ self.typeDefinition.identifier = self.currentString;
}
} else if ([elementName isEqualToString:kCMISCoreLocalName]) {
if (self.isParsingTypeDefinition) {
@@ -131,7 +131,7 @@
}
} else if ([elementName isEqualToString:kCMISCoreDescription]) {
if (self.isParsingTypeDefinition) {
- self.typeDefinition.description = self.currentString;
+ self.typeDefinition.summary = self.currentString;
}
} else if ([elementName isEqualToString:kCMISCoreBaseId]) {
if (self.isParsingTypeDefinition) {
diff --git a/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubRepositoryService.m b/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubRepositoryService.m
index 006f0a3..5b12924 100644
--- a/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubRepositoryService.m
+++ b/ObjectiveCMIS/Bindings/AtomPub/CMISAtomPubRepositoryService.m
@@ -89,7 +89,7 @@
cmisRequest:request
completionBlock:^(id object, NSError *error) {
CMISTypeByIdUriBuilder *typeByIdUriBuilder = object;
- typeByIdUriBuilder.id = typeId;
+ typeByIdUriBuilder.identifier = typeId;
[self.bindingSession.networkProvider invokeGET:[typeByIdUriBuilder buildUrl]
session:self.bindingSession
diff --git a/ObjectiveCMIS/Bindings/AtomPub/CMISTypeByIdUriBuilder.h b/ObjectiveCMIS/Bindings/AtomPub/CMISTypeByIdUriBuilder.h
index 0c1ccb2..0227853 100644
--- a/ObjectiveCMIS/Bindings/AtomPub/CMISTypeByIdUriBuilder.h
+++ b/ObjectiveCMIS/Bindings/AtomPub/CMISTypeByIdUriBuilder.h
@@ -22,7 +22,7 @@
@interface CMISTypeByIdUriBuilder : NSObject
-@property (nonatomic, strong) NSString *id;
+@property (nonatomic, strong) NSString *identifier;
/**
* init the template URL with URL string
diff --git a/ObjectiveCMIS/Bindings/AtomPub/CMISTypeByIdUriBuilder.m b/ObjectiveCMIS/Bindings/AtomPub/CMISTypeByIdUriBuilder.m
index 2f9f492..cc814e4 100644
--- a/ObjectiveCMIS/Bindings/AtomPub/CMISTypeByIdUriBuilder.m
+++ b/ObjectiveCMIS/Bindings/AtomPub/CMISTypeByIdUriBuilder.m
@@ -40,7 +40,7 @@
- (NSURL *)buildUrl
{
- return [NSURL URLWithString:[self.templateUrl stringByReplacingOccurrencesOfString:@"{id}" withString:self.id]];
+ return [NSURL URLWithString:[self.templateUrl stringByReplacingOccurrencesOfString:@"{id}" withString:self.identifier]];
}
diff --git a/ObjectiveCMIS/Bindings/Browser/CMISBrowserUtil.m b/ObjectiveCMIS/Bindings/Browser/CMISBrowserUtil.m
index 5ec21b1..22c3948 100644
--- a/ObjectiveCMIS/Bindings/Browser/CMISBrowserUtil.m
+++ b/ObjectiveCMIS/Bindings/Browser/CMISBrowserUtil.m
@@ -57,7 +57,7 @@
CMISRepositoryInfo *repoInfo = [CMISRepositoryInfo new];
repoInfo.identifier = [repo cmis_objectForKeyNotNull:kCMISBrowserJSONRepositoryId];
repoInfo.name = [repo cmis_objectForKeyNotNull:kCMISBrowserJSONRepositoryName];
- repoInfo.desc = [repo cmis_objectForKeyNotNull:kCMISBrowserJSONRepositoryDescription];
+ repoInfo.summary = [repo cmis_objectForKeyNotNull:kCMISBrowserJSONRepositoryDescription];
repoInfo.vendorName = [repo cmis_objectForKeyNotNull:kCMISBrowserJSONVendorName];
repoInfo.productName = [repo cmis_objectForKeyNotNull:kCMISBrowserJSONProductName];
repoInfo.productVersion = [repo cmis_objectForKeyNotNull:kCMISBrowserJSONProductVersion];
@@ -159,9 +159,9 @@
}
typeDef.baseTypeId = baseType;
- typeDef.description = [jsonDictionary cmis_objectForKeyNotNull:kCMISBrowserJSONDescription];
+ typeDef.summary = [jsonDictionary cmis_objectForKeyNotNull:kCMISBrowserJSONDescription];
typeDef.displayName = [jsonDictionary cmis_objectForKeyNotNull:kCMISBrowserJSONDisplayName];
- typeDef.id = [jsonDictionary cmis_objectForKeyNotNull:kCMISBrowserJSONId];
+ typeDef.identifier = [jsonDictionary cmis_objectForKeyNotNull:kCMISBrowserJSONId];
typeDef.controllablePolicy = [jsonDictionary cmis_boolForKey:kCMISBrowserJSONControllablePolicy];
typeDef.controllableAcl = [jsonDictionary cmis_boolForKey:kCMISBrowserJSONControllableAcl];
typeDef.creatable = [jsonDictionary cmis_boolForKey:kCMISBrowserJSONCreateable];
@@ -928,11 +928,11 @@
// create property definition and add to type definition
CMISPropertyDefinition *propDef = [CMISPropertyDefinition new];
- propDef.id = [propertyDictionary cmis_objectForKeyNotNull:kCMISBrowserJSONId];
+ propDef.identifier = [propertyDictionary cmis_objectForKeyNotNull:kCMISBrowserJSONId];
propDef.localName = [propertyDictionary cmis_objectForKeyNotNull:kCMISBrowserJSONLocalName];
propDef.localNamespace = [propertyDictionary cmis_objectForKeyNotNull:kCMISBrowserJSONLocalNamespace];
propDef.queryName = [propertyDictionary cmis_objectForKeyNotNull:kCMISBrowserJSONQueryName];
- propDef.description = [propertyDictionary cmis_objectForKeyNotNull:kCMISBrowserJSONDescription];
+ propDef.summary = [propertyDictionary cmis_objectForKeyNotNull:kCMISBrowserJSONDescription];
propDef.displayName = [propertyDictionary cmis_objectForKeyNotNull:kCMISBrowserJSONDisplayName];
propDef.inherited = [propertyDictionary cmis_boolForKey:kCMISBrowserJSONInherited];
propDef.openChoice = [propertyDictionary cmis_boolForKey:kCMISBrowserJSONOpenChoice];
diff --git a/ObjectiveCMIS/Bindings/CMISPropertyDefinition.h b/ObjectiveCMIS/Bindings/CMISPropertyDefinition.h
index 99b8103..49da6f2 100644
--- a/ObjectiveCMIS/Bindings/CMISPropertyDefinition.h
+++ b/ObjectiveCMIS/Bindings/CMISPropertyDefinition.h
@@ -26,12 +26,12 @@
@interface CMISPropertyDefinition : CMISExtensionData
-@property (nonatomic, strong) NSString *id;
+@property (nonatomic, strong) NSString *identifier;
@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 (nonatomic, strong) NSString *summary;
@property (nonatomic, assign) CMISPropertyType propertyType;
@property (nonatomic, assign) CMISCardinality cardinality;
@property (nonatomic, assign) CMISUpdatability updatability;
diff --git a/ObjectiveCMIS/Bindings/CMISTypeDefinition.h b/ObjectiveCMIS/Bindings/CMISTypeDefinition.h
index c2446e4..3a92612 100644
--- a/ObjectiveCMIS/Bindings/CMISTypeDefinition.h
+++ b/ObjectiveCMIS/Bindings/CMISTypeDefinition.h
@@ -26,15 +26,12 @@
@interface CMISTypeDefinition : CMISExtensionData
-// TODO: rename "id" property to identifier as id is a reserved keyword in ObjectiveC
-// TODO: rename "description" property to summary as description is a reserved keyword in ObjectiveC
-
-@property (nonatomic, strong) NSString *id;
+@property (nonatomic, strong) NSString *identifier;
@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 (nonatomic, strong) NSString *summary;
@property (nonatomic, assign) CMISBaseType baseTypeId;
@property (nonatomic, strong) NSString *parentTypeId;
diff --git a/ObjectiveCMIS/Bindings/CMISTypeDefinition.m b/ObjectiveCMIS/Bindings/CMISTypeDefinition.m
index ac31660..f6c92c5 100644
--- a/ObjectiveCMIS/Bindings/CMISTypeDefinition.m
+++ b/ObjectiveCMIS/Bindings/CMISTypeDefinition.m
@@ -39,7 +39,7 @@
if (self.internalPropertyDefinitions == nil) {
self.internalPropertyDefinitions = [[NSMutableDictionary alloc] init];
}
- [self.internalPropertyDefinitions setObject:propertyDefinition forKey:propertyDefinition.id];
+ [self.internalPropertyDefinitions setObject:propertyDefinition forKey:propertyDefinition.identifier];
}
- (CMISPropertyDefinition *)propertyDefinitionForId:(NSString *)propertyId
diff --git a/ObjectiveCMIS/Bindings/CMISTypeDefinitionCache.m b/ObjectiveCMIS/Bindings/CMISTypeDefinitionCache.m
index c1ef007..c34fa8d 100644
--- a/ObjectiveCMIS/Bindings/CMISTypeDefinitionCache.m
+++ b/ObjectiveCMIS/Bindings/CMISTypeDefinitionCache.m
@@ -75,7 +75,7 @@
- (void)addTypeDefinition:(CMISTypeDefinition *)typeDefinition repositoryId:(NSString *)repositoryId
{
- TypeDefinitionCacheKey *key = [TypeDefinitionCacheKey initWithTypeDefinitionId:typeDefinition.id repositoryId:repositoryId];
+ TypeDefinitionCacheKey *key = [TypeDefinitionCacheKey initWithTypeDefinitionId:typeDefinition.identifier repositoryId:repositoryId];
[self.typeDefinitionCache setObject:typeDefinition forKey:key];
}
diff --git a/ObjectiveCMIS/Common/CMISRepositoryInfo.h b/ObjectiveCMIS/Common/CMISRepositoryInfo.h
index 0ec178b..b16e551 100644
--- a/ObjectiveCMIS/Common/CMISRepositoryInfo.h
+++ b/ObjectiveCMIS/Common/CMISRepositoryInfo.h
@@ -25,7 +25,7 @@
@property (nonatomic, strong) NSString *identifier;
@property (nonatomic, strong) NSString *name;
-@property (nonatomic, strong) NSString *desc;
+@property (nonatomic, strong) NSString *summary;
@property (nonatomic, strong) NSString *rootFolderId;
@property (nonatomic, strong) NSString *cmisVersionSupported;
diff --git a/ObjectiveCMISTests/ObjectiveCMISTests.m b/ObjectiveCMISTests/ObjectiveCMISTests.m
index 6fbb9ce..1d80ae9 100644
--- a/ObjectiveCMISTests/ObjectiveCMISTests.m
+++ b/ObjectiveCMISTests/ObjectiveCMISTests.m
@@ -201,7 +201,7 @@
// test various aspects of type definition
CMISTypeDefinition *typeDef = rootFolder.typeDefinition;
XCTAssertNotNil(typeDef, @"Expected the type definition to be present");
- XCTAssertTrue([typeDef.id isEqualToString:@"cmis:folder"], @"Expected typeDef.id to be cmis:folder but it was %@", typeDef.id);
+ XCTAssertTrue([typeDef.identifier isEqualToString:@"cmis:folder"], @"Expected typeDef.identifier to be cmis:folder but it was %@", typeDef.identifier);
XCTAssertTrue([typeDef.localName isEqualToString:@"folder"], @"Expected typeDef.localName to be folder but it was %@", typeDef.localName);
XCTAssertTrue([typeDef.queryName isEqualToString:@"cmis:folder"], @"Expected typeDef.queryName to be cmis:folder but it was %@", typeDef.queryName);
XCTAssertTrue(typeDef.baseTypeId == CMISBaseTypeFolder, @"Expected baseTypeId to be cmis:folder");
@@ -215,8 +215,8 @@
CMISPropertyDefinition *objectTypeIdDef = typeDef.propertyDefinitions[@"cmis:objectTypeId"];
XCTAssertNotNil(objectTypeIdDef, @"Expected to find cmis:objectTypeId property definition");
- XCTAssertTrue([objectTypeIdDef.id isEqualToString:@"cmis:objectTypeId"],
- @"Expected objectTypeIdDef.id to be cmis:objectTypeId but it was %@", objectTypeIdDef.id);
+ XCTAssertTrue([objectTypeIdDef.identifier isEqualToString:@"cmis:objectTypeId"],
+ @"Expected objectTypeIdDef.id to be cmis:objectTypeId but it was %@", objectTypeIdDef.identifier);
XCTAssertTrue([objectTypeIdDef.localName isEqualToString:@"objectTypeId"],
@"Expected objectTypeIdDef.localName to be objectTypeId but it was %@", objectTypeIdDef.localName);
XCTAssertTrue(objectTypeIdDef.propertyType == CMISPropertyTypeId, @"Expected objectTypeId type to be id");
@@ -229,8 +229,8 @@
if (secondaryTypeIdDef != nil)
{
XCTAssertNotNil(secondaryTypeIdDef, @"Expected to find cmis:secondaryObjectTypeIds property definition");
- XCTAssertTrue([secondaryTypeIdDef.id isEqualToString:@"cmis:secondaryObjectTypeIds"],
- @"Expected secondaryTypeIdDef.id to be cmis:secondaryObjectTypeIds but it was %@", secondaryTypeIdDef.id);
+ XCTAssertTrue([secondaryTypeIdDef.identifier isEqualToString:@"cmis:secondaryObjectTypeIds"],
+ @"Expected secondaryTypeIdDef.id to be cmis:secondaryObjectTypeIds but it was %@", secondaryTypeIdDef.identifier);
XCTAssertTrue([secondaryTypeIdDef.localName isEqualToString:@"secondaryObjectTypeIds"],
@"Expected objectTypeIdDef.localName to be secondaryObjectTypeIds but it was %@", secondaryTypeIdDef.localName);
XCTAssertTrue(secondaryTypeIdDef.propertyType == CMISPropertyTypeId, @"Expected secondaryTypeIdDef type to be id");
@@ -1334,8 +1334,8 @@
XCTAssertTrue(typeDefinition.baseTypeId == CMISBaseTypeDocument, @"Unexpected base type id");
XCTAssertNotNil(typeDefinition.description, @"Type description should not be nil");
XCTAssertNotNil(typeDefinition.displayName, @"Type displayName should not be nil");
- XCTAssertNotNil(typeDefinition.id, @"Type id should not be nil");
- XCTAssertTrue([typeDefinition.id isEqualToString:@"cmis:document"], @"Wrong id for type");
+ XCTAssertNotNil(typeDefinition.identifier, @"Type id should not be nil");
+ XCTAssertTrue([typeDefinition.identifier isEqualToString:@"cmis:document"], @"Wrong id for type");
XCTAssertNotNil(typeDefinition.localName, @"Type local name should not be nil");
XCTAssertNotNil(typeDefinition.localNameSpace, @"Type local namespace should not be nil");
XCTAssertNotNil(typeDefinition.queryName, @"Type query name should not be nil");
@@ -1347,7 +1347,7 @@
CMISPropertyDefinition *propertyDefinition = [typeDefinition.propertyDefinitions objectForKey:key];
XCTAssertNotNil(propertyDefinition.description, @"Property definition description should not be nil");
XCTAssertNotNil(propertyDefinition.displayName, @"Property definition display name should not be nil");
- XCTAssertNotNil(propertyDefinition.id, @"Property definition id should not be nil");
+ XCTAssertNotNil(propertyDefinition.identifier, @"Property definition id should not be nil");
XCTAssertNotNil(propertyDefinition.localName, @"Property definition local name should not be nil");
XCTAssertNotNil(propertyDefinition.localNamespace, @"Property definition local namespace should not be nil");
XCTAssertNotNil(propertyDefinition.queryName, @"Property definition query name should not be nil");