@@ -60,8 +60,8 @@ public static SafeUri createRepresentationDownloadUri(String aipId, String repre
6060 // api/v2/{aip_id}/representations/{representation_id}/binary
6161 StringBuilder b = new StringBuilder ();
6262 // base uri
63- b .append (RodaConstants .API_REST_V2_AIPS ).append (URL .encodeQueryString (aipId ))
64- .append (RodaConstants .API_SEP ). append ( RodaConstants . AIP_REPRESENTATIONS ).append (RodaConstants .API_SEP )
63+ b .append (RodaConstants .API_REST_V2_AIPS ).append (URL .encodeQueryString (aipId )). append ( RodaConstants . API_SEP )
64+ .append (RodaConstants .AIP_REPRESENTATIONS ).append (RodaConstants .API_SEP )
6565 .append (URL .encodeQueryString (representationId )).append (RodaConstants .API_REST_V2_DOWNLOAD_HANDLER );
6666
6767 return UriUtils .fromSafeConstant (b .toString ());
@@ -72,8 +72,8 @@ public static SafeUri createRepresentationOtherMetadataDownloadUri(String aipId,
7272 // api/v2/aip/{aip_id}/representations/{representation_id}/other-metadata/binary
7373 StringBuilder b = new StringBuilder ();
7474 // base uri
75- b .append (RodaConstants .API_REST_V2_AIPS ).append (URL .encodeQueryString (aipId ))
76- .append (RodaConstants .API_SEP ). append ( RodaConstants . AIP_REPRESENTATIONS ).append (RodaConstants .API_SEP )
75+ b .append (RodaConstants .API_REST_V2_AIPS ).append (URL .encodeQueryString (aipId )). append ( RodaConstants . API_SEP )
76+ .append (RodaConstants .AIP_REPRESENTATIONS ).append (RodaConstants .API_SEP )
7777 .append (URL .encodeQueryString (representationId )).append (RodaConstants .API_REST_V2_REPRESENTATION_OTHER_METADATA )
7878 .append (RodaConstants .API_REST_V2_REPRESENTATION_BINARY );
7979
@@ -84,20 +84,22 @@ public static SafeUri createRepresentationOtherMetadataDownloadUri(String aipId,
8484 return UriUtils .fromSafeConstant (b .toString ());
8585 }
8686
87- public static SafeUri createRepresentationFilePreviewUri (String fileUuid , boolean contentDispositionInline ) {
87+ public static SafeUri createRepresentationFilePreviewUri (String fileUuid , boolean contentDispositionInline ) {
8888 // api/v2/files/{file_uuid}/preview
8989 String b = RodaConstants .API_REST_V2_FILES + URL .encodeQueryString (fileUuid )
90- + RodaConstants .API_REST_V2_PREVIEW_HANDLER ;
90+ + RodaConstants .API_REST_V2_PREVIEW_HANDLER + RodaConstants .API_QUERY_START + RodaConstants .API_QUERY_PARAM_INLINE
91+ + RodaConstants .API_QUERY_ASSIGN_SYMBOL + contentDispositionInline ;
9192
9293 return UriUtils .fromSafeConstant (b );
9394 }
9495
95- public static SafeUri createRepresentationFileDownloadUri (String fileUuid ){
96- // api/v2/files/{file_uuid}/download
97- StringBuilder b = new StringBuilder ();
98- b .append (RodaConstants .API_REST_V2_FILES ).append (URL .encodeQueryString (fileUuid )).append (RodaConstants .API_REST_V2_DOWNLOAD_HANDLER );
96+ public static SafeUri createRepresentationFileDownloadUri (String fileUuid ) {
97+ // api/v2/files/{file_uuid}/download
98+ StringBuilder b = new StringBuilder ();
99+ b .append (RodaConstants .API_REST_V2_FILES ).append (URL .encodeQueryString (fileUuid ))
100+ .append (RodaConstants .API_REST_V2_DOWNLOAD_HANDLER );
99101
100- return UriUtils .fromSafeConstant (b .toString ());
102+ return UriUtils .fromSafeConstant (b .toString ());
101103 }
102104
103105 public static SafeUri createDipDownloadUri (String dipUUID ) {
@@ -120,7 +122,7 @@ public static SafeUri createDipFilePreviewUri(String dipFileUUID, boolean conten
120122 return UriUtils .fromSafeConstant (b .toString ());
121123 }
122124
123- public static SafeUri createDipFileDownloadUri (String dipFileUUID ){
125+ public static SafeUri createDipFileDownloadUri (String dipFileUUID ) {
124126 // api/v2/dip-files/{file_uuid}/download
125127 StringBuilder b = new StringBuilder ();
126128 b .append (RodaConstants .API_REST_V2_DIPFILES ).append (URL .encodeQueryString (dipFileUUID ))
0 commit comments