[Mulgara-dev] Mulgara 2.0.7 - support for sparql?

Agustina Martinez amgcia at gmail.com
Tue Feb 10 14:41:13 UTC 2009


Cool! Really easy, lots of thanks!

Regards,
Agustina

2009/2/10 Paul Gearon <gearon at ieee.org>

> On Tue, Feb 10, 2009 at 3:19 AM, Agustina Martinez <amgcia at gmail.com>
> wrote:
> > Lots of thanks Paul!!! The real thing is that I was pretending to pass
> the
> > data directly from the results obtained from the REST call to Fedora
> API-A
> > to obtain directly the RDF, but I didn't know how to, thats why I thought
> on
> > copying the response to a file and after that call the service using POST
> > request. But it really less efficient I think. Maybe your Calais trick
> can
> > apply to the rdf obtained as a string from the Fedora GET methods :-).
>
> Sure. Instead of filling the entity for the "post" with a FileBody,
> you use your own class. You just have to extend StringBody and
> override the getFilename method:
>
> import java.nio.charset.Charset;
> import org.apache.http.entity.mime.content.StringBody;
>
> static class DataBody extends StringBody {
>  private String name;
>
>  public DataBody(String text, String name) throws
> UnsupportedEncodingException {
>    super(text, Charset.forName("UTF-8"););
>    this.name = name;
>  }
>
>  public String getFilename() {
>    return name;
>  }
> }
>
>
> Regards,
> Paul
> _______________________________________________
> Mulgara-dev mailing list
> Mulgara-dev at mulgara.org
> http://mulgara.org/mailman/listinfo/mulgara-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mulgara.org/pipermail/mulgara-dev/attachments/20090210/4a999112/attachment.htm>


More information about the Mulgara-dev mailing list