[OTDev] Needed some help with restlet
Nina Jeliazkova nina at acad.bgTue Jan 26 09:20:16 CET 2010
- Previous message: [OTDev] Needed some help with restlet
- Next message: [OTDev] Needed some help with restlet
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Surajit, Few more notes: surajit ray wrote: > I have tried to implement your idea in the attached example ... > > Whats the mediatype to be used. As you can see I have used > *MODEL_ALL<../../../org/restlet/data/MediaType.html#MODEL_ALL> > * > Not suitable, Model/* is not an RDF mime type > Some other options I thought could also fit would be > *APPLICATION_RDF_XML<../../../org/restlet/data/MediaType.html#APPLICATION_RDF_XML> > Yes, this is the recommendedMime type, Jena model should be serialized with RDF/XML option jenaModel.write(output,"RDF/XML"); > * > *APPLICATION_JAVA_OBJECT<../../../org/restlet/data/MediaType.html#APPLICATION_JAVA_OBJECT> > This is not recommended, besides for internal use for your service. The clients, as well as other webservices, using your web service may not be implemented in Java and will not know how to interpret a Java object. > * > *TEXT_RDF_N3 <../../../org/restlet/data/MediaType.html#TEXT_RDF_N3>** * > Yes, optional, jenaModel.write(output,"N3"); > *TEXT_XML <../../../org/restlet/data/MediaType.html#TEXT_XML>* > Not recommended, this is generic XML and will not tell the client how to interpret the XML Adding to my previous reply, please have a look at OpenTox API 1.1. documentation. There are certainly things to be improved, but the default MIME type is should always be specified. If in doubt, use the mime type, specified as mandatory. Example: http://opentox.org/dev/apis/api-1.1/dataset Supported MIME types: Mandatory: * application/rdf+xml (default) > I must add that there is very little documentation available for the restlet > API. It is very difficult to make out the options and their implications ! > Agree. Mailing lists are so far the best source for information (IMHO). Best regards, Nina > Thanks in advance > surajit > On Tue, Jan 26, 2010 at 1:01 PM, surajit ray <mr.surajit.ray at gmail.com>wrote: > > >> Hi Nina, >> Thanks for the information >> >> Could you please clarify if the outputstreamrepresentation is a class from >> restlet 2.0 >> >> I could not find it in the current stable. There is however a >> Outputrepresentation which is a subclass of Streamrepresentation. Is this >> the one you were referring to ? >> >> As a test I was using this : (see attached java file) >> >> Would it be incorrect to use it as such ? >> >> >> >> >> On Mon, Jan 25, 2010 at 6:30 PM, Nina Jeliazkova <nina at acad.bg> wrote: >> >> >>> surajit ray wrote: >>> >>>> Hi, >>>> I was wondering what type of Representation to use for a Jena model >>>> >>> (within >>> >>>> the Restlet framework ) ? >>>> >>>> >>>> >>> OutputStreamRepresentation and write the model into the output stream. >>> >>> Hope this helps, >>> Nina >>> _______________________________________________ >>> Development mailing list >>> Development at opentox.org >>> http://www.opentox.org/mailman/listinfo/development >>> >>> >> >> -- >> Surajit Ray >> Partner >> www.rareindianart.com >> >> > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Development mailing list > Development at opentox.org > http://www.opentox.org/mailman/listinfo/development
- Previous message: [OTDev] Needed some help with restlet
- Next message: [OTDev] Needed some help with restlet
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Development mailing list