Class RotationRequest
- java.lang.Object
-
- de.digitalcollections.iiif.model.image.RotationRequest
-
public class RotationRequest extends Object
-
-
Constructor Summary
Constructors Constructor Description RotationRequest(int rotation)RotationRequest(BigDecimal rotation, boolean mirror)Create a new rotation request.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static RotationRequestfromString(String str)Parse a rotation request from an IIIF Image API compliant rotation string.doublegetRotation()inthashCode()booleanisMirror()StringtoString()Create an IIIF Image API compatible rotation string.
-
-
-
Constructor Detail
-
RotationRequest
public RotationRequest(int rotation) throws ResolvingException- Throws:
ResolvingException
-
RotationRequest
public RotationRequest(BigDecimal rotation, boolean mirror) throws ResolvingException
Create a new rotation request.- Parameters:
rotation- Rotation in degrees. Must be between 0 and 360mirror- Mirror the image when rotating- Throws:
ResolvingException- if the rotation degrees are not between 0 and 360
-
-
Method Detail
-
fromString
public static RotationRequest fromString(String str) throws ResolvingException
Parse a rotation request from an IIIF Image API compliant rotation string.- Parameters:
str- iiif image api compliant rotation string- Returns:
- RotationRequest represented by th given string
- Throws:
ResolvingException- if the rotation string is malformed
-
getRotation
public double getRotation()
-
isMirror
public boolean isMirror()
-
toString
public String toString()
Create an IIIF Image API compatible rotation string.
-
-