MDLDocument Class Reference
| Inherits from | NSObject |
| Declared in | MDLDocument.h MDLDocument.m |
Tasks
-
identifierThe document identifier, as generated by Mendeley.
property -
identifiersThe document identifiers.
property -
DOIThe document DOI (Digital Object Identifier).
property -
canonicalIdentifierThe canonical identifier of the document.
property -
PubMedIdentifierThe PubMed identifier (PMID) of the document.
property -
typeThe type of the document. This is
property@"Generic"by default. -
titleThe title of the document.
property -
abstractThe abstract of the document.
property -
mendeleyURLThe Mendeley URL of the document.
property -
URLThe URL of the document.
property -
authorsThe authors of the document stored as MDLAuthor.
property -
publicationOutletThe publication outlet of the document.
property -
publicationThe publication of the document.
property -
publisherThe publisher of the document.
property -
foldersIdentifiersThe folder identifiers of the document.
property -
yearThe year of the document.
property -
filesThe files of the document.
property -
groupThe group of the document, if it belongs to one.
property -
readThe read status of the document
property -
starredThe star status of the document
property -
authoredThe authored status of the document
property -
deletionPendingThe deletion pending status of the document
property -
disciplineThe discipline of the document.
property -
subdisciplineThe subdiscipline of the document.
property -
institutionThe institution of the document.
property -
volumeThe volume of the document.
property -
issueThe issue of the document.
property -
pagesThe pages of the document.
property -
notesThe notes of the document.
property -
keywordsThe keywords of the document.
property -
tagsThe tags of the document.
property -
castThe cast of the document.
property -
editorsThe editors of the document.
property -
producersThe producers of the document.
property -
translatorsThe translators of the document.
property -
addedDateThe added date of the document.
property -
modifiedDateThe modified date of the document.
property -
versionThe version of the document.
property -
openAccessThe Open Access status of the document
property -
inUserLibraryA Boolean value that corresponds to whether the document is in the user library.
property -
+ createDocumentWithTitle:parameters:success:failure:Creates a
MDLDocumentand 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 *DOIDiscussion
The document DOI (Digital Object Identifier).
Declared In
MDLDocument.hPubMedIdentifier
The PubMed identifier (PMID) of the document.
@property (copy, nonatomic) NSString *PubMedIdentifierDiscussion
The PubMed identifier (PMID) of the document.
Declared In
MDLDocument.hURL
The URL of the document.
@property (strong, nonatomic) NSURL *URLDiscussion
The URL of the document.
Declared In
MDLDocument.habstract
The abstract of the document.
@property (copy, nonatomic) NSString *abstractDiscussion
The abstract of the document.
Declared In
MDLDocument.haddedDate
The added date of the document.
@property (strong, nonatomic) NSDate *addedDateDiscussion
The added date of the document.
Declared In
MDLDocument.hauthored
The authored status of the document
@property (strong, nonatomic) NSNumber *authoredDiscussion
The authored status of the document
Declared In
MDLDocument.hauthors
The authors of the document stored as MDLAuthor.
@property (strong, nonatomic) NSArray *authorsDiscussion
The authors of the document stored as MDLAuthor.
Declared In
MDLDocument.hcanonicalIdentifier
The canonical identifier of the document.
@property (copy, nonatomic) NSString *canonicalIdentifierDiscussion
The canonical identifier of the document.
Declared In
MDLDocument.hcast
The cast of the document.
@property (strong, nonatomic) NSArray *castDiscussion
The cast of the document.
Declared In
MDLDocument.hdeletionPending
The deletion pending status of the document
@property (strong, nonatomic) NSNumber *deletionPendingDiscussion
The deletion pending status of the document
Declared In
MDLDocument.hdiscipline
The discipline of the document.
@property (copy, nonatomic) NSString *disciplineDiscussion
The discipline of the document.
Declared In
MDLDocument.heditors
The editors of the document.
@property (strong, nonatomic) NSArray *editorsDiscussion
The editors of the document.
Declared In
MDLDocument.hfiles
The files of the document.
@property (strong, nonatomic) NSArray *filesDiscussion
The files of the document.
Declared In
MDLDocument.hfoldersIdentifiers
The folder identifiers of the document.
@property (copy, nonatomic) NSArray *foldersIdentifiersDiscussion
The folder identifiers of the document.
Declared In
MDLDocument.hgroup
The group of the document, if it belongs to one.
@property (strong, nonatomic) MDLGroup *groupDiscussion
The group of the document, if it belongs to one.
Declared In
MDLDocument.hidentifier
The document identifier, as generated by Mendeley.
@property (copy, nonatomic) NSString *identifierDiscussion
The document identifier, as generated by Mendeley.
Declared In
MDLDocument.hidentifiers
The document identifiers.
@property (strong, nonatomic) NSDictionary *identifiersDiscussion
The document identifiers.
Declared In
MDLDocument.hinUserLibrary
A Boolean value that corresponds to whether the document is in the user library.
@property (strong, nonatomic) NSNumber *inUserLibraryDiscussion
A Boolean value that corresponds to whether the document is in the user library.
Declared In
MDLDocument.hinstitution
The institution of the document.
@property (copy, nonatomic) NSString *institutionDiscussion
The institution of the document.
Declared In
MDLDocument.hissue
The issue of the document.
@property (copy, nonatomic) NSString *issueDiscussion
The issue of the document.
Declared In
MDLDocument.hkeywords
The keywords of the document.
@property (strong, nonatomic) NSArray *keywordsDiscussion
The keywords of the document.
Declared In
MDLDocument.hmendeleyURL
The Mendeley URL of the document.
@property (strong, nonatomic) NSURL *mendeleyURLDiscussion
The Mendeley URL of the document.
Declared In
MDLDocument.hmodifiedDate
The modified date of the document.
@property (strong, nonatomic) NSDate *modifiedDateDiscussion
The modified date of the document.
Declared In
MDLDocument.hnotes
The notes of the document.
@property (copy, nonatomic) NSString *notesDiscussion
The notes of the document.
Declared In
MDLDocument.hopenAccess
The Open Access status of the document
@property (strong, nonatomic) NSNumber *openAccessDiscussion
The Open Access status of the document
Declared In
MDLDocument.hpages
The pages of the document.
@property (copy, nonatomic) NSString *pagesDiscussion
The pages of the document.
Declared In
MDLDocument.hproducers
The producers of the document.
@property (strong, nonatomic) NSArray *producersDiscussion
The producers of the document.
Declared In
MDLDocument.hpublication
The publication of the document.
@property (strong, nonatomic) MDLPublication *publicationDiscussion
The publication of the document.
Declared In
MDLDocument.hpublicationOutlet
The publication outlet of the document.
@property (strong, nonatomic) MDLPublication *publicationOutletDiscussion
The publication outlet of the document.
Declared In
MDLDocument.hpublisher
The publisher of the document.
@property (copy, nonatomic) NSString *publisherDiscussion
The publisher of the document.
Declared In
MDLDocument.hread
The read status of the document
@property (strong, nonatomic) NSNumber *readDiscussion
The read status of the document
Declared In
MDLDocument.hstarred
The star status of the document
@property (strong, nonatomic) NSNumber *starredDiscussion
The star status of the document
Declared In
MDLDocument.hsubdiscipline
The subdiscipline of the document.
@property (copy, nonatomic) NSString *subdisciplineDiscussion
The subdiscipline of the document.
Declared In
MDLDocument.htags
The tags of the document.
@property (strong, nonatomic) NSArray *tagsDiscussion
The tags of the document.
Declared In
MDLDocument.htitle
The title of the document.
@property (copy, nonatomic) NSString *titleDiscussion
The title of the document.
Declared In
MDLDocument.htranslators
The translators of the document.
@property (strong, nonatomic) NSArray *translatorsDiscussion
The translators of the document.
Declared In
MDLDocument.htype
The type of the document. This is @"Generic" by default.
@property (copy, nonatomic) NSString *typeDiscussion
The type of the document. This is @"Generic" by default.
Declared In
MDLDocument.hversion
The version of the document.
@property (strong, nonatomic) NSNumber *versionDiscussion
The version of the document.
Declared In
MDLDocument.hClass 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 *))failureParameters
- 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
NSErrorobject 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.hfetchAuthoredDocumentsInUserLibraryAtPage: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 *))failureParameters
- pageIndex
The page index.
Ois 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
MDLDocumentobjects, 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
NSErrorobject describing the network or parsing error that occurred.
Discussion
Sends a user authored API request using the shared client.
See Also
Declared In
MDLDocument.hfetchDocumentsInUserLibraryAtPage: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 *))failureParameters
- pageIndex
The page index.
Ois 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
MDLDocumentobjects, 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
NSErrorobject describing the network or parsing error that occurred.
Discussion
Sends a user library API request using the shared client.
See Also
Declared In
MDLDocument.hfetchTopDocumentsInPublicLibraryForCategory: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 *))failureParameters
- 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
MDLDocumentobjects.
- 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
NSErrorobject 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.hsearchAuthoredWithName: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 *))failureParameters
- name
The name of the author for the search query
- year
The year for the search query
- pageIndex
The page index.
Ois 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
MDLDocumentobjects 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
NSErrorobject describing the network or parsing error that occurred.
Discussion
Sends a search authored API request using the shared client.
See Also
Declared In
MDLDocument.hsearchTagged: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 *))failureParameters
- 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.
Ois 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
MDLDocumentobjects 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
NSErrorobject describing the network or parsing error that occurred.
Discussion
Sends a search tagged API request using the shared client.
See Also
Declared In
MDLDocument.hsearchWithGenericTerms: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 *))failureParameters
- 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.
Ois 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
MDLDocumentobjects 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
NSErrorobject 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.hsearchWithTerms: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 *))failureParameters
- terms
The terms for the search query
- pageIndex
The page index.
Ois 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
MDLDocumentobjects 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
NSErrorobject 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.hInstance Methods
deleteSuccess:failure:
Sends a delete document API request using the shared client.
- (void)deleteSuccess:(void ( ^ ) ( ))success failure:(void ( ^ ) ( NSError *))failureParameters
- 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
MDLDocumentobjects.
- 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
NSErrorobject describing the network or parsing error that occurred.
Discussion
Sends a delete document API request using the shared client.
See Also
Declared In
MDLDocument.hfetchDetailsSuccess:failure:
Sends an API details request for the current document using the shared client.
- (void)fetchDetailsSuccess:(void ( ^ ) ( MDLDocument *))success failure:(void ( ^ ) ( NSError *))failureParameters
- 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
NSErrorobject 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.hfetchRelatedDocumentsAtPage: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 *))failureParameters
- pageIndex
The page index.
Ois 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
MDLDocumentobjects.
- 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
NSErrorobject describing the network or parsing error that occurred.
Discussion
Sends a related documents API request using the shared client.
See Also
Declared In
MDLDocument.himportToUserLibrarySuccess:failure:
Sends an import document API request using the shared client.
- (void)importToUserLibrarySuccess:(void ( ^ ) ( NSString *newDocumentIdentifier ))success failure:(void ( ^ ) ( NSError *))failureParameters
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes one argument: a
NSStringfor 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
NSErrorobject describing the network or parsing error that occurred.
Discussion
Sends an import document API request using the shared client.
Declared In
MDLDocument.hmarkAsRead:success:failure:
Sends an update document API request using the shared client.
- (void)markAsRead:(BOOL)read success:(void ( ^ ) ( MDLDocument *))success failure:(void ( ^ ) ( NSError *))failureParameters
- 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
MDLDocumentobject.
- 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
NSErrorobject describing the network or parsing error that occurred.
Discussion
Sends an update document API request using the shared client.
Declared In
MDLDocument.hmarkAsStarred:success:failure:
Sends an update document API request using the shared client.
- (void)markAsStarred:(BOOL)starred success:(void ( ^ ) ( MDLDocument *))success failure:(void ( ^ ) ( NSError *))failureParameters
- 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
MDLDocumentobject.
- 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
NSErrorobject describing the network or parsing error that occurred.
Discussion
Sends an update document API request using the shared client.
Declared In
MDLDocument.hmoveToTrashSuccess:failure:
Sends an update document API request using the shared client.
- (void)moveToTrashSuccess:(void ( ^ ) ( MDLDocument *))success failure:(void ( ^ ) ( NSError *))failureParameters
- success
A block object to be executed when the request operation finishes successfully. This block has no return value and takes one argument: a
MDLDocumentobject.
- 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
NSErrorobject describing the network or parsing error that occurred.
Discussion
Sends an update document API request using the shared client.
Declared In
MDLDocument.huploadFileAtURL:success:failure:
Sends an API upload request using the shared client.
- (void)uploadFileAtURL:(NSURL *)fileURL success:(void ( ^ ) ( ))success failure:(void ( ^ ) ( NSError *))failureParameters
- 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
NSErrorobject 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