Skip to content

Commit

Permalink
refactor(external iiif url): differentiate between reading and creati…
Browse files Browse the repository at this point in the history
…ng acc. to the api
  • Loading branch information
domsteinbach committed Aug 5, 2024
1 parent ae730a3 commit 5f5dc10
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ export {
CreateDocumentFileValue,
CreateMovingImageFileValue,
CreateStillImageFileValue,
CreateStillImageExternalFileValue,
CreateTextFileValue,
CreateArchiveFileValue
} from "./models/v2/resources/values/create/create-file-value";
Expand Down
1 change: 1 addition & 0 deletions src/models/v2/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ export class Constants {
static StillImageFileValueHasDimX = Constants.KnoraApiV2 + Constants.HashDelimiter + "stillImageFileValueHasDimX";
static StillImageFileValueHasDimY = Constants.KnoraApiV2 + Constants.HashDelimiter + "stillImageFileValueHasDimY";
static StillImageFileValueHasIIIFBaseUrl = Constants.KnoraApiV2 + Constants.HashDelimiter + "stillImageFileValueHasIIIFBaseUrl";
static FileValueHasExternalUrl = Constants.KnoraApiV2 + Constants.HashDelimiter + "fileValueHasExternalUrl";
static StillImageFileValueHasExternalUrl = Constants.KnoraApiV2 + Constants.HashDelimiter + "stillImageFileValueHasExternalUrl";
static AudioFileValueHasDuration = Constants.KnoraApiV2 + Constants.HashDelimiter + "audioFileValueHasDuration";
static MovingImageFileValueHasDimX = Constants.KnoraApiV2 + Constants.HashDelimiter + "movingImageFileValueHasDimX";
Expand Down
4 changes: 3 additions & 1 deletion src/models/v2/resources/values/create/create-file-value.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export class CreateStillImageFileValue extends CreateFileValue {

constructor() {
super(Constants.StillImageFileValue);

}

}
Expand All @@ -65,7 +66,8 @@ export class CreateStillImageFileValue extends CreateFileValue {
*/
@JsonObject("CreateStillImageExternalFileValue")
export class CreateStillImageExternalFileValue extends CreateFileValue {

@JsonProperty(Constants.FileValueHasExternalUrl, String, true)
externalUrl?: string = "";
constructor() {
super(Constants.StillImageExternalFileValue);
}
Expand Down
6 changes: 1 addition & 5 deletions src/models/v2/resources/values/read/read-file-value.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,7 @@ export class ReadStillImageFileValue extends ReadFileValue {
*/
@JsonObject("ReadStillImageExternalFileValue")
export class ReadStillImageExternalFileValue extends ReadFileValue {

@JsonProperty(Constants.StillImageFileValueHasIIIFBaseUrl, UriConverter)
iiifBaseUrl: string = "";

@JsonProperty(Constants.StillImageFileValueHasExternalUrl, UriConverter)
@JsonProperty(Constants.StillImageFileValueHasExternalUrl, UriConverter, true)
externalUrl: string = "";

}
Expand Down
6 changes: 3 additions & 3 deletions src/models/v2/resources/values/update/update-file-value.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ export class UpdateStillImageFileValue extends UpdateFileValue {
*/
@JsonObject("UpdateStillImageExternalFileValue")
export class UpdateExternalStillImageFileValue extends UpdateFileValue {

@JsonProperty(Constants.StillImageFileValueHasExternalUrl, String, true)
externalUrl?: string = "";
constructor() {
super(Constants.StillImageExternalFileValue);
super(Constants.StillImageAbstractFileValue);
}

}


Expand Down

0 comments on commit 5f5dc10

Please sign in to comment.