Package com.yourmediashelf.fedora.client.response

Examples of com.yourmediashelf.fedora.client.response.FindObjectsResponse


        .getBean("fedoraClient");

    List<String> pids = new LinkedList<String>();
    String token = null;
    do {
      FindObjectsResponse findObjectsResponse = null;
      try {
        findObjectsResponse = FedoraClient.findObjects().terms(query)
            .pid().sessionToken(token)
            .maxResults(Integer.MAX_VALUE).execute(client);
      } catch (FedoraClientException e) {
        e.printStackTrace();
      }
      pids.addAll(findObjectsResponse.getPids());
      token = findObjectsResponse.getToken();
    } while (token != null && !token.equals(""));

    System.out.println("Objects (count: " + pids.size() + "):");
    for (String pid : pids) {
      System.out.println(pid);
View Full Code Here


  public static List<String> getAllObjectsPids() {
    List<String> pids = new LinkedList<String>();
    String token = null;

    do {
      FindObjectsResponse findObjectsResponse = null;
      try {
        findObjectsResponse = FedoraClient.findObjects().terms("*")
            .pid().sessionToken(token)
            .maxResults(Integer.MAX_VALUE).execute(client);
      } catch (FedoraClientException e) {
        e.printStackTrace();
      }
      pids.addAll(findObjectsResponse.getPids());
      token = findObjectsResponse.getToken();
    } while (token != null && !token.equals(""));

    return pids;
  }
View Full Code Here

                        m_logger.error("Can't construct PID from filename, skipping [" + sipFile.getName() + "]");
                        continue;
                    }

                    // check if item already exists, if yes skip it
                    FindObjectsResponse findObjectsResponse = FedoraClient.findObjects().pid().query(URLEncoder.encode("pid=" + pid, "UTF-8")).execute(m_fedoraClient);
                    List<String> pids = findObjectsResponse.getPids();
                    if( !pids.isEmpty() ) {
                        m_logger.info("PID already found in Fedora, skipping [" + sipFile.getName() + "/" + pid + "]");
                        continue;
                    }
View Full Code Here

TOP

Related Classes of com.yourmediashelf.fedora.client.response.FindObjectsResponse

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.