Skip to content

Commit

Permalink
Merge pull request #10 from Riksarkivet/pr-imageservice3-and-referenc…
Browse files Browse the repository at this point in the history
…e2and3

Support for ImageService3
  • Loading branch information
donaldgray authored May 12, 2022
2 parents 9cb062e + 5366a4b commit 365a7cd
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
37 changes: 37 additions & 0 deletions src/IIIF/IIIF/ImageApi/Service/ImageService3.cs
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; }
}
}
14 changes: 14 additions & 0 deletions src/IIIF/IIIF/Presentation/V2/ImageService2Reference.cs
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();
}
}
}
9 changes: 9 additions & 0 deletions src/IIIF/IIIF/Presentation/V3/ImageService3Reference.cs
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);
}
}

0 comments on commit 365a7cd

Please sign in to comment.