|
18 | 18 | import com.marklogic.client.io.marker.AbstractWriteHandle; |
19 | 19 | import com.marklogic.client.io.marker.DocumentMetadataWriteHandle; |
20 | 20 |
|
| 21 | +/** A reflection of the write operations queued by calls to add, |
| 22 | + * {@link DocumentWriteSet#add add}, {@link DocumentWriteSet#addDefault addDefault}, or |
| 23 | + * {@link DocumentWriteSet#disableDefault disableDefault}. |
| 24 | + */ |
21 | 25 | public interface DocumentWriteOperation { |
22 | | - public enum OperationType { METADATA_DEFAULT, DISABLE_METADATA_DEFAULT, DOCUMENT_WRITE }; |
| 26 | + public enum OperationType { |
| 27 | + /** This write operation (REST API mime part) sets the defaults for the |
| 28 | + * rest of the request. |
| 29 | + * @see <a href="http://docs.marklogic.com/guide/rest-dev/bulk#id_56498"> |
| 30 | + * REST API Guide -> Constructing a Metadata Part</a> |
| 31 | + */ |
| 32 | + METADATA_DEFAULT, |
| 33 | + /** This write operation (REST API mime part) clears the defaults for the |
| 34 | + * rest of the request. While this removes defaults set previously on the |
| 35 | + * request, this does not completely restore server-side defaults. For |
| 36 | + * more information see the |
| 37 | + * <a href="http://docs.marklogic.com/guide/rest-dev/bulk#id_54554"> |
| 38 | + * REST API Guide -> Example: Reverting to System Default Metadata</a> |
| 39 | + */ |
| 40 | + DISABLE_METADATA_DEFAULT, |
| 41 | + /** This write operation (REST API mime part) creates or overwrites |
| 42 | + * one document and/or document metadata. |
| 43 | + * @see <a href="http://docs.marklogic.com/guide/rest-dev/bulk#id_33756"> |
| 44 | + * REST API Guide -> Constructing a Content Part</a> |
| 45 | + * @see <a href="http://docs.marklogic.com/guide/rest-dev/bulk#id_56498"> |
| 46 | + * REST API Guide -> Constructing a Metadata Part</a> |
| 47 | + * @see <a href="http://docs.marklogic.com/guide/rest-dev/bulk#id_89876"> |
| 48 | + * REST API Guide -> Understanding When Metadata is Preserved or Replaced</a> |
| 49 | + */ |
| 50 | + DOCUMENT_WRITE |
| 51 | + }; |
23 | 52 |
|
| 53 | + /** Returns the {@link DocumentWriteOperation.OperationType} set implicitly by your call to |
| 54 | + * {@link DocumentWriteSet#add add}, {@link DocumentWriteSet#addDefault addDefault}, or |
| 55 | + * {@link DocumentWriteSet#disableDefault disableDefault}. |
| 56 | + */ |
24 | 57 | public OperationType getOperationType(); |
25 | 58 |
|
| 59 | + // The uri for this document, whether set explicitly or received from the |
| 60 | + // server after a write with a DocumentDescriptor. |
| 61 | + /** The uri for this document if set explicitly by your call to |
| 62 | + * {@link DocumentWriteSet#add(String, AbstractWriteHandle) add(String, ...)} |
| 63 | + */ |
26 | 64 | public String getUri(); |
27 | 65 |
|
| 66 | + /** The handle with the metadata as set by your call to |
| 67 | + * {@link DocumentWriteSet#add(String, DocumentMetadataWriteHandle, AbstractWriteHandle) add} or |
| 68 | + * {@link DocumentWriteSet#add(DocumentDescriptor, DocumentMetadataWriteHandle, AbstractWriteHandle) add}. |
| 69 | + */ |
28 | 70 | public DocumentMetadataWriteHandle getMetadata(); |
29 | 71 |
|
| 72 | + /** The handle with the content as set by your call to |
| 73 | + * {@link DocumentWriteSet#add(String, AbstractWriteHandle) add} or |
| 74 | + * {@link DocumentWriteSet#add(DocumentDescriptor, AbstractWriteHandle) add}. |
| 75 | + */ |
30 | 76 | public AbstractWriteHandle getContent(); |
31 | 77 | } |
0 commit comments