Package org.apache.wink.common.model.atom

Examples of org.apache.wink.common.model.atom.AtomEntry


        Unmarshaller unmarshaller = AtomEntry.getUnmarshaller();
        InputStreamReader reader =
            new InputStreamReader(entityStream, ProviderUtils.getCharset(mediaType));
        Object object = AtomJAXBUtils.unmarshal(unmarshaller, reader);
        AtomEntry entry = null;
        if (object instanceof AtomEntry) {
            entry = (AtomEntry)object;
        } else {
            logger.error("request entity is not an atom entry (it was unmarshalled as {})", object
                .getClass());
View Full Code Here


                              MediaType mediaType,
                              MultivaluedMap<String, String> httpHeaders,
                              InputStream entityStream) throws IOException, WebApplicationException {
        MessageBodyReader<AtomEntry> reader =
            providers.getMessageBodyReader(AtomEntry.class, genericType, annotations, mediaType);
        AtomEntry entry =
            reader.readFrom(AtomEntry.class,
                            genericType,
                            annotations,
                            mediaType,
                            httpHeaders,
                            entityStream);
        return entry.toSynd(new SyndEntry());
    }
View Full Code Here

                        Type genericType,
                        Annotation[] annotations,
                        MediaType mediaType,
                        MultivaluedMap<String, Object> httpHeaders,
                        OutputStream entityStream) throws IOException, WebApplicationException {
        AtomEntry entry = new AtomEntry(t);
        MessageBodyWriter<AtomEntry> writer =
            providers.getMessageBodyWriter(AtomEntry.class, genericType, annotations, mediaType);

        writer.writeTo(entry,
                       AtomEntry.class,
View Full Code Here

        @GET
        @Path("atomentry")
        @Produces("application/json")
        public AtomEntry getAtomEntry() throws IOException {
            AtomEntry entry = AtomEntry.unmarshal(new StringReader(ENTRY_STR));
            return entry;
        }
View Full Code Here

        @GET
        @Path("atomentryelement")
        @Produces("application/json")
        public JAXBElement<AtomEntry> getAtomEntryElement() throws IOException {
            AtomEntry entry = AtomEntry.unmarshal(new StringReader(ENTRY_STR));
            org.apache.wink.common.model.atom.ObjectFactory of =
                new org.apache.wink.common.model.atom.ObjectFactory();
            return of.createEntry(entry);
        }
View Full Code Here

        @GET
        @Path("atomsyndentry")
        @Produces("application/json")
        public SyndEntry getSyndEntry() throws IOException {
            AtomEntry entry = AtomEntry.unmarshal(new StringReader(ENTRY_STR));
            return entry.toSynd(new SyndEntry());
        }
View Full Code Here

                                           Annotation[] annotations,
                                           MediaType mediaType,
                                           MultivaluedMap<String, String> httpHeaders,
                                           InputStream entityStream) throws IOException,
        WebApplicationException {
        AtomEntry entry =
            readEntry(AtomEntry.class,
                      genericType,
                      annotations,
                      mediaType,
                      httpHeaders,
View Full Code Here

                        Type genericType,
                        Annotation[] annotations,
                        MediaType mediaType,
                        MultivaluedMap<String, Object> httpHeaders,
                        OutputStream entityStream) throws IOException, WebApplicationException {
        AtomEntry entry = t.getValue();
        writeEntry(entry,
                   AtomEntry.class,
                   genericType,
                   annotations,
                   mediaType,
View Full Code Here

                              Type genericType,
                              Annotation[] annotations,
                              MediaType mediaType,
                              MultivaluedMap<String, String> httpHeaders,
                              InputStream entityStream) throws IOException, WebApplicationException {
        AtomEntry entry =
            readEntry(AtomEntry.class,
                      genericType,
                      annotations,
                      mediaType,
                      httpHeaders,
                      entityStream);
        return entry.toSynd(new SyndEntry());
    }
View Full Code Here

                        Type genericType,
                        Annotation[] annotations,
                        MediaType mediaType,
                        MultivaluedMap<String, Object> httpHeaders,
                        OutputStream entityStream) throws IOException, WebApplicationException {
        AtomEntry entry = new AtomEntry(t);
        writeEntry(entry,
                   AtomEntry.class,
                   genericType,
                   annotations,
                   mediaType,
View Full Code Here

TOP

Related Classes of org.apache.wink.common.model.atom.AtomEntry

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.