Package gov.lanl.adore.djatoka.openurl

Examples of gov.lanl.adore.djatoka.openurl.ResolverException


                ir = getLocalImage(rftId);
            }
            return ir;
        } catch (Exception e) {
            log.error(e, e);
            throw new ResolverException(e);
        }
    }
View Full Code Here


        String dap = props.getProperty(DSPACE_ASSETPATH);
        if (dap != null) {
            dspace_assetpath = dap;
            imgs = Collections.synchronizedMap(new LinkedHashMap<String, ImageRecord>(16, 0.75f, true));
        } else {
            throw new ResolverException(DSPACE_ASSETPATH + " is not defined.");
        }
    }
View Full Code Here

                            .append(internalId).toString();
        String bitstreamPath = bitstreamPathBuilder.toString();
       
        File bit = new File(bitstreamPath);
        if (!bit.exists())
            throw new ResolverException("An error occurred processing file: " + bitstreamPath);
       
        ImageRecord ir = new ImageRecord(rftId, bitstreamPath);
        imgs.put(rftId, ir);
        return ir;
    }
View Full Code Here

        imgs.put(rftId, ir);
        return ir;
    }
   
    private ImageRecord getRemoteImage(String rftId) throws ResolverException {
        throw new ResolverException("No support for remote images processing: " + rftId);
    }
View Full Code Here

    try {
      java.lang.Class.forName(jdbcDriverName).newInstance();
    } catch (Exception e) {
      log.error("Error when attempting to obtain DB Driver: "
          + jdbcDriverName + " on " + new Date().toString(), e);
      throw new ResolverException(e);
    }

    if (maxActive <= 0)
      maxActive = 50;
    if (maxIdle <= 0)
View Full Code Here

      };
    });

    query = props.getProperty(DEFAULT_DBID + ".query");
    if (query == null)
      throw new ResolverException(DEFAULT_DBID + ".query is not defined in properties");
    try {
        dataSource = DBCPUtils.setupDataSource(DEFAULT_DBID, props);
    } catch (Throwable e) {
      log.error(e,e);
      throw new ResolverException("DBCP Libraries are not in the classpath");
    }
  }
View Full Code Here

        File f = dim.convert(uri);
        ir = new ImageRecord(rftId, f.getAbsolutePath());
        if (f.length() > 0)
          remoteImgs.put(rftId, ir);
        else
          throw new ResolverException(
              "An error occurred processing file:"
                  + uri.toURL().toString());
        } catch (Exception e) {
        log.error("Unable to access " + rftId);
          return null;
View Full Code Here

        try {
            java.lang.Class.forName(jdbcDriverName).newInstance();
        } catch (Exception e) {
            LOGGER.error("Error when attempting to obtain DB Driver: " + jdbcDriverName + " on " +
                    new Date().toString(), e);
            throw new ResolverException(e.getMessage(), e);
        }

        if (maxActive <= 0) {
            maxActive = 50;
        }
View Full Code Here

            image = new ImageRecord(aReferent, imageFile.getAbsolutePath());

            if (imageFile.length() > 0) {
                myRemoteImages.put(aReferent, image);
            } else {
                throw new ResolverException("An error occurred processing file: " + uri.toURL());
            }
        } catch (final Exception details) {
            if (LOGGER.isInfoEnabled()) {
                LOGGER.info("Unable to access {} ({})", aReferent, details.getMessage());
            }
View Full Code Here

TOP

Related Classes of gov.lanl.adore.djatoka.openurl.ResolverException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.