Examples of AtomText


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

            if (workspace == null) {

                // Create new workspace
                workspace = new AppWorkspace();
                AtomText workspaceTitle = new AtomText();

                // Set workspace title
                workspaceTitle.setValue(workspaceName);
                workspace.setTitle(workspaceTitle);
                workspaces.put(workspaceName, workspace);

                // Add workspace to list of workspaces
                workspaceList.add(workspace);
View Full Code Here

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

        // Set URI
        String href = UriHelper.appendPathToBaseUri(baseUri, serviceDocumentCollection.getUri());
        collection.setHref(href);

        // Set Title
        AtomText title = new AtomText();
        // title.setType();
        title.setValue(serviceDocumentCollection.getTitle());
        collection.setTitle(title);

        // Add Accept Media Types
        List<AppAccept> acceptMediaTypes = collection.getAccept();
        if (serviceDocumentCollection.getAccepts().isEmpty()) {
View Full Code Here

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

            String type = content.getType();
            if (ModelUtils.isTypeXml(type)) {
                return true;
            }
        } else if (source instanceof AtomText) {
            AtomText text = (AtomText)source;
            AtomTextType type = text.getType();
            if (type == AtomTextType.xhtml) {
                return true;
            }
        }
        return false;
View Full Code Here

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

            String type = content.getType();
            if (ModelUtils.isTypeXml(type)) {
                return true;
            }
        } else if (source instanceof AtomText) {
            AtomText text = (AtomText)source;
            AtomTextType type = text.getType();
            if (type == AtomTextType.xhtml) {
                return true;
            }
        }
        return false;
View Full Code Here

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

        entry.getAuthors().add(author);
        AtomContent content = new AtomContent();
        content.setType("text");
        content.setValue("This is a new entry in the blog");
        entry.setContent(content);
        entry.setTitle(new AtomText(("New blog entry")));

        ClientResponse uri =
            resource.accept("application/atom+xml").contentType("application/atom+xml").post(entry);
        String location = uri.getHeaders().getFirst("Location");
        assertEquals(BASE_URI + "/blogs/0/entries/3", location);
View Full Code Here

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

        entry.getAuthors().add(author);
        AtomContent content = new AtomContent();
        content.setType("text");
        content.setValue("I was able to set up the Wink development environment!");
        entry.setContent(content);
        entry.setTitle(new AtomText(("Success")));

        ClientResponse uri =
            resource.accept("application/atom+xml").contentType("application/atom+xml").post(entry);
        String location = uri.getHeaders().getFirst("Location");
        assertEquals(BASE_URI + "/blogs/0/entries/1/comments/1", location);
View Full Code Here

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

        Resource resource = client.resource(BASE_URI + "/blogs/0/entries/0");
        AtomEntry entry = resource.accept("application/atom+xml").get(AtomEntry.class);
        AtomPerson author = entry.getAuthors().get(0);
        author.setName(author.getName() + "Updated");
        author.setEmail(author.getEmail() + "Updated");
        AtomText title = entry.getTitle();
        title.setValue(title.getValue() + "Updated");
        AtomContent content = entry.getContent();
        content.setValue(content.getValue() + "Updated");

        resource = client.resource(BASE_URI + "/blogs/0/entries/0");
        AtomEntry updated =
View Full Code Here

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

        Resource resource = client.resource(BASE_URI + "/blogs/0/entries/1/comments/0");
        AtomEntry entry = resource.accept("application/atom+xml").get(AtomEntry.class);
        AtomPerson author = entry.getAuthors().get(0);
        author.setName(author.getName() + "Updated");
        author.setEmail(author.getEmail() + "Updated");
        AtomText title = entry.getTitle();
        title.setValue(title.getValue() + "Updated");
        AtomContent content = entry.getContent();
        content.setValue(content.getValue() + "Updated");

        resource = client.resource(BASE_URI + "/blogs/0/entries/1/comments/0");
        AtomEntry updated =
View Full Code Here

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

    }

    public AtomFeed toAtomFeed(UriInfo uriInfo) {
        AtomFeed feed = new AtomFeed();
        feed.setId(id+"");
        feed.setTitle(new AtomText(title));
        feed.setUpdated(updated);
        Set<Integer> ids = entries.keySet();
        List<Integer> idList = new ArrayList<Integer>(ids);
        Collections.sort(idList);
        AtomLink link = null;
View Full Code Here

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

            String type = content.getType();
            if (ModelUtils.isTypeXml(type)) {
                return true;
            }
        } else if (source instanceof AtomText) {
            AtomText text = (AtomText)source;
            AtomTextType type = text.getType();
            if (type == AtomTextType.xhtml) {
                return true;
            }
        }
        return false;
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.