public class DiscoveryAnnotationStoreClient extends DiscoveryAnnotationStore
assetGUID, discoveryReportGUID, userId| Constructor and Description |
|---|
DiscoveryAnnotationStoreClient(String userId,
String assetGUID,
String discoveryReportGUID,
DiscoveryEngineClient discoveryEngineClient)
Constructor sets up the key parameters for accessing the annotations store.
|
| Modifier and Type | Method and Description |
|---|---|
String |
addAnnotationToAnnotation(String anchorAnnotationGUID,
Annotation annotation)
Add a new annotation and link it to an existing annotation.
|
String |
addAnnotationToDataField(String anchorDataFieldGUID,
Annotation annotation)
Add a new annotation and link it to an existing data field.
|
String |
addAnnotationToDiscoveryReport(Annotation annotation)
Add a new annotation to the annotation store as a top level annotation linked directly off of the report.
|
String |
addDataFieldToDataField(String anchorDataFieldGUID,
DataField dataField)
Add a new data field and link it to an existing data field.
|
String |
addDataFieldToDiscoveryReport(String annotationGUID,
DataField dataField)
Add a new data field to the Annotation store linked off of an annotation (typically SchemaAnalysisAnnotation).
|
void |
deleteAnnotation(String annotationGUID)
Remove an annotation from the annotation store.
|
void |
deleteDataField(String dataFieldGUID)
Remove a data field from the annotation store.
|
Annotation |
getAnnotation(String annotationGUID)
Return a specific annotation stored in the annotation store (previous or new).
|
DataField |
getDataField(String dataFieldGUID)
Return a specific data field stored in the annotation store (previous or new).
|
List<Annotation> |
getExtendedAnnotations(String annotationGUID,
int startingFrom,
int maximumResults)
Return any annotations attached to this annotation.
|
List<DataField> |
getNestedDataFields(String anchorDataFieldGUID,
int startingFrom,
int maximumResults)
Return any annotations attached to this annotation.
|
List<Annotation> |
getNewAnnotationsForAsset(int startingFrom,
int maximumResults)
Return the current list of annotations for this discovery run.
|
List<Annotation> |
getNewDataFieldsForAsset(int startingFrom,
int maximumResults)
Return the current list of data fields for this discovery run.
|
List<Annotation> |
getPreviousAnnotationsForAsset(AnnotationStatus status,
int startingFrom,
int maximumResults)
Return the list of annotations from previous runs of the discovery service that are set to a specific status.
|
List<Annotation> |
getPreviousAnnotationsForAsset(int startingFrom,
int maximumResults)
Return the list of Annotations created for the asset by previous runs of the discovery service.
|
List<DataField> |
getPreviousDataFieldsForAsset(int startingFrom,
int maximumResults)
Return the list of data fields from previous runs of the discovery service.
|
void |
linkAnnotation(String anchorGUID,
String annotationGUID)
Link an existing annotation to another object.
|
void |
unlinkAnnotation(String anchorGUID,
String annotationGUID)
Remove the relationship between an annotation and another object.
|
Annotation |
updateAnnotation(Annotation annotation)
Replace the current properties of an annotation.
|
DataField |
updateDataField(DataField dataField)
Replace the current properties of a data field.
|
public DiscoveryAnnotationStoreClient(String userId, String assetGUID, String discoveryReportGUID, DiscoveryEngineClient discoveryEngineClient)
userId - calling userassetGUID - unique identifier of the asset that the annotations should be attached todiscoveryReportGUID - unique identifier of the discovery request that is used to identifier the
discovery report.discoveryEngineClient - client for calling REST APIspublic List<Annotation> getPreviousAnnotationsForAsset(int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getPreviousAnnotationsForAsset in class DiscoveryAnnotationStorestartingFrom - starting position in the list.maximumResults - maximum number of elements that can be returnedInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem retrieving annotations from the annotation store.public List<Annotation> getPreviousAnnotationsForAsset(AnnotationStatus status, int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getPreviousAnnotationsForAsset in class DiscoveryAnnotationStorestatus - status value to use on the querystartingFrom - starting position in the list.maximumResults - maximum number of elements that can be returnedInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem retrieving annotations from the annotation store.public List<Annotation> getNewAnnotationsForAsset(int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getNewAnnotationsForAsset in class DiscoveryAnnotationStorestartingFrom - starting position in the list.maximumResults - maximum number of elements that can be returnedInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem retrieving annotations from the annotation store.public List<Annotation> getExtendedAnnotations(String annotationGUID, int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getExtendedAnnotations in class DiscoveryAnnotationStoreannotationGUID - anchor annotationstartingFrom - starting position in the listmaximumResults - maximum number of annotations that can be returned.InvalidParameterException - one of the parameters is null or invalid.UserNotAuthorizedException - user not authorized to issue this request.PropertyServerException - there was a problem that occurred within the property server.public Annotation getAnnotation(String annotationGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getAnnotation in class DiscoveryAnnotationStoreannotationGUID - unique identifier of the annotationInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem retrieving the annotation from the annotation store.public String addAnnotationToDiscoveryReport(Annotation annotation) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
addAnnotationToDiscoveryReport in class DiscoveryAnnotationStoreannotation - annotation objectInvalidParameterException - the annotation is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem adding the annotation to the annotation store.public String addAnnotationToAnnotation(String anchorAnnotationGUID, Annotation annotation) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
addAnnotationToAnnotation in class DiscoveryAnnotationStoreanchorAnnotationGUID - unique identifier of the annotation that this new one is to be attached toannotation - annotation objectInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem saving annotations in the annotation store.public void linkAnnotation(String anchorGUID, String annotationGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
linkAnnotation in class DiscoveryAnnotationStoreanchorGUID - unique identifier that the annotation is to be linked toannotationGUID - unique identifier of the annotationInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem updating annotations in the annotation store.public void unlinkAnnotation(String anchorGUID, String annotationGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
unlinkAnnotation in class DiscoveryAnnotationStoreanchorGUID - unique identifier that the annotation is to be unlinked fromannotationGUID - unique identifier of the annotationInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem updating annotations in the annotation store.public Annotation updateAnnotation(Annotation annotation) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
updateAnnotation in class DiscoveryAnnotationStoreannotation - new propertiesInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem updating the annotation in the annotation store.public void deleteAnnotation(String annotationGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
deleteAnnotation in class DiscoveryAnnotationStoreannotationGUID - unique identifier of the annotationInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem deleting the annotation from the annotation store.public List<DataField> getPreviousDataFieldsForAsset(int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getPreviousDataFieldsForAsset in class DiscoveryAnnotationStorestartingFrom - starting position in the list.maximumResults - maximum number of elements that can be returnedInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem retrieving data fields from the annotation store.public List<Annotation> getNewDataFieldsForAsset(int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getNewDataFieldsForAsset in class DiscoveryAnnotationStorestartingFrom - starting position in the list.maximumResults - maximum number of elements that can be returnedInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem retrieving data fields from the annotation store.public List<DataField> getNestedDataFields(String anchorDataFieldGUID, int startingFrom, int maximumResults) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getNestedDataFields in class DiscoveryAnnotationStoreanchorDataFieldGUID - anchor data field identifierstartingFrom - starting position in the listmaximumResults - maximum number of annotations that can be returned.InvalidParameterException - one of the parameters is null or invalid.UserNotAuthorizedException - user not authorized to issue this request.PropertyServerException - there was a problem that occurred within the property server.public DataField getDataField(String dataFieldGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
getDataField in class DiscoveryAnnotationStoredataFieldGUID - unique identifier of the data fieldInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem retrieving the data field from the annotation store.public String addDataFieldToDiscoveryReport(String annotationGUID, DataField dataField) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
addDataFieldToDiscoveryReport in class DiscoveryAnnotationStoreannotationGUID - unique identifier of the annotation that the data field is to be linked todataField - dataField objectInvalidParameterException - the dataField is invalid or the annotation GUID points to an annotation
that can not be associated with a data field.UserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem adding the data field to the Annotation store.public String addDataFieldToDataField(String anchorDataFieldGUID, DataField dataField) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
addDataFieldToDataField in class DiscoveryAnnotationStoreanchorDataFieldGUID - unique identifier of the data field that this new one is to be attached todataField - data field objectInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem saving data fields in the annotation store.public String addAnnotationToDataField(String anchorDataFieldGUID, Annotation annotation) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
addAnnotationToDataField in class DiscoveryAnnotationStoreanchorDataFieldGUID - unique identifier of the data field that this new one is to be attached toannotation - data field objectInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem saving data fields in the annotation store.public DataField updateDataField(DataField dataField) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
updateDataField in class DiscoveryAnnotationStoredataField - new propertiesInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem updating the data field in the annotation store.public void deleteDataField(String dataFieldGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
deleteDataField in class DiscoveryAnnotationStoredataFieldGUID - unique identifier of the data fieldInvalidParameterException - one of the parameters is invalidUserNotAuthorizedException - the user id not authorized to issue this requestPropertyServerException - there was a problem deleting the data field from the annotation store.Copyright © 2018–2019 ODPi. All rights reserved.