public Url fromIdentifier(String identifier) {
        Matcher matcher = identifierPattern.matcher(identifier);
        if (!matcher.matches()) {
            throw new RuntimeException(String.format("Couldn't parse identifier %s", identifier));
        }

        String resourceType = matcher.group(1);
        if (resourceType != null) {
            resourceType(resourceType);
        }

        String type = matcher.group(2);
        if (type != null) {
            type(type);
        }

        String version = matcher.group(3);
        if (version != null) {
            version(version);
        }

        String publicId = matcher.group(4);
        if (publicId != null) {
            publicId(publicId);
        }

        String format = matcher.group(5);
        if (format != null) {
            format(format);
        }

        // Signature (group 6) is not used

        return this;
    }
public Url fromIdentifier ( String identifier ) { Matcher matcher = identifierPattern . matcher ( identifier ) ; if ( ! matcher . matches ( ) ) { throw new RuntimeException ( String . format ( "Couldn't parse identifier %s" , identifier ) ) ; } String resourceType = matcher . group ( 1 ) ; if ( resourceType != null ) { resourceType ( resourceType ) ; } String type = matcher . group ( 2 ) ; if ( type != null ) { type ( type ) ; } String version = matcher . group ( 3 ) ; if ( version != null ) { version ( version ) ; } String publicId = matcher . group ( 4 ) ; if ( publicId != null ) { publicId ( publicId ) ; } String format = matcher . group ( 5 ) ; if ( format != null ) { format ( format ) ; } return this ; }
Parses a cloudinary identifier of the form:<br>
{@code [<resource_type>/][<image_type>/][v<version>/]<public_id>[.<format>][#<signature>]}