src/main/java/org/globalbioticinteractions/doi/DOI.java
/**
     * Creates a DOI from a well-formed DOI URI, decoding DOIs when necessary.
     * <p>
     * For instance, an URI https://doi.org/10.1000/456%23789 results in a doi 10.1000/456#789 .
     *
     * @param doiURI a well-formed DOI URI
     * @return well-formed DOI
     * @throws MalformedDOIException on malformed DOI (e.g., 9.123/2432)
     */


@param doiURI a well-formed DOI URI
@return well-formed DOI
@throws MalformedDOIException on malformed DOI
@param doiURI a well - formed DOI URI @return well - formed DOI @throws MalformedDOIException on malformed DOI
public static DOI create(URI doiURI) throws MalformedDOIException {
        String path = doiURI == null ? "" : doiURI.getPath();
        int i = path.indexOf('/');
        if (i != 0) {
            throw new MalformedDOIException("path [" + path + "] does not start with [/]");
        }
        return getDOI(path.substring(1));
    }
public static DOI create ( URI doiURI ) throws MalformedDOIException { String path = doiURI == null ? "" : doiURI . getPath ( ) ; int i = path . indexOf ( '/' ) ; if ( i != 0 ) { throw new MalformedDOIException ( "path [" + path + "] does not start with [/]" ) ; } return getDOI ( path . substring ( 1 ) ) ; }
Creates a DOI from a well-formed DOI URI, decoding DOIs when necessary.
Creates a DOI from a well - formed DOI URI decoding DOIs when necessary .