class DOIIdentifierProvider extends IdentifierProvider {

    public String getDOIByObject(Context context, DSpaceObject dso)
            throws SQLException
    {
//        String sql = "SELECT * FROM Doi WHERE resource_type_id = ? " +
//                "AND resource_id = ? AND ((status != ? AND status != ?) OR status IS NULL)";

        DOI doiRow = doiService.findDOIByDSpaceObject(context, dso, Arrays.asList(DELETED, TO_BE_DELETED));
        if (null == doiRow)
        {
            return null;
        }

        if (doiRow.getDoi() == null)
        {
            log.error("A DOI with an empty doi column was found in the database. DSO-Type: "
                    + contentServiceFactory.getDSpaceObjectService(dso).getTypeText(dso) + ", ID: " + dso.getID() + ".");
            throw new IllegalStateException("A DOI with an empty doi column " +
                    "was found in the database. DSO-Type: " + contentServiceFactory.getDSpaceObjectService(dso).getTypeText(dso) + 
                    ", ID: " + dso.getID() + ".");
        }
        
        return DOI.SCHEME + doiRow.getDoi();
    }

    protected  DOIIdentifierProvider();

}