Search in sources :

Example 1 with Service

use of org.apache.abdera.model.Service in project datawave by NationalSecurityAgency.

the class AtomMessageBodyWriter method writeTo.

@Override
public void writeTo(Object message, Class<?> clazz, Type type, Annotation[] annotations, MediaType media, MultivaluedMap<String, Object> httpHeaders, OutputStream out) throws IOException, WebApplicationException {
    if (Entry.class.isAssignableFrom(clazz)) {
        Entry entry = (Entry) message;
        entry.writeTo(out);
    } else if (Feed.class.isAssignableFrom(clazz)) {
        Feed feed = (Feed) message;
        feed.writeTo(out);
    } else if (Service.class.isAssignableFrom(clazz)) {
        Service service = (Service) message;
        service.writeTo(out);
    } else if (Categories.class.isAssignableFrom(clazz)) {
        Categories categories = (Categories) message;
        categories.writeTo(out);
    }
}
Also used : Entry(org.apache.abdera.model.Entry) Categories(org.apache.abdera.model.Categories) Service(org.apache.abdera.model.Service) Feed(org.apache.abdera.model.Feed)

Aggregations

Categories (org.apache.abdera.model.Categories)1 Entry (org.apache.abdera.model.Entry)1 Feed (org.apache.abdera.model.Feed)1 Service (org.apache.abdera.model.Service)1