MarkLogic Connect
MarkLogic Connect Client API Collection
|
An ITextDocumentContent instance that wraps a Microsoft cpprest JSON value object. More...
#include <CppRestJsonDocumentContent.hpp>
Public Member Functions | |
MLCLIENT_API | CppRestJsonDocumentContent () |
Default constructor. | |
virtual MLCLIENT_API | ~CppRestJsonDocumentContent () |
Virtual destructor to allow subclassing. | |
cpprestjsondocumentcontent_overrides Overridden functions from base class | |
MLCLIENT_API void | setContent (web::json::value &json) |
Sets the content of this document instance from a Microsoft cpprest API web::json::value instance. More... | |
MLCLIENT_API std::istream * | getStream () const override |
Returns the content of this ITextDocumentContent as an istream. More... | |
MLCLIENT_API void | setContent (std::string content) override |
Sets the textual content for this document. More... | |
MLCLIENT_API std::string | getContent () const override |
Returns the content as a 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... | |
MLCLIENT_API int | getLength () const override |
Returns the number of characters in the content string. More... | |
MLCLIENT_API IDocumentNavigator * | navigate (bool firstElementAsRoot=false) const override |
Returns a way to navigate the document. More... | |
cpprestjsondocumentcontent_functions These functions are new to this subclass. | |
MLCLIENT_API const web::json::value & | getJson () const |
Returns the underlying Microsoft cpprest API web::json::value object. 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 |
An ITextDocumentContent instance that wraps a Microsoft cpprest JSON value object.
Used by the CppRestJsonHelper class
|
overridevirtual |
Returns the content as a string.
Implements mlclient::IDocumentContent.
MLCLIENT_API const web::json::value& mlclient::utilities::CppRestJsonDocumentContent::getJson | ( | ) | const |
Returns the underlying Microsoft cpprest API web::json::value object.
|
overridevirtual |
Returns the number of characters in the content string.
Implements mlclient::ITextDocumentContent.
|
overridevirtual |
Returns the MIME type of this content.
E.g. application/json or application/xml
Implements mlclient::IDocumentContent.
|
overridevirtual |
Returns the content of this ITextDocumentContent as an istream.
This allows streaming to a HTTP request of this string content.
Implements mlclient::IDocumentContent.
|
overridevirtual |
Returns a way to navigate the document.
See IDocumentNavigator for details
Implements mlclient::ITextDocumentContent.
MLCLIENT_API void mlclient::utilities::CppRestJsonDocumentContent::setContent | ( | web::json::value & | json | ) |
Sets the content of this document instance from a Microsoft cpprest API web::json::value instance.
json | The cpprest API web::json::value instance to copy |
|
overridevirtual |
Sets the textual content for this document.
Assumes content string is non null
[in] | The | string content to copy in to this object. |
Implements mlclient::ITextDocumentContent.
|
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.