Revision: 29873
http://sourceforge.net/p/bibdesk/svn/29873
Author: hofman
Date: 2025-11-22 15:34:48 +0000 (Sat, 22 Nov 2025)
Log Message:
-----------
add nullability, pass MARC subtag in method
Modified Paths:
--------------
trunk/bibdesk/BDSKMARCParser.m
trunk/bibdesk/BDSKTypeManager.h
trunk/bibdesk/BDSKTypeManager.m
Modified: trunk/bibdesk/BDSKMARCParser.m
===================================================================
--- trunk/bibdesk/BDSKMARCParser.m 2025-11-22 15:22:41 UTC (rev 29872)
+++ trunk/bibdesk/BDSKMARCParser.m 2025-11-22 15:34:48 UTC (rev 29873)
@@ -308,11 +308,11 @@
#define MARCRelatorSubTag @"e"
static void addSubstringToDictionary(NSString *subValue, NSMutableDictionary
*pubDict, NSString *tag, NSString *subTag, BOOL isUNIMARC){
- NSString *key = [[[BDSKTypeManager sharedManager]
fieldNamesForMARCTag:tag] objectForKey:subTag];
+ NSString *key = [[BDSKTypeManager sharedManager] fieldNameForMARCTag:tag
subTag:subTag];
NSString *tmpValue = nil;
if (isUNIMARC)
- key = [[[BDSKTypeManager sharedManager] fieldNamesForUNIMARCTag:tag]
objectForKey:subTag];
+ key = [[BDSKTypeManager sharedManager] fieldNameForUNIMARCTag:tag
subTag:subTag];
if(key == nil)
return;
Modified: trunk/bibdesk/BDSKTypeManager.h
===================================================================
--- trunk/bibdesk/BDSKTypeManager.h 2025-11-22 15:22:41 UTC (rev 29872)
+++ trunk/bibdesk/BDSKTypeManager.h 2025-11-22 15:34:48 UTC (rev 29873)
@@ -81,6 +81,7 @@
NSArray<NSString *> *defaultTypes;
NSSet<NSString *> *standardTypes;
NSSet<NSString *> *allFieldsSet;
+
NSCharacterSet *invalidCiteKeyCharSet;
NSCharacterSet *fragileCiteKeyCharSet;
NSCharacterSet *strictInvalidCiteKeyCharSet;
@@ -152,43 +153,43 @@
- (NSArray<NSString *> *)allFieldNamesIncluding:(nullable NSArray<NSString *>
*)include excluding:(nullable NSArray<NSString *> *)exclude;
// PubMed
-- (NSString *)fieldNameForPubMedTag:(NSString *)tag;
-- (NSString *)bibTeXTypeForPubMedType:(NSString *)type;
+- (nullable NSString *)fieldNameForPubMedTag:(NSString *)tag;
+- (nullable NSString *)bibTeXTypeForPubMedType:(NSString *)type;
// RIS
-- (NSString *)fieldNameForRISTag:(NSString *)tag forBibTeXType:(NSString
*)type;
-- (NSString *)bibTeXTypeForRISType:(NSString *)type;
-- (NSString *)RISTagForBibTeXFieldName:(NSString *)name
forBibTeXType:(NSString *)type;
+- (nullable NSString *)fieldNameForRISTag:(NSString *)tag
forBibTeXType:(NSString *)type;
+- (nullable NSString *)bibTeXTypeForRISType:(NSString *)type;
+- (nullable NSString *)RISTagForBibTeXFieldName:(NSString *)name
forBibTeXType:(NSString *)type;
- (NSString *)RISTypeForBibTeXType:(NSString *)type;
// Refer
- (NSString *)fieldNameForReferTag:(NSString *)tag;
- (NSString *)bibTeXTypeForReferType:(NSString *)type;
-- (NSString *)referTagForBibTeXFieldName:(NSString *)name;
+- (nullable NSString *)referTagForBibTeXFieldName:(NSString *)name;
- (NSString *)referTypeForBibTeXType:(NSString *)type;
// MARC
-- (NSDictionary<NSString *, NSString *> *)fieldNamesForMARCTag:(NSString
*)name;
-- (NSDictionary<NSString *, NSString *> *)fieldNamesForUNIMARCTag:(NSString
*)name;
+- (nullable NSString *)fieldNameForMARCTag:(NSString *)tag subTag:(NSString
*)subTag;
+- (nullable NSString *)fieldNameForUNIMARCTag:(NSString *)tag subTag:(NSString
*)subTag;
// JSTOR
-- (NSString *)fieldNameForJSTORTag:(NSString *)tag;
-- (NSString *)fieldNameForJSTORDescription:(NSString *)name;
+- (nullable NSString *)fieldNameForJSTORTag:(NSString *)tag;
+- (nullable NSString *)fieldNameForJSTORDescription:(NSString *)name;
// Web of Science
- (NSString *)bibTeXTypeForWebOfScienceType:(NSString *)type;
-- (NSString *)fieldNameForWebOfScienceTag:(NSString *)tag;
-- (NSString *)fieldNameForWebOfScienceDescription:(NSString *)name;
+- (nullable NSString *)fieldNameForWebOfScienceTag:(NSString *)tag;
+- (nullable NSString *)fieldNameForWebOfScienceDescription:(NSString *)name;
// Dublin Core
-- (NSString *)fieldNameForDublinCoreTerm:(NSString *)term;
-- (NSString *)bibTeXTypeForDublinCoreType:(NSString *)type;
+- (nullable NSString *)fieldNameForDublinCoreTerm:(NSString *)term;
+- (nullable NSString *)bibTeXTypeForDublinCoreType:(NSString *)type;
// HCite
- (NSString *)bibTeXTypeForHCiteType:(NSString *)type;
// MODS
-- (NSDictionary<NSString *, NSArray<NSString *> *>
*)MODSGenresForBibTeXType:(NSString *)type;
+- (nullable NSDictionary<NSString *, NSArray<NSString *> *>
*)MODSGenresForBibTeXType:(NSString *)type;
// Character sets for format parsing and group splitting
- (NSCharacterSet *)invalidCharactersForField:(NSString *)fieldName;
Modified: trunk/bibdesk/BDSKTypeManager.m
===================================================================
--- trunk/bibdesk/BDSKTypeManager.m 2025-11-22 15:22:41 UTC (rev 29872)
+++ trunk/bibdesk/BDSKTypeManager.m 2025-11-22 15:34:48 UTC (rev 29873)
@@ -422,12 +422,12 @@
// MARC
-- (NSDictionary *)fieldNamesForMARCTag:(NSString *)tag{
- return [fieldNamesForMARCTagDict objectForKey:tag];
+- (NSString *)fieldNameForMARCTag:(NSString *)tag subTag:(NSString *)subTag{
+ return [[fieldNamesForMARCTagDict objectForKey:tag] objectForKey:subTag];
}
-- (NSDictionary *)fieldNamesForUNIMARCTag:(NSString *)tag{
- return [fieldNamesForUNIMARCTagDict objectForKey:tag];
+- (NSString *)fieldNameForUNIMARCTag:(NSString *)tag subTag:(NSString *)subTag{
+ return [[fieldNamesForUNIMARCTagDict objectForKey:tag]
objectForKey:subTag];
}
// JSTOR
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit