Esempio n. 1
0
 @Override
 public void setFilesPublic(String pid, boolean isFilesPublic) {
   FedoraObjectDAOImpl dao = new FedoraObjectDAOImpl();
   FedoraObject item = dao.getSingleByName(pid);
   item.setFilesPublic(new Boolean(isFilesPublic));
   dao.update(item);
 }
Esempio n. 2
0
 @Override
 public boolean isFilesPublic(String pid) {
   boolean isFilesPublic = false;
   FedoraObjectDAOImpl dao = new FedoraObjectDAOImpl();
   FedoraObject item = dao.getSingleByName(pid);
   Boolean filesPublicObj = item.isFilesPublic();
   if (filesPublicObj != null) {
     isFilesPublic = filesPublicObj.booleanValue();
   }
   return isFilesPublic;
 }
Esempio n. 3
0
 /**
  * getItemByName
  *
  * <p>Gets the fedora object given the pid
  *
  * <pre>
  * Version	Date		Developer				Description
  * 0.1		26/04/2012	Genevieve Turner (GT)	Initial
  * 0.2		02/05/2012	Genevieve Turner (GT)	Updated to fix issue with url encoded pid
  * 0.3		08/05/2012	Genevieve Turner (GT)	Updated to use newly created util decode function
  * </pre>
  *
  * @param id The fedora object pid
  * @return Returns the FedoraObject of the given pid
  */
 @Override
 public FedoraObject getItemByPid(String pid) {
   String decodedPid = null;
   decodedPid = Util.decodeUrlEncoded(pid);
   if (decodedPid == null) {
     return null;
   }
   FedoraObjectDAOImpl object = new FedoraObjectDAOImpl();
   FedoraObject item = object.getSingleByName(decodedPid);
   if (item != null) {
     LOGGER.trace("Retrieved item {}", item.getObject_id());
   }
   return item;
 }
Esempio n. 4
0
 @Override
 public List<FedoraObject> getAllPublishedAndPublic() {
   FedoraObjectDAOImpl dao = new FedoraObjectDAOImpl();
   return dao.getAllPublishedAndPublic();
 }