-
Notifications
You must be signed in to change notification settings - Fork 13
/
ZPZoteroNote.m
48 lines (39 loc) · 940 Bytes
/
ZPZoteroNote.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//
// ZPZoteroNote.m
// ZotPad
//
// Created by Rönkkö Mikko on 12/27/11.
// Copyright (c) 2011 Mikko Rönkkö. All rights reserved.
//
#import "ZPCore.h"
@implementation ZPZoteroNote
+(id) dataObjectWithDictionary:(NSDictionary *)fields{
NSMutableDictionary* dict = [NSMutableDictionary dictionaryWithDictionary:fields ];
[dict setObject:@"note" forKey:@"itemType"];
return [super dataObjectWithDictionary:dict];
}
// An alias for setParentCollectionKey
- (void) setParentKey:(NSString*)key{
[self setParentItemKey:key];
}
- (void) setParentItemKey:(NSString*)key{
_parentItemKey = key;
}
- (NSString*) parentItemKey{
if(_parentItemKey == NULL){
return self.key;
}
else{
return _parentItemKey;
}
}
- (NSArray*) creators{
return [NSArray array];
}
- (NSDictionary*) fields{
return [NSDictionary dictionary];
}
-(NSString*) itemType{
return @"note";
}
@end