public PutResult putAnnotations ( List < Annotation > annotations ) throws IOException , TokenExpiredException { String requestUrl = COLLECTION_RESOURCE + RESOURCE ; ArgusResponse response = getClient ( ) . executeHttpRequest ( ArgusHttpClient . RequestType . POST , requestUrl , annotations ) ; assertValidResponse ( response , requestUrl ) ; Map < String , Object > map = fromJson ( response . getResult ( ) , new TypeReference < Map < String , Object > > ( ) { } ) ; List < String > errorMessages = ( List < String > ) map . get ( "Error Messages" ) ; return new PutResult ( String . valueOf ( map . get ( "Success" ) ) , String . valueOf ( map . get ( "Errors" ) ) , errorMessages ) ; }
Submits annotations .