Package com.bhle.access.domain

Examples of com.bhle.access.domain.Derivative


        && datastream.getDsid().equals(getDatastreamId());
  }

  public Derivative deriveInformation(DatastreamWrapper datastream) {
    if (isApplicable(datastream)) {
      Derivative derivative = new Derivative();
      derivative.addConvertor(this);
      derivative.setDsId(getDerivativeId());
      derivative.setPid(datastream.getDigitalObject().getPid());
      derivative.setDatastream(datastream);
      return derivative;
    } else {
      return null;
    }
  }
View Full Code Here


      return null;
    }
  }

  public Derivative derive(DatastreamWrapper datastreamWrapper) {
    Derivative derivative = deriveInformation(datastreamWrapper);
    if (derivative != null) {
      InputStream in = datastreamWrapper.getInputStream();
      derivative.setInputStream(doConvert(in));
      return derivative;
    } else {
      return null;
    }
  }
View Full Code Here

    URI olefHttpUri = StaticURI.toStaticFileUri(olefUri);
    return new Olef(olefHttpUri.toURL());
  }

  public static void save(BookInfo bookInfo) {
    Derivative derivative = new Derivative();
    derivative.setPid(FedoraURI.getPidFromGuid(bookInfo.getGuid()));
    derivative.setDsId(DSID);
    JSONObject json = JSONObject.fromObject(bookInfo);
    InputStream in = IOUtils.toInputStream(json.toString());
    derivative.setInputStream(in);
    storageService.updateDerivative(derivative);
  }
View Full Code Here

    }
    return false;
  }

  public static void save(String guid, InputStream thumbnailInputStream) {
    Derivative derivative = new Derivative();
    derivative.setPid(FedoraURI.getPidFromGuid(guid));
    derivative.setDsId(DSID);
    derivative.setInputStream(thumbnailInputStream);
    storageService.updateDerivative(derivative);
  }
View Full Code Here

  }

  public static Derivative[] derive(DatastreamWrapper datastream) {
    List<Derivative> results = new ArrayList<Derivative>();
    for (DatastreamConverter convertor : converters) {
      Derivative derivative = convertor.derive(datastream);
      if (derivative != null) {
        logger.info("Convert " + datastream.getDigitalObject().getPid()
            + "/" + convertor.getDatastreamId() + " to "
            + convertor.getDerivativeId());
        results.add(derivative);
View Full Code Here

  }

  public static Derivative[] deriveInformation(DatastreamWrapper datastream) {
    List<Derivative> results = new ArrayList<Derivative>();
    for (DatastreamConverter convertor : converters) {
      Derivative derivative = convertor.deriveInformation(datastream);
      if (derivative != null) {
        results.add(derivative);
      }
    }
    return results.toArray(new Derivative[] {});
View Full Code Here

TOP

Related Classes of com.bhle.access.domain.Derivative

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.