Revision: 28583
http://sourceforge.net/p/bibdesk/svn/28583
Author: hofman
Date: 2024-01-10 19:10:02 +0000 (Wed, 10 Jan 2024)
Log Message:
-----------
synthesize some properties
Modified Paths:
--------------
trunk/bibdesk/BDSKDBLPGroupServer.m
trunk/bibdesk/BDSKEntrezGroupServer.h
trunk/bibdesk/BDSKEntrezGroupServer.m
trunk/bibdesk/BDSKISIGroupServer.m
trunk/bibdesk/BDSKZoomGroupServer.h
trunk/bibdesk/BDSKZoomGroupServer.m
Modified: trunk/bibdesk/BDSKDBLPGroupServer.m
===================================================================
--- trunk/bibdesk/BDSKDBLPGroupServer.m 2024-01-10 18:45:21 UTC (rev 28582)
+++ trunk/bibdesk/BDSKDBLPGroupServer.m 2024-01-10 19:10:02 UTC (rev 28583)
@@ -54,10 +54,9 @@
@interface BDSKDBLPGroupServer ()
-- (void)setSearchTerm:(NSString *)string;
-- (NSString *)searchTerm;
+@property (nonatomic, copy) NSString *searchTerm;
-- (void)setErrorMessage:(NSString *)newErrorMessage;
+@property (nonatomic, copy) NSString *errorMessage;
- (void)search;
- (void)fetch;
@@ -76,6 +75,8 @@
@implementation BDSKDBLPGroupServer
+@synthesize searchTerm, errorMessage;
+
+ (NSURLRequest *)requestWithDatabase:(NSString *)database format:(NSString
*)format number:(NSInteger)number offset:(NSInteger)offset searchTerm:(NSString
*)searchTerm {
NSString *URLString = [NSString stringWithFormat:SERVER_URL_STRING
@"/search/%@/api?h=%ld&f=%ld&format=%@&q=%@", database, (long)number,
(long)offset, format, searchTerm];
return [NSURLRequest requestWithURL:[NSURL URLWithString:URLString]];
@@ -178,25 +179,6 @@
- (BOOL)isRetrieving { return state == BDSKDBLPStateSearch || state ==
BDSKDBLPStateFetch; }
-- (NSString *)searchTerm { return searchTerm; }
-
-- (void)setSearchTerm:(NSString *)string; {
- if(searchTerm != string){
- searchTerm = [string copy];
- }
-}
-
-// warning: if these ever can be set on the background thread they have to be
made thread safe
-- (NSString *)errorMessage {
- return errorMessage;
-}
-
-- (void)setErrorMessage:(NSString *)newErrorMessage {
- if (errorMessage != newErrorMessage) {
- errorMessage = [newErrorMessage copy];
- }
-}
-
- (NSFormatter *)searchStringFormatter { return nil; }
#pragma mark Search and fetch method
Modified: trunk/bibdesk/BDSKEntrezGroupServer.h
===================================================================
--- trunk/bibdesk/BDSKEntrezGroupServer.h 2024-01-10 18:45:21 UTC (rev
28582)
+++ trunk/bibdesk/BDSKEntrezGroupServer.h 2024-01-10 19:10:02 UTC (rev
28583)
@@ -60,10 +60,6 @@
NSString *errorMessage;
}
-@property(nonatomic, copy) NSString *searchTerm;
-@property(nonatomic, copy) NSString *webEnv;
-@property(nonatomic, copy) NSString *queryKey;
-
- (void)resetSearch;
- (void)fetch;
- (void)startDownloadFromURL:(NSURL *)theURL;
Modified: trunk/bibdesk/BDSKEntrezGroupServer.m
===================================================================
--- trunk/bibdesk/BDSKEntrezGroupServer.m 2024-01-10 18:45:21 UTC (rev
28582)
+++ trunk/bibdesk/BDSKEntrezGroupServer.m 2024-01-10 19:10:02 UTC (rev
28583)
@@ -64,9 +64,20 @@
#import "NSURL_BDSKExtensions.h"
#import "BDSKDownloader.h"
+@interface BDSKEntrezGroupServer ()
+
+@property (nonatomic, copy) NSString *searchTerm;
+
+@property (nonatomic, copy) NSString *errorMessage;
+
+@property(nonatomic, copy) NSString *webEnv;
+@property(nonatomic, copy) NSString *queryKey;
+
+@end
+
@implementation BDSKEntrezGroupServer
-@synthesize searchTerm, webEnv, queryKey;
+@synthesize searchTerm, errorMessage, webEnv, queryKey;
enum { BDSKIdleState, BDSKEsearchState, BDSKEfetchState };
@@ -154,16 +165,6 @@
- (BOOL)isRetrieving { return BDSKIdleState != downloadState; }
-// warning: if these ever can be set on the background thread they have to be
made thread safe
-- (NSString *)errorMessage { return errorMessage; }
-
-- (void)setErrorMessage:(NSString *)newErrorMessage {
- BDSKASSERT([NSThread isMainThread]);
- if (errorMessage != newErrorMessage) {
- errorMessage = newErrorMessage;
- }
-}
-
- (NSFormatter *)searchStringFormatter { return nil; }
#pragma mark Search methods
Modified: trunk/bibdesk/BDSKISIGroupServer.m
===================================================================
--- trunk/bibdesk/BDSKISIGroupServer.m 2024-01-10 18:45:21 UTC (rev 28582)
+++ trunk/bibdesk/BDSKISIGroupServer.m 2024-01-10 19:10:02 UTC (rev 28583)
@@ -90,10 +90,9 @@
@interface BDSKISIGroupServer () <BDSKSoapBindingOperationDelegate>
-- (void)setSearchTerm:(NSString *)string;
-- (NSString *)searchTerm;
+@property (nonatomic, copy) NSString *searchTerm;
-- (void)setErrorMessage:(NSString *)newErrorMessage;
+@property (nonatomic, copy) NSString *errorMessage;
- (void)searchWithAuthentication;
- (void)search;
@@ -112,6 +111,8 @@
@implementation BDSKISIGroupServer
+@synthesize searchTerm, errorMessage;
+
+ (void)initialize
{
BDSKINITIALIZE;
@@ -231,22 +232,6 @@
- (BOOL)isRetrieving { return state != BDSKWOKStateIdle; }
-- (NSString *)searchTerm { return searchTerm; }
-
-- (void)setSearchTerm:(NSString *)string; {
- if(searchTerm != string){
- searchTerm = [string copy];
- }
-}
-
-- (NSString *)errorMessage { return errorMessage; }
-
-- (void)setErrorMessage:(NSString *)newErrorMessage {
- if (errorMessage != newErrorMessage) {
- errorMessage = [newErrorMessage copy];
- }
-}
-
- (NSFormatter *)searchStringFormatter { return nil; }
#pragma mark Search method
Modified: trunk/bibdesk/BDSKZoomGroupServer.h
===================================================================
--- trunk/bibdesk/BDSKZoomGroupServer.h 2024-01-10 18:45:21 UTC (rev 28582)
+++ trunk/bibdesk/BDSKZoomGroupServer.h 2024-01-10 19:10:02 UTC (rev 28583)
@@ -64,5 +64,4 @@
}
@property (class, nonatomic, readonly) NSArray *supportedRecordSyntaxes;
+ (ZOOMSyntaxType)zoomRecordSyntaxForRecordSyntaxString:(NSString *)syntax;
-@property (nonatomic, strong) NSString *errorMessage;
@end
Modified: trunk/bibdesk/BDSKZoomGroupServer.m
===================================================================
--- trunk/bibdesk/BDSKZoomGroupServer.m 2024-01-10 18:45:21 UTC (rev 28582)
+++ trunk/bibdesk/BDSKZoomGroupServer.m 2024-01-10 19:10:02 UTC (rev 28583)
@@ -56,9 +56,13 @@
#define DCXML_STRING @"DC XML"
#define MODS_STRING @"MODS"
-@interface BDSKZoomGroupServer (Private)
+@interface BDSKZoomGroupServer ()
+
+@property (nonatomic, copy) NSString *errorMessage;
+
- (void)downloadWithSearchTerm:(NSString *)searchTerm;
- (void)terminateConnection;
+
@end
@implementation BDSKZoomGroupServer
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