MarkLogic Connect
MarkLogic Connect Client API Collection
|
Provides a representation of a MarkLogic Document. More...
#include <Document.hpp>
Public Member Functions | |
MLCLIENT_API | Document () |
Creates an empty Document object. | |
MLCLIENT_API | Document (const std::string &uri) |
Creates a Document that holds only a URI reference. More... | |
MLCLIENT_API | Document (const std::string &uri, IDocumentContent *own_content) |
Creates a document with a URI and document content fragment. More... | |
MLCLIENT_API | Document (const std::string &uri, IDocumentContent *own_content, IDocumentContent *own_properties) |
Creates a Document with a URI, document content fragment, and a document properties document fragment. More... | |
MLCLIENT_API | Document (const std::string &uri, IDocumentContent *own_content, IDocumentContent *own_properties, PermissionSet own_permissions) |
Creates a Document with a URI, document content fragment, and a document properties document fragment, and a set of permissions. More... | |
virtual MLCLIENT_API | ~Document ()=default |
Default Destructor. | |
MLCLIENT_API const std::string & | getUri () const |
Returns the URI of this document. More... | |
MLCLIENT_API void | setUri (const std::string &uri) |
Sets the Document URI. More... | |
MLCLIENT_API const bool | hasUri () const |
Returns true if the Document's URI has been set. More... | |
MLCLIENT_API const CollectionSet | getCollections () const |
Returns the set of collections this document belongs to. More... | |
MLCLIENT_API void | setCollections (const CollectionSet &collections) |
Sets the collections this Document is a member of. More... | |
MLCLIENT_API const bool | hasCollections () const |
Whether this document has any collections set. More... | |
MLCLIENT_API const IDocumentContent * | getContent () const |
Returns the content fragment of this document. More... | |
MLCLIENT_API const bool | hasContent () const |
Whether this document has it's content fragment set. More... | |
MLCLIENT_API void | setContent (IDocumentContent *own_content) |
Sets the content fragment of this document instance. More... | |
MLCLIENT_API const IDocumentContent * | getProperties () const |
Retrieves the property fragment of this document instance. More... | |
MLCLIENT_API const bool | hasProperties () const |
Whether this document instance has its properties fragment set. More... | |
MLCLIENT_API void | setProperties (IDocumentContent *own_properties) |
Sets this document's properties fragment. More... | |
MLCLIENT_API const PermissionSet | getPermissions () const |
Returns the permissions set on this document instance. More... | |
MLCLIENT_API const bool | hasPermissions () const |
Whether this document instance has any permissions set. More... | |
MLCLIENT_API void | setPermissions (PermissionSet own_permissions) |
Sets this document's permissions. More... | |
MLCLIENT_API bool | operator== (const Document &other) |
Equality operator. Checks equality of URI only. | |
MLCLIENT_API bool | operator!= (const Document &other) |
Inequality operator. Checks inequality of URI only. | |
Provides a representation of a MarkLogic Document.
MLCLIENT_API mlclient::Document::Document | ( | const std::string & | uri | ) |
MLCLIENT_API mlclient::Document::Document | ( | const std::string & | uri, |
IDocumentContent * | own_content | ||
) |
MLCLIENT_API mlclient::Document::Document | ( | const std::string & | uri, |
IDocumentContent * | own_content, | ||
IDocumentContent * | own_properties | ||
) |
Creates a Document with a URI, document content fragment, and a document properties document fragment.
MLCLIENT_API mlclient::Document::Document | ( | const std::string & | uri, |
IDocumentContent * | own_content, | ||
IDocumentContent * | own_properties, | ||
PermissionSet | own_permissions | ||
) |
Creates a Document with a URI, document content fragment, and a document properties document fragment, and a set of permissions.
[in] | uri | The URI for the Document within MarkLogic Server |
[in] | own_content | The content fragment. The Document class owns this reference, and deletes it upon destruction |
[in] | own_properties | The properties fragment. The Document class owns this reference, and deletes it upon destruction |
[in] | own_permissions | The permission set to apply. The Document class owns this reference, and deletes it upon destruction |
MLCLIENT_API const CollectionSet mlclient::Document::getCollections | ( | ) | const |
Returns the set of collections this document belongs to.
MLCLIENT_API const IDocumentContent* mlclient::Document::getContent | ( | ) | const |
Returns the content fragment of this document.
MLCLIENT_API const PermissionSet mlclient::Document::getPermissions | ( | ) | const |
Returns the permissions set on this document instance.
MLCLIENT_API const IDocumentContent* mlclient::Document::getProperties | ( | ) | const |
Retrieves the property fragment of this document instance.
MLCLIENT_API const std::string& mlclient::Document::getUri | ( | ) | const |
Returns the URI of this document.
Returns an empty string if not set
MLCLIENT_API const bool mlclient::Document::hasCollections | ( | ) | const |
Whether this document has any collections set.
MLCLIENT_API const bool mlclient::Document::hasContent | ( | ) | const |
Whether this document has it's content fragment set.
MLCLIENT_API const bool mlclient::Document::hasPermissions | ( | ) | const |
Whether this document instance has any permissions set.
MLCLIENT_API const bool mlclient::Document::hasProperties | ( | ) | const |
Whether this document instance has its properties fragment set.
MLCLIENT_API const bool mlclient::Document::hasUri | ( | ) | const |
MLCLIENT_API void mlclient::Document::setCollections | ( | const CollectionSet & | collections | ) |
Sets the collections this Document is a member of.
collections | The collections the document is a member of |
MLCLIENT_API void mlclient::Document::setContent | ( | IDocumentContent * | own_content | ) |
Sets the content fragment of this document instance.
own_content | The content fragment. This class OWNS this pointer from this point on, and deletes it upon destruction. |
MLCLIENT_API void mlclient::Document::setPermissions | ( | PermissionSet | own_permissions | ) |
Sets this document's permissions.
own_permissions | The permissions to set. Uses std::move to own the resources of the PermissionSet |
MLCLIENT_API void mlclient::Document::setProperties | ( | IDocumentContent * | own_properties | ) |
Sets this document's properties fragment.
own_properties | The properties fragment. This class OWNS this pointer from this point on, and deletes it upon destruction. |
MLCLIENT_API void mlclient::Document::setUri | ( | const std::string & | uri | ) |
Sets the Document URI.
uri | The document URI string |