Examples of RiSearchResponse


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

        + "> " + "or $object <dc:identifier> " + "'" + pid + "')";

    logger.debug(query);

    try {
      RiSearchResponse riSearchResponse = FedoraClient.riSearch(query)
          .lang("itql").format("csv").type("tuples").execute(client);
      String csv = IOUtils.toString(riSearchResponse
          .getEntityInputStream());
      String[] pids = CsvUtil.readOneColumnCsv(csv);
      for (String memberPid : pids) {
        purge(memberPid.split("/")[1]);
      }
View Full Code Here

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

  private String[] getAllMemberOfGuid(String guid) {
    String query = "select $object from <#ri> "
        + "where ($object <fedora-rels-ext:isMemberOf> <fedora:" + guid
        + "> " + "or $object <dc:identifier> " + "'" + guid + "')";
    try {
      RiSearchResponse riSearchResponse = FedoraClient.riSearch(query)
          .lang("itql").format("csv").type("tuples").execute(client);
      String csv = IOUtils.toString(riSearchResponse
          .getEntityInputStream());
      return CsvUtil.readOneColumnCsv(csv);
    } catch (FedoraClientException e) {
      e.printStackTrace();
    } catch (IOException e) {
View Full Code Here

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

        + "where ($object <fedora-rels-ext:isMemberOf> <fedora:" + pid
        + "> " + "and $object <fedora-model:hasModel> <info:fedora/"
        + contentModel + ">)";

    try {
      RiSearchResponse riSearchResponse = FedoraClient.riSearch(query)
          .lang("itql").format("csv").type("tuples").execute(client);
      String csv = IOUtils.toString(riSearchResponse
          .getEntityInputStream());
      return CsvUtil.readOneColumnCsv(csv);
    } catch (FedoraClientException e) {
      e.printStackTrace();
    } catch (IOException e) {
View Full Code Here

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

    String query = "select $object from <#ri> "
        + "where ($object <fedora-rels-ext:isMemberOf> <fedora:" + pid
        + "> " + "or $object <dc:identifier> " + "'" + pid + "')";

    try {
      RiSearchResponse riSearchResponse = FedoraClient.riSearch(query)
          .lang("itql").format("csv").type("tuples").execute(client);
      String csv = IOUtils.toString(riSearchResponse
          .getEntityInputStream());
      return CsvUtil.readOneColumnCsv(csv);
    } catch (FedoraClientException e) {
      e.printStackTrace();
    } catch (IOException e) {
View Full Code Here

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

  public static String[] getAllInstances(String contentModel) {
    String query = "select $object from <#ri> "
        + "where $object <fedora-model:hasModel> <info:fedora/"
        + contentModel + ">";
    try {
      RiSearchResponse riSearchResponse = FedoraClient.riSearch(query)
          .lang("itql").format("csv").type("tuples").execute(client);
      String csv = IOUtils.toString(riSearchResponse
          .getEntityInputStream());
      return CsvUtil.readOneColumnCsv(csv);
    } catch (FedoraClientException e) {
      e.printStackTrace();
    } catch (IOException e) {
View Full Code Here

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

        + pid
        + "> "
        + "minus $object <fedora-model:hasModel> <info:fedora/bhle-cmodel:pageCModel>";

    try {
      RiSearchResponse riSearchResponse = FedoraClient.riSearch(query)
          .lang("itql").format("csv").type("tuples").execute(client);
      String csv = IOUtils.toString(riSearchResponse
          .getEntityInputStream());
      return csv;
    } catch (FedoraClientException e) {
      e.printStackTrace();
    } catch (IOException e) {
View Full Code Here

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

  public static String getParent(String pid) {
    String query = "select $object from <#ri> " + "where <fedora:" + pid
        + "> <fedora-rels-ext:isMemberOf> $object";

    try {
      RiSearchResponse riSearchResponse = FedoraClient.riSearch(query)
          .lang("itql").format("csv").type("tuples").execute(client);
      String csv = IOUtils.toString(riSearchResponse
          .getEntityInputStream());
      return csv;
    } catch (FedoraClientException e) {
      e.printStackTrace();
    } catch (IOException e) {
View Full Code Here

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

        + "or $object <fedora-model:hasModel> <info:fedora/bhle-cmodel:volumeCModel> "
        + "or $object <fedora-model:hasModel> <info:fedora/bhle-cmodel:chapterCModel> "
        + "or $object <fedora-model:hasModel> <info:fedora/bhle-cmodel:articleCModel>";

    try {
      RiSearchResponse riSearchResponse = FedoraClient.riSearch(query)
          .lang("itql").format("csv").type("tuples").execute(client);
      String csv = IOUtils.toString(riSearchResponse
          .getEntityInputStream());
      return CsvUtil.readOneColumnCsv(csv);
    } catch (FedoraClientException e) {
      e.printStackTrace();
    } catch (IOException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.