Esempio n. 1
0
 /**
  * get a binary datastream as String.
  *
  * @param id the id of the resource.
  * @param componentId the id of the component.
  * @return The Stream as String.
  * @throws Exception If the service call fails.
  */
 public String getDatastreamDissimination(final String id, final String componentId)
     throws Exception {
   com.yourmediashelf.fedora.client.FedoraClient restClient = getFedoraRestClient();
   FedoraResponse response =
       com.yourmediashelf.fedora.client.FedoraClient.getDatastreamDissemination(id, componentId)
           .execute(restClient);
   return toString(response.getEntityInputStream());
 }
Esempio n. 2
0
 /**
  * get the fedora describe xml.
  *
  * @return The HttpMethod after the service call .
  * @throws Exception If the service call fails.
  */
 public String describeFedora() throws Exception {
   com.yourmediashelf.fedora.client.FedoraClient restClient = getFedoraRestClient();
   FedoraResponse response =
       com.yourmediashelf.fedora.client.FedoraClient.describeRepository()
           .xml(true)
           .execute(restClient);
   return toString(response.getEntityInputStream());
 }
Esempio n. 3
0
 /**
  * get a resource xml.
  *
  * @param id the id of the resource.
  * @return The FOXML as String.
  * @throws Exception If the service call fails.
  */
 public String export(final String id) throws Exception {
   com.yourmediashelf.fedora.client.FedoraClient restClient = getFedoraRestClient();
   FedoraResponse response =
       com.yourmediashelf.fedora.client.FedoraClient.export(id)
           .format(Constants.FOXML_FORMAT)
           .context("public")
           .execute(restClient);
   return toString(response.getEntityInputStream());
 }