MarkLogic Connect
MarkLogic Connect Client API Collection
|
Wraps a file system file ready for its upload to MarkLogic Server. More...
#include <DocumentContent.hpp>
Public Member Functions | |
MLCLIENT_API | FileDocumentContent (std::string file) |
MLCLIENT_API std::istream * | getStream () const override |
Returns the content of this IDocumentContent as an istream. More... | |
MLCLIENT_API std::string | getContent () const override |
Returns the content of this IDocumentContent as a std::string. More... | |
MLCLIENT_API std::string | getMimeType () const override |
Returns the MIME type of this content. More... | |
MLCLIENT_API void | setMimeType (const std::string &mt) override |
Sets the MIME type of this content. More... | |
Public Member Functions inherited from mlclient::IDocumentContent | |
MLCLIENT_API | IDocumentContent () |
virtual MLCLIENT_API | ~IDocumentContent ()=0 |
Additional Inherited Members | |
Static Public Attributes inherited from mlclient::IDocumentContent | |
static MLCLIENT_API const std::string | MIME_JSON |
static MLCLIENT_API const std::string | MIME_XML |
Wraps a file system file ready for its upload to MarkLogic Server.
|
overridevirtual |
Returns the content of this IDocumentContent as a std::string.
This allows streaming of a HTTP request, with data encoded as a string.
Implements mlclient::IDocumentContent.
|
overridevirtual |
Returns the MIME type of this content.
E.g. application/json or application/xml
Implements mlclient::IDocumentContent.
|
overridevirtual |
Returns the content of this IDocumentContent as an istream.
This allows streaming to a HTTP request, and works for binary and string content.
Implements mlclient::IDocumentContent.
|
overridevirtual |
Sets the MIME type of this content.
E.g. application/json or application/xml
[in] | mt | The mimetype string, not including encoding, for this Document Content. Assume always UTF-8 for MarkLogic Server) |
Implements mlclient::IDocumentContent.