Package com.yourmediashelf.fedora.client.response

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


  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

        + "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

    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

  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

        + 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

  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

        + "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

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

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.