MDLDocument Class Reference
Inherits from | NSObject |
Declared in | MDLDocument.h MDLDocument.m |
Tasks
-
identifier
The document identifier, as generated by Mendeley.
property -
identifiers
The document identifiers.
property -
DOI
The document DOI (Digital Object Identifier).
property -
canonicalIdentifier
The canonical identifier of the document.
property -
PubMedIdentifier
The PubMed identifier (PMID) of the document.
property -
type
The type of the document. This is
property@"Generic"
by default. -
title
The title of the document.
property -
abstract
The abstract of the document.
property -
mendeleyURL
The Mendeley URL of the document.
property -
URL
The URL of the document.
property -
authors
The authors of the document stored as MDLAuthor.
property -
publicationOutlet
The publication outlet of the document.
property -
publication
The publication of the document.
property -
publisher
The publisher of the document.
property -
foldersIdentifiers
The folder identifiers of the document.
property -
year
The year of the document.
property -
files
The files of the document.
property -
group
The group of the document, if it belongs to one.
property -
read
The read status of the document
property -
starred
The star status of the document
property -
authored
The authored status of the document
property -
deletionPending
The deletion pending status of the document
property -
discipline
The discipline of the document.
property -
subdiscipline
The subdiscipline of the document.
property -
institution
The institution of the document.
property -
volume
The volume of the document.
property -
issue
The issue of the document.
property -
pages
The pages of the document.
property -
notes
The notes of the document.
property -
keywords
The keywords of the document.
property -
tags
The tags of the document.
property -
cast
The cast of the document.
property -
editors
The editors of the document.
property -
producers
The producers of the document.
property -
translators
The translators of the document.
property -
addedDate
The added date of the document.
property -
modifiedDate
The modified date of the document.
property -
version
The version of the document.
property -
openAccess
The Open Access status of the document
property -
inUserLibrary
A Boolean value that corresponds to whether the document is in the user library.
property -
+ createDocumentWithTitle:parameters:success:failure:
Creates a
MDLDocument
and sends an API creation request using the shared client. -
+ searchWithTerms:atPage:count:success:failure:
Sends an API search request with generic terms using the shared client.
-
+ searchWithGenericTerms:authors:title:year:tags:atPage:count:success:failure:
Sends an API search request with specific terms using the shared client.
-
+ searchTagged:category:subcategory:atPage:count:success:failure:
Sends a search tagged API request using the shared client.
-
+ searchAuthoredWithName:year:atPage:count:success:failure:
Sends a search authored API request using the shared client.
-
+ fetchTopDocumentsInPublicLibraryForCategory:upAndComing:success:failure:
Sends a top documents (papers) API request using the shared client and fetches the response as an array of
MDLDocument
. -
+ fetchDocumentsInUserLibraryAtPage:count:success:failure:
Sends a user library API request using the shared client.
-
+ fetchAuthoredDocumentsInUserLibraryAtPage:count:success:failure:
Sends a user authored API request using the shared client.
-
– uploadFileAtURL:success:failure:
Sends an API upload request using the shared client.
-
– fetchDetailsSuccess:failure:
Sends an API details request for the current document using the shared client.
-
– fetchRelatedDocumentsAtPage:count:success:failure:
Sends a related documents API request using the shared client.
-
– markAsRead:success:failure:
Sends an update document API request using the shared client.
-
– markAsStarred:success:failure:
Sends an update document API request using the shared client.
-
– importToUserLibrarySuccess:failure:
Sends an import document API request using the shared client.
-
– moveToTrashSuccess:failure:
Sends an update document API request using the shared client.
-
– deleteSuccess:failure:
Sends a delete document API request using the shared client.
Properties
DOI
The document DOI (Digital Object Identifier).
@property (copy, nonatomic) NSString *DOI
Discussion
The document DOI (Digital Object Identifier).
Declared In
MDLDocument.h
PubMedIdentifier
The PubMed identifier (PMID) of the document.
@property (copy, nonatomic) NSString *PubMedIdentifier
Discussion
The PubMed identifier (PMID) of the document.
Declared In
MDLDocument.h
URL
The URL of the document.
@property (strong, nonatomic) NSURL *URL
Discussion
The URL of the document.
Declared In
MDLDocument.h
abstract
The abstract of the document.
@property (copy, nonatomic) NSString *abstract
Discussion
The abstract of the document.
Declared In
MDLDocument.h
addedDate
The added date of the document.
@property (strong, nonatomic) NSDate *addedDate
Discussion
The added date of the document.
Declared In
MDLDocument.h
authored
The authored status of the document
@property (strong, nonatomic) NSNumber *authored
Discussion
The authored status of the document
Declared In
MDLDocument.h
authors
The authors of the document stored as MDLAuthor.
@property (strong, nonatomic) NSArray *authors
Discussion
The authors of the document stored as MDLAuthor.
Declared In
MDLDocument.h
canonicalIdentifier
The canonical identifier of the document.
@property (copy, nonatomic) NSString *canonicalIdentifier
Discussion
The canonical identifier of the document.
Declared In
MDLDocument.h
cast
The cast of the document.
@property (strong, nonatomic) NSArray *cast
Discussion
The cast of the document.
Declared In
MDLDocument.h
deletionPending
The deletion pending status of the document
@property (strong, nonatomic) NSNumber *deletionPending
Discussion
The deletion pending status of the document
Declared In
MDLDocument.h
discipline
The discipline of the document.
@property (copy, nonatomic) NSString *discipline
Discussion
The discipline of the document.
Declared In
MDLDocument.h
editors
The editors of the document.
@property (strong, nonatomic) NSArray *editors
Discussion
The editors of the document.
Declared In
MDLDocument.h
files
The files of the document.
@property (strong, nonatomic) NSArray *files
Discussion
The files of the document.
Declared In
MDLDocument.h
foldersIdentifiers
The folder identifiers of the document.
@property (copy, nonatomic) NSArray *foldersIdentifiers
Discussion
The folder identifiers of the document.
Declared In
MDLDocument.h
group
The group of the document, if it belongs to one.
@property (strong, nonatomic) MDLGroup *group
Discussion
The group of the document, if it belongs to one.
Declared In
MDLDocument.h
identifier
The document identifier, as generated by Mendeley.
@property (copy, nonatomic) NSString *identifier
Discussion
The document identifier, as generated by Mendeley.
Declared In
MDLDocument.h
identifiers
The document identifiers.
@property (strong, nonatomic) NSDictionary *identifiers
Discussion
The document identifiers.
Declared In
MDLDocument.h
inUserLibrary
A Boolean value that corresponds to whether the document is in the user library.
@property (strong, nonatomic) NSNumber *inUserLibrary
Discussion
A Boolean value that corresponds to whether the document is in the user library.
Declared In
MDLDocument.h
institution
The institution of the document.
@property (copy, nonatomic) NSString *institution
Discussion
The institution of the document.
Declared In
MDLDocument.h
issue
The issue of the document.
@property (copy, nonatomic) NSString *issue
Discussion
The issue of the document.
Declared In
MDLDocument.h
keywords
The keywords of the document.
@property (strong, nonatomic) NSArray *keywords
Discussion
The keywords of the document.
Declared In
MDLDocument.h
mendeleyURL
The Mendeley URL of the document.
@property (strong, nonatomic) NSURL *mendeleyURL
Discussion
The Mendeley URL of the document.
Declared In
MDLDocument.h
modifiedDate
The modified date of the document.
@property (strong, nonatomic) NSDate *modifiedDate
Discussion
The modified date of the document.
Declared In
MDLDocument.h
notes
The notes of the document.
@property (copy, nonatomic) NSString *notes
Discussion
The notes of the document.
Declared In
MDLDocument.h
openAccess
The Open Access status of the document
@property (strong, nonatomic) NSNumber *openAccess
Discussion
The Open Access status of the document
Declared In
MDLDocument.h
pages
The pages of the document.
@property (copy, nonatomic) NSString *pages
Discussion
The pages of the document.
Declared In
MDLDocument.h
producers
The producers of the document.
@property (strong, nonatomic) NSArray *producers
Discussion
The producers of the document.
Declared In
MDLDocument.h
publication
The publication of the document.
@property (strong, nonatomic) MDLPublication *publication
Discussion
The publication of the document.
Declared In
MDLDocument.h
publicationOutlet
The publication outlet of the document.
@property (strong, nonatomic) MDLPublication *publicationOutlet
Discussion
The publication outlet of the document.
Declared In
MDLDocument.h
publisher
The publisher of the document.
@property (copy, nonatomic) NSString *publisher
Discussion
The publisher of the document.
Declared In
MDLDocument.h
read
The read status of the document
@property (strong, nonatomic) NSNumber *read
Discussion
The read status of the document
Declared In
MDLDocument.h
starred
The star status of the document
@property (strong, nonatomic) NSNumber *starred
Discussion
The star status of the document
Declared In
MDLDocument.h
subdiscipline
The subdiscipline of the document.
@property (copy, nonatomic) NSString *subdiscipline
Discussion
The subdiscipline of the document.
Declared In
MDLDocument.h
tags
The tags of the document.
@property (strong, nonatomic) NSArray *tags
Discussion
The tags of the document.
Declared In
MDLDocument.h
title
The title of the document.
@property (copy, nonatomic) NSString *title
Discussion
The title of the document.
Declared In
MDLDocument.h
translators
The translators of the document.
@property (strong, nonatomic) NSArray *translators
Discussion
The translators of the document.
Declared In
MDLDocument.h
type
The type of the document. This is @"Generic"
by default.
@property (copy, nonatomic) NSString *type
Discussion
The type of the document. This is @"Generic"
by default.
Declared In
MDLDocument.h
version
The version of the document.
@property (strong, nonatomic) NSNumber *version
Discussion
The version of the document.
Declared In
MDLDocument.h
Class Methods
createDocumentWithTitle:parameters:success:failure:
Creates a MDLDocument
and sends an API creation request using the shared client.
+ (MDLDocument *)createDocumentWithTitle:(NSString *)title parameters:(NSDictionary *)parameters success:(void ( ^ ) ( MDLDocument *))success failure:(void ( ^ ) ( NSError *))failure
Parameters
- title
The title of the document.
- parameters
Optional parameters of the document.
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes one argument: the created document with its newly assigned document identifier.
- failure
A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes one argument: the
NSError
object describing the network or parsing error that occurred.
Return Value
The newly-initialized document, with document identifier = nil
.
Discussion
Creates a MDLDocument
and sends an API creation request using the shared client.
Declared In
MDLDocument.h
fetchAuthoredDocumentsInUserLibraryAtPage:count:success:failure:
Sends a user authored API request using the shared client.
+ (void)fetchAuthoredDocumentsInUserLibraryAtPage:(NSUInteger)pageIndex count:(NSUInteger)count success:(void ( ^ ) ( NSArray *, NSUInteger , NSUInteger , NSUInteger , NSUInteger ))success failure:(void ( ^ ) ( NSError *))failure
Parameters
- pageIndex
The page index.
O
is first page.
- count
The number of items returned per page.
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes five arguments: an array of
MDLDocument
objects, the total number of results, the total number of pages, the index of the current page, and the number of items per page.
- failure
A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes one argument: the
NSError
object describing the network or parsing error that occurred.
Discussion
Sends a user authored API request using the shared client.
See Also
Declared In
MDLDocument.h
fetchDocumentsInUserLibraryAtPage:count:success:failure:
Sends a user library API request using the shared client.
+ (void)fetchDocumentsInUserLibraryAtPage:(NSUInteger)pageIndex count:(NSUInteger)count success:(void ( ^ ) ( NSArray *, NSUInteger , NSUInteger , NSUInteger , NSUInteger ))success failure:(void ( ^ ) ( NSError *))failure
Parameters
- pageIndex
The page index.
O
is first page.
- count
The number of items returned per page.
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes five arguments: an array of
MDLDocument
objects, the total number of results, the total number of pages, the index of the current page, and the number of items per page.
- failure
A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes one argument: the
NSError
object describing the network or parsing error that occurred.
Discussion
Sends a user library API request using the shared client.
See Also
Declared In
MDLDocument.h
fetchTopDocumentsInPublicLibraryForCategory:upAndComing:success:failure:
Sends a top documents (papers) API request using the shared client and fetches the response as an array of MDLDocument
.
+ (void)fetchTopDocumentsInPublicLibraryForCategory:(NSString *)categoryIdentifier upAndComing:(BOOL)upAndComing success:(void ( ^ ) ( NSArray *))success failure:(void ( ^ ) ( NSError *))failure
Parameters
- categoryIdentifier
If not
nil
, the identifier of the category, otherwise across all categories.
- upAndComing
If true, results apply to ‘trending’ documents.
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes one argument: an array of
MDLDocument
objects.
- failure
A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes one argument: the
NSError
object describing the network or parsing error that occurred.
Discussion
Sends a top documents (papers) API request using the shared client and fetches the response as an array of MDLDocument
.
See Also
Declared In
MDLDocument.h
searchAuthoredWithName:year:atPage:count:success:failure:
Sends a search authored API request using the shared client.
+ (void)searchAuthoredWithName:(NSString *)name year:(NSNumber *)year atPage:(NSUInteger)pageIndex count:(NSUInteger)count success:(void ( ^ ) ( NSArray *, NSUInteger , NSUInteger , NSUInteger , NSUInteger ))success failure:(void ( ^ ) ( NSError *))failure
Parameters
- name
The name of the author for the search query
- year
The year for the search query
- pageIndex
The page index.
O
is first page.
- count
The number of items returned per page.
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes five arguments: an array of
MDLDocument
objects for the match, the total number of results, the total number of pages, the index of the current page, and the number of items per page.
- failure
A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes one argument: the
NSError
object describing the network or parsing error that occurred.
Discussion
Sends a search authored API request using the shared client.
See Also
Declared In
MDLDocument.h
searchTagged:category:subcategory:atPage:count:success:failure:
Sends a search tagged API request using the shared client.
+ (void)searchTagged:(NSString *)tag category:(MDLCategory *)category subcategory:(MDLSubcategory *)subcategory atPage:(NSUInteger)pageIndex count:(NSUInteger)count success:(void ( ^ ) ( NSArray *, NSUInteger , NSUInteger , NSUInteger , NSUInteger ))success failure:(void ( ^ ) ( NSError *))failure
Parameters
- tag
The tags for the search query
- category
The category for the search query
- subcategory
The subcategory for the search query
- pageIndex
The page index.
O
is first page.
- count
The number of items returned per page.
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes five arguments: an array of
MDLDocument
objects for the match, the total number of results, the total number of pages, the index of the current page, and the number of items per page.
- failure
A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes one argument: the
NSError
object describing the network or parsing error that occurred.
Discussion
Sends a search tagged API request using the shared client.
See Also
Declared In
MDLDocument.h
searchWithGenericTerms:authors:title:year:tags:atPage:count:success:failure:
Sends an API search request with specific terms using the shared client.
+ (void)searchWithGenericTerms:(NSString *)genericTerms authors:(NSString *)authors title:(NSString *)title year:(NSNumber *)year tags:(NSString *)tags atPage:(NSUInteger)pageIndex count:(NSUInteger)count success:(void ( ^ ) ( NSArray *, NSUInteger , NSUInteger , NSUInteger , NSUInteger ))success failure:(void ( ^ ) ( NSError *))failure
Parameters
- genericTerms
The terms for the search query
- authors
The authors for the search query
- title
The title for the search query
- year
The year for the search query
- tags
The tags for the search query
- pageIndex
The page index.
O
is first page.
- count
The number of items returned per page.
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes five arguments: an array of
MDLDocument
objects for the match, the total number of results, the total number of pages, the index of the current page, and the number of items per page.
- failure
A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes one argument: the
NSError
object describing the network or parsing error that occurred.
Discussion
Sends an API search request with specific terms using the shared client.
See Also
Declared In
MDLDocument.h
searchWithTerms:atPage:count:success:failure:
Sends an API search request with generic terms using the shared client.
+ (void)searchWithTerms:(NSString *)terms atPage:(NSUInteger)pageIndex count:(NSUInteger)count success:(void ( ^ ) ( NSArray *, NSUInteger , NSUInteger , NSUInteger , NSUInteger ))success failure:(void ( ^ ) ( NSError *))failure
Parameters
- terms
The terms for the search query
- pageIndex
The page index.
O
is first page.
- count
The number of items returned per page.
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes five arguments: an array of
MDLDocument
objects for the match, the total number of results, the total number of pages, the index of the current page, and the number of items per page.
- failure
A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes one argument: the
NSError
object describing the network or parsing error that occurred.
Discussion
Sends an API search request with generic terms using the shared client.
See Also
Declared In
MDLDocument.h
Instance Methods
deleteSuccess:failure:
Sends a delete document API request using the shared client.
- (void)deleteSuccess:(void ( ^ ) ( ))success failure:(void ( ^ ) ( NSError *))failure
Parameters
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes one argument: an array of
MDLDocument
objects.
- failure
A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes one argument: the
NSError
object describing the network or parsing error that occurred.
Discussion
Sends a delete document API request using the shared client.
See Also
Declared In
MDLDocument.h
fetchDetailsSuccess:failure:
Sends an API details request for the current document using the shared client.
- (void)fetchDetailsSuccess:(void ( ^ ) ( MDLDocument *))success failure:(void ( ^ ) ( NSError *))failure
Parameters
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes one argument: the current document with its newly assigned details.
- failure
A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes one argument: the
NSError
object describing the network or parsing error that occurred.
Discussion
Sends an API details request for the current document using the shared client.
See Also
Declared In
MDLDocument.h
fetchRelatedDocumentsAtPage:count:success:failure:
Sends a related documents API request using the shared client.
- (void)fetchRelatedDocumentsAtPage:(NSUInteger)pageIndex count:(NSUInteger)count success:(void ( ^ ) ( NSArray *))success failure:(void ( ^ ) ( NSError *))failure
Parameters
- pageIndex
The page index.
O
is first page.
- count
The number of items returned per page.
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes one argument: an array of
MDLDocument
objects.
- failure
A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes one argument: the
NSError
object describing the network or parsing error that occurred.
Discussion
Sends a related documents API request using the shared client.
See Also
Declared In
MDLDocument.h
importToUserLibrarySuccess:failure:
Sends an import document API request using the shared client.
- (void)importToUserLibrarySuccess:(void ( ^ ) ( NSString *newDocumentIdentifier ))success failure:(void ( ^ ) ( NSError *))failure
Parameters
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes one argument: a
NSString
for the identifier for the newly-created document.
- failure
A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes one argument: the
NSError
object describing the network or parsing error that occurred.
Discussion
Sends an import document API request using the shared client.
Declared In
MDLDocument.h
markAsRead:success:failure:
Sends an update document API request using the shared client.
- (void)markAsRead:(BOOL)read success:(void ( ^ ) ( MDLDocument *))success failure:(void ( ^ ) ( NSError *))failure
Parameters
- read
The read status.
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes one argument: a
MDLDocument
object.
- failure
A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes one argument: the
NSError
object describing the network or parsing error that occurred.
Discussion
Sends an update document API request using the shared client.
Declared In
MDLDocument.h
markAsStarred:success:failure:
Sends an update document API request using the shared client.
- (void)markAsStarred:(BOOL)starred success:(void ( ^ ) ( MDLDocument *))success failure:(void ( ^ ) ( NSError *))failure
Parameters
- starred
The starred status.
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes one argument: a
MDLDocument
object.
- failure
A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes one argument: the
NSError
object describing the network or parsing error that occurred.
Discussion
Sends an update document API request using the shared client.
Declared In
MDLDocument.h
moveToTrashSuccess:failure:
Sends an update document API request using the shared client.
- (void)moveToTrashSuccess:(void ( ^ ) ( MDLDocument *))success failure:(void ( ^ ) ( NSError *))failure
Parameters
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes one argument: a
MDLDocument
object.
- failure
A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes one argument: the
NSError
object describing the network or parsing error that occurred.
Discussion
Sends an update document API request using the shared client.
Declared In
MDLDocument.h
uploadFileAtURL:success:failure:
Sends an API upload request using the shared client.
- (void)uploadFileAtURL:(NSURL *)fileURL success:(void ( ^ ) ( ))success failure:(void ( ^ ) ( NSError *))failure
Parameters
- fileURL
The local URL for the file to upload.
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes no argument.
- failure
A block object to be executed when the request operation finishes unsuccessfully, or that finishes successfully, but encountered an error while parsing the resonse data. This block has no return value and takes one argument: the
NSError
object describing the network or parsing error that occurred.
Discussion
Sends an API upload request using the shared client.
Keep in mind that Mendeley only handles a limited number of file formats (.pdf, etc).
See Also
Declared In
MDLDocument.h