@ JsonCreator public static RotationRequest fromString ( String str ) throws ResolvingException { Matcher matcher = PATTERN . matcher ( str ) ; if ( ! matcher . matches ( ) ) { throw new ResolvingException ( "Bad format: " + str ) ; } return new RotationRequest ( new BigDecimal ( matcher . group ( 2 ) ) , ! ( matcher . group ( 1 ) == null ) ) ; }
Parse a rotation request from an IIIF Image API compliant rotation string .