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

        @Produces("application/atom+xml")
        public AtomEntryAsset getAsset() {
            AtomEntryAsset asset = new AtomEntryAsset();
            AtomEntry ae = new AtomEntry();
            ae.setId("id");
            ae.setTitle(new AtomText("title", AtomTextType.text));
            asset.setEntity(ae);
            return asset;

        }
View Full Code Here

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

        @Produces("application/atom+xml")
        public AtomEntryJaxbAsset getAssetAsJaxbElement() {
            AtomEntryJaxbAsset asset = new AtomEntryJaxbAsset();
            AtomEntry ae = new AtomEntry();
            ae.setId("id");
            ae.setTitle(new AtomText("title", AtomTextType.text));
            ObjectFactory of = new ObjectFactory();
            asset.entry = of.createEntry(ae);
            return asset;
        }
View Full Code Here

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

        AtomContent content = new AtomContent();
        content.setValue(this.content);
        content.setType("String");
        entry.setContent(content);
        entry.getAuthors().add(this.author.toAtomPerson());
        entry.setTitle(new AtomText(this.title));
        return entry;
    }
View Full Code Here

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

        entry.getAuthors().add(author);
        AtomContent content = new AtomContent();
        content.setType("String");
        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("String");
        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 = resource.accept("application/atom+xml").contentType("application/atom+xml").put(AtomEntry.class, entry);
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 = resource.accept("application/atom+xml").contentType("application/atom+xml").put(AtomEntry.class, entry);
View Full Code Here

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

    private AppWorkspace getWorkspace(String id) {
        AppWorkspace ws = new AppWorkspace();
        ws.setLang("en-us");
        ws.setBase("http://base/workspace");
        ws.setTitle(new AtomText("workspace" + id));
        ws.getOtherAttributes().put(new QName("anyAttirbWorkspace"), "anyAttribValueWorkspace");

        ws.getCollection().add(getCollection("1"));
        ws.getCollection().add(getCollection("2"));
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.