users@jersey.java.net

RE: [Jersey] MediaType-s?

From: Rabick, Mark A (IS) <"Rabick,>
Date: Wed, 19 Aug 2009 14:01:38 -0500

I've got it mostly working using your MediaType builder below but for some reason, returning an NTRIPLE file using .nt as the extension, mapped to text/plain which is the NTRIPLE media type fails. Any ideas?

_______________________________________________
Mark A. Rabick - Software Engineer
Em: mark.rabick_at_ngc.com


> -----Original Message-----
> From: Mike Jones [mailto:mike.a.jones_at_gmail.com]
> Sent: Tuesday, July 14, 2009 2:55 PM
> To: users_at_jersey.dev.java.net
> Subject: Re: [Jersey] MediaType-s?
>
> I've been involved in a project that returns rdf/xml and n3 - like
> marc says, it was simple to define the media type:
>
> public final static String APPLICATION_RDF_XML = "application/rdf+xml";
> public final static MediaType APPLICATION_RDF_XML_TYPE = new
> MediaType("application", "rdf+xml");
>
> Cheers
> Mike
>
> 2009/7/14 Marc Hadley <Marc.Hadley_at_sun.com>:
> > On Jul 14, 2009, at 12:46 PM, Rabick, Mark A (IS) wrote:
> >
> >> Is there a plan to extend javax.ws.rs.core.MediaType with other
> types like
> >> application/rdf+xml?
> >>
> >
> > Not sure what you mean. Do you mean will we be adding additional
> constants
> > to MediaType ? Note that anyone can create a new MediaType constant
> in their
> > code, you don't have to wait for the API to add one. All of the
> constants in
> > the MediaType class are just declared like this:
> >
> >    public final static String APPLICATION_XML = "application/xml";
> >    public final static MediaType APPLICATION_XML_TYPE = new
> > MediaType("application","xml");
> >
> > Marc.
> >
> >> I'm working on returning an ontological model and instance data
> through a
> >> Jersey resource.  Has anyone encountered any issues with this
> media/mime
> >> type?
> >>
> >> --mark
> >>
> >>
> >> _______________________________________________
> >> Mark A. Rabick
> >> Software Engineer
> >> Northrop Grumman - Integrated Mission Systems (IS/DSD/IMS)
> >> 3200 Samson Way
> >> Bellevue, NE  68123
> >> Ph:  (402) 293-7091
> >> Em: mark.rabick_at_ngc.com
> >> Remember PFC Ross A. McGinnis...
> >>  http://www.army.mil/medalofhonor/McGinnis/index.html
> >> ... MA2 Michael A. Monsoor, Lt. Michael P. Murphy, Cpl. Jason
> Dunham, SFC
> >> Paul Ray Smith and the rest...
> >>  http://www.cmohs.org/recipients/most_recent.htm
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> > For additional commands, e-mail: users-help_at_jersey.dev.java.net
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net