Class RotationRequest


  • public class RotationRequest
    extends Object
    • Constructor Detail

      • RotationRequest

        public RotationRequest​(BigDecimal rotation,
                               boolean mirror)
                        throws ResolvingException
        Create a new rotation request.
        Parameters:
        rotation - Rotation in degrees. Must be between 0 and 360
        mirror - 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.
        Overrides:
        toString in class Object
        Returns:
        IIIF Image API compatible rotation string represented by this instance
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object