Class ImageApiSelector
- java.lang.Object
-
- de.digitalcollections.iiif.model.image.ImageApiSelector
-
-
Constructor Summary
Constructors Constructor Description ImageApiSelector()
-
Method Summary
-
-
-
Field Detail
-
CONTEXT
public static String CONTEXT
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getContext
public String getContext()
-
getType
public String getType()
-
fromImageApiUri
public static ImageApiSelector fromImageApiUri(URI imageApiUri) throws ResolvingException
- Throws:
ResolvingException
-
fromString
public static ImageApiSelector fromString(String str) throws ResolvingException
- Throws:
ResolvingException
-
getCanonicalForm
public String getCanonicalForm(Dimension nativeSize, ImageApiProfile profile, ImageApiProfile.Quality defaultQuality) throws ResolvingException
Create the canonical of the Image API request.See http://iiif.io/api/image/2.1/#canonical-uri-syntax- Parameters:
nativeSize- Native size of the image the selector is applied toprofile- Image API profile useddefaultQuality- The native/default quality of the image the selector is applied to- Returns:
- The canonical form of the Image API request
- Throws:
ResolvingException- if RegionRequest can not be instantiated from canonical form of region
-
getIdentifier
public String getIdentifier()
-
setIdentifier
public void setIdentifier(String identifier)
-
getRegion
public RegionRequest getRegion()
-
setRegion
public void setRegion(RegionRequest region)
-
setRegion
public void setRegion(String region) throws ResolvingException
- Throws:
ResolvingException
-
getSize
public SizeRequest getSize()
-
setSize
public void setSize(SizeRequest size)
-
setSize
public void setSize(String size) throws ResolvingException
- Throws:
ResolvingException
-
getRotation
public RotationRequest getRotation()
-
setRotation
public void setRotation(RotationRequest rotation)
-
setRotation
public void setRotation(String rotation) throws ResolvingException
- Throws:
ResolvingException
-
getQuality
public ImageApiProfile.Quality getQuality()
-
setQuality
public void setQuality(ImageApiProfile.Quality quality)
-
getFormat
public ImageApiProfile.Format getFormat()
-
setFormat
public void setFormat(ImageApiProfile.Format format)
-
-