-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from Riksarkivet/pr-imageservice3-and-referenc…
…e2and3 Support for ImageService3
- Loading branch information
Showing
3 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using IIIF.Presentation.V3; | ||
using Newtonsoft.Json; | ||
using System.Collections.Generic; | ||
|
||
namespace IIIF.ImageApi.Service | ||
{ | ||
public class ImageService3 : ResourceBase, IService | ||
{ | ||
public const string Image3Context = "http://iiif.io/api/image/3/context.json"; | ||
public const string ImageProtocol = "http://iiif.io/api/image"; | ||
|
||
public ImageService3() | ||
{ | ||
Context = Image3Context; | ||
} | ||
|
||
public override string Type => nameof(ImageService3); | ||
|
||
[JsonProperty(Order = 3)] | ||
public string Protocol => ImageProtocol; | ||
|
||
[JsonProperty(Order = 11)] | ||
public int Width { get; set; } | ||
|
||
[JsonProperty(Order = 12)] | ||
public int Height { get; set; } | ||
|
||
[JsonProperty(Order = 13)] | ||
public List<Size> Sizes { get; set; } | ||
|
||
[JsonProperty(Order = 14)] | ||
public List<Tile> Tiles { get; set; } | ||
|
||
[JsonProperty(Order = 30)] | ||
public List<string> ExtraFeatures { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using IIIF.ImageApi.Service; | ||
using System; | ||
|
||
namespace IIIF.Presentation.V2 | ||
{ | ||
public class ImageService2Reference : ResourceBase, IService | ||
{ | ||
public override string Type | ||
{ | ||
get => nameof(ImageService2); | ||
set => throw new NotImplementedException(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using IIIF.ImageApi.Service; | ||
|
||
namespace IIIF.Presentation.V3 | ||
{ | ||
public class ImageService3Reference : ResourceBase, IService | ||
{ | ||
public override string Type => nameof(ImageService3); | ||
} | ||
} |