Interface AnnotationService
- All Superinterfaces:
Service
-
Method Summary
Modifier and TypeMethodDescriptionGiven aListof unique annotation IDs, delete their associated annotations if they are found.Given a request that includes aListofAnnotationobjects, save the annotations to Vault.Creates a newAnnotation.Builder.Creates a newAnnotation.Builderfor the specified unique annotation ID.Creates a newAnnotationBatchDeleteRequest.Builder.Creates a newAnnotationBatchSaveRequest.Builder.Creates a newAnnotationPlacemark.Builder.Creates a newAnnotationReadRequest.Builder.Creates a newAnnotationReplyReadRequest.Builder.Creates a newAnnotationReference.Builder.readAnnotations(AnnotationReadRequest readAnnotationRequest) Given either aListof unique annotation IDs or a document version to read annotations from, returns anAnnotationReadOperationto execute.readReplies(AnnotationReplyReadRequest readReplyRequest) Given the ID of a parent annotation, returns anAnnotationReadOperationto execute to read its replies.
-
Method Details
-
batchSaveAnnotations
BatchOperation<AnnotationBatchSaveSuccess,AnnotationBatchSaveError> batchSaveAnnotations(AnnotationBatchSaveRequest request) Given a request that includes aListofAnnotationobjects, save the annotations to Vault.Annotations with IDs built usingnewAnnotationBuilderWithId(String)will be treated as updates, whileAnnotations without IDs built usingnewAnnotationBuilder()will be created. Updates may specify fields, placemarks, or references to update, or replies to append. New annotations must contain a placemark and the minimum required fields for their type.Runs as a batch operation, for example:
annotationService.batchSaveAnnotations(annotations).onSuccesses(...).onErrors(...).ignoreErrors().execute();Successes are gathered into
AnnotationBatchSaveSuccessobjects, which map the passedAnnotations to the IDs of annotations that were successfully created based on their document and placemark data.Errors are gathered into
AnnotationBatchSaveErrorobjects, which map the passedAnnotations to error types defined by theAnnotationBatchSaveErrorTypeenum.The maximum allowed batch size is 500 input
Annotations.- Parameters:
request- a request including theAnnotations to be created or updated, which must have a minimum amount of data based on their type- Returns:
- the batch operation, which will save the annotations upon execution
-
readAnnotations
Given either aListof unique annotation IDs or a document version to read annotations from, returns anAnnotationReadOperationto execute.Successes may be streamed, with each result being a fully populated
Annotationobject. If a particular annotation requested by ID is not found, it will not be included in the stream.Errors are
AnnotationReadErrorResultobjects, which include error types defined by theAnnotationReadErrorTypeenum.Replies will not be fetched unless specified by ID. Replies, if any, can be fetched with
readReplies(AnnotationReplyReadRequest).- Parameters:
readAnnotationRequest- the request to read annotations- Returns:
- an operation to read the requested annotations
-
readReplies
Given the ID of a parent annotation, returns anAnnotationReadOperationto execute to read its replies.Successes may be streamed, with each result being a fully populated
Annotationobject representing a reply. They will be in the order in which they appear on the parent.Errors are
AnnotationReadErrorResultobjects, which include error types defined by theAnnotationReadErrorTypeenum.- Parameters:
readReplyRequest- the request to read the replies of a parent annotation- Returns:
- an operation to read the requested replies
-
batchDeleteAnnotations
BatchOperation<PositionalResult,AnnotationBatchDeleteError> batchDeleteAnnotations(AnnotationBatchDeleteRequest request) Given aListof unique annotation IDs, delete their associated annotations if they are found.Runs as a batch operation, for example:
annotationService.batchDeleteAnnotations(annotationIds).onSuccesses(...).onErrors(...).ignoreErrors().execute();Successes are gathered into
PositionalResultobjects, which indicate which inputs were successfully deleted, by input position.Errors are gathered into
AnnotationBatchDeleteErrorobjects, which map the inputs that were not deleted to error types defined by theAnnotationBatchDeleteErrorTypeenum.The maximum allowed batch size is 500 input IDs.
- Parameters:
request- a request including the unique IDs of the annotations to be deleted- Returns:
- the batch operation, which will save the annotations upon execution
-
newAnnotationBuilder
Annotation.Builder newAnnotationBuilder()Creates a newAnnotation.Builder.- Returns:
- the created
Annotation.Builder
-
newAnnotationBuilderWithId
Creates a newAnnotation.Builderfor the specified unique annotation ID. Annotation objects built with the resulting builder, and then passed to thebatchSaveAnnotations(AnnotationBatchSaveRequest)method, will be counted as an update to the annotation with the specified ID.Non-system managed fields may generally be updated unless there are additional restrictions due to annotation type or placemark type. Placemarks and references may also be updated. Any field, placemark, or reference list included using this builder will be counted as an update to the field, placemark, or reference list for that annotation. Replies may be appended to annotation types that support them, but cannot be removed.
- Parameters:
id- the unique ID of the annotation to update- Returns:
- the created
Annotation.Builder
-
newBatchDeleteRequestBuilder
AnnotationBatchDeleteRequest.Builder newBatchDeleteRequestBuilder()Creates a newAnnotationBatchDeleteRequest.Builder.- Returns:
- the created
AnnotationBatchDeleteRequest.Builder
-
newBatchSaveRequestBuilder
AnnotationBatchSaveRequest.Builder newBatchSaveRequestBuilder()Creates a newAnnotationBatchSaveRequest.Builder.- Returns:
- the created
AnnotationBatchSaveRequest.Builder
-
newPlacemarkBuilder
AnnotationPlacemark.Builder newPlacemarkBuilder()Creates a newAnnotationPlacemark.Builder.- Returns:
- the created
AnnotationPlacemark.Builder
-
newReadAnnotationRequestBuilder
AnnotationReadRequest.Builder newReadAnnotationRequestBuilder()Creates a newAnnotationReadRequest.Builder.- Returns:
- the created
AnnotationReadRequest.Builder
-
newReadReplyRequestBuilder
AnnotationReplyReadRequest.Builder newReadReplyRequestBuilder()Creates a newAnnotationReplyReadRequest.Builder.- Returns:
- the created
AnnotationReplyReadRequest.Builder
-
newReferenceBuilder
AnnotationReference.Builder newReferenceBuilder()Creates a newAnnotationReference.Builder.- Returns:
- the created
AnnotationReference.Builder
-