Examples of AtomFeed


Examples of org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomFeed

        AtomBase base = parse(resp.getStream(), AtomBase.class);

        // get the entry
        AtomEntry entry = null;
        if (base instanceof AtomFeed) {
            AtomFeed feed = (AtomFeed) base;
            if (feed.getEntries().isEmpty()) {
                throw new CmisRuntimeException("Parent feed is empty!");
            }
            entry = feed.getEntries().get(0);
        } else if (base instanceof AtomEntry) {
            entry = (AtomEntry) base;
        } else {
            throw new CmisRuntimeException("Unexpected document!");
        }
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomFeed

        url.addParameter(Constants.PARAM_RENDITION_FILTER, renditionFilter);
        url.addParameter(Constants.PARAM_PATH_SEGMENT, includePathSegment);

        // read and parse
        HttpUtils.Response resp = read(url);
        AtomFeed feed = parse(resp.getStream(), AtomFeed.class);

        // process tree
        addDescendantsLevel(repositoryId, feed, result);

        return result;
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomFeed

        AtomBase base = parse(resp.getStream(), AtomBase.class);

        if (base instanceof AtomFeed) {
            // it's a feed
            AtomFeed feed = (AtomFeed) base;

            // walk through the feed
            for (AtomEntry entry : feed.getEntries()) {
                ObjectParentDataImpl objectParent = processParentEntry(entry, repositoryId);

                if (objectParent != null) {
                    result.add(objectParent);
                }
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomFeed

        url.addParameter(Constants.PARAM_MAX_ITEMS, maxItems);
        url.addParameter(Constants.PARAM_SKIP_COUNT, skipCount);

        // read and parse
        HttpUtils.Response resp = read(url);
        AtomFeed feed = parse(resp.getStream(), AtomFeed.class);

        // handle top level
        for (AtomElement element : feed.getElements()) {
            if (element.getObject() instanceof AtomLink) {
                if (isNextLink(element)) {
                    result.setHasMoreItems(Boolean.TRUE);
                }
            } else if (isInt(NAME_NUM_ITEMS, element)) {
                result.setNumItems((BigInteger) element.getObject());
            }
        }

        // get the documents
        if (!feed.getEntries().isEmpty()) {
            result.setObjects(new ArrayList<ObjectData>(feed.getEntries().size()));

            for (AtomEntry entry : feed.getEntries()) {
                ObjectData child = null;

                lockLinks();
                try {
                    // clean up cache
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.bindings.spi.atompub.objects.AtomFeed

    /**
     * Parses an Atom feed.
     */
    private AtomFeed parseFeed(XMLStreamReader parser) throws Exception {
        AtomFeed result = new AtomFeed();

        next(parser);

        while (true) {
            int event = parser.getEventType();
            if (event == XMLStreamReader.START_ELEMENT) {
                QName name = parser.getName();

                if (Constants.NAMESPACE_ATOM.equals(name.getNamespaceURI())) {
                    if (TAG_LINK.equals(name.getLocalPart())) {
                        result.addElement(parseLink(parser));
                    } else if (TAG_ENTRY.equals(name.getLocalPart())) {
                        result.addEntry(parseEntry(parser));
                    } else {
                        skip(parser);
                    }
                } else if (Constants.NAMESPACE_RESTATOM.equals(name.getNamespaceURI())) {
                    if (TAG_NUM_ITEMS.equals(name.getLocalPart())) {
                        result.addElement(parseBigInteger(parser));
                    } else {
                        skip(parser);
                    }
                } else {
                    skip(parser);
View Full Code Here

Examples of org.apache.shindig.social.core.util.atom.AtomFeed

   * @see org.apache.shindig.protocol.conversion.BeanXStreamConverter#convertToString(java.lang.Object)
   */
  @Override
  public String convertToString(Object obj) {
    writerStack.reset();
    AtomFeed af = new AtomFeed(obj);
    XStreamConfiguration.ConverterConfig cc = converterMap.get(XStreamConfiguration.ConverterSet.DEFAULT);
    cc.mapper.setBaseObject(af); // thread safe method

    return cc.xstream.toXML(af);
  }
View Full Code Here

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

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

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

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

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

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

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

                                          Annotation[] annotations,
                                          MediaType mediaType,
                                          MultivaluedMap<String, String> httpHeaders,
                                          InputStream entityStream) throws IOException,
        WebApplicationException {
        AtomFeed feed =
            readFeed(AtomFeed.class, genericType, annotations, mediaType, httpHeaders, entityStream);
        return atomObjectFactory.createFeed(feed);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.