Revision: 29205 http://sourceforge.net/p/bibdesk/svn/29205 Author: hofman Date: 2025-04-26 16:47:28 +0000 (Sat, 26 Apr 2025) Log Message: ----------- use macros for supported syntaxes
Modified Paths: -------------- trunk/bibdesk/BDSKSRUGroupServer.m Modified: trunk/bibdesk/BDSKSRUGroupServer.m =================================================================== --- trunk/bibdesk/BDSKSRUGroupServer.m 2025-04-26 15:52:14 UTC (rev 29204) +++ trunk/bibdesk/BDSKSRUGroupServer.m 2025-04-26 16:47:28 UTC (rev 29205) @@ -47,6 +47,10 @@ #define MAX_RESULTS 100 +#define MARCXML_STRING @"marcxml" +#define DC_STRING @"dc" +#define MODS_STRING @"mods" + enum { BDSKIdleState, BDSKSearchState, BDSKFetchState }; @interface BDSKSRUGroupServer () @@ -86,7 +90,7 @@ return self; } -+ (NSArray *)supportedRecordSyntaxes { return @[@"marcxml", @"dc", @"mods"]; } ++ (NSArray *)supportedRecordSyntaxes { return @[MARCXML_STRING, DC_STRING, MODS_STRING]; } #pragma mark URLs @@ -190,15 +194,15 @@ - (BDSKStringType)stringTypeForRecordString:(NSString *)string { NSString *recordSyntax = [serverInfo recordSyntax]; BDSKStringType stringType = BDSKStringTypeUnknown; - if(recordSyntax == nil || [recordSyntax isEqualToString:@"marcxml"]) { + if(recordSyntax == nil || [recordSyntax isEqualToString:MARCXML_STRING]) { stringType = BDSKStringTypeMARC; if ([BDSKStringParser canParseString:string ofType:stringType] == NO) stringType = BDSKStringTypeDublinCore; - } else if([recordSyntax isEqualToString:@"dc"]) { + } else if([recordSyntax isEqualToString:DC_STRING]) { stringType = BDSKStringTypeDublinCore; if ([BDSKStringParser canParseString:string ofType:stringType] == NO) stringType = BDSKStringTypeMARC; - } else if([recordSyntax isEqualToString:@"mods"]) { + } else if([recordSyntax isEqualToString:MODS_STRING]) { stringType = BDSKStringTypeMODS; } if (NO == [BDSKStringParser canParseString:string ofType:stringType]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit