Return-Path: Delivered-To: apmail-incubator-abdera-user-archive@locus.apache.org Received: (qmail 14459 invoked from network); 22 Jan 2008 13:19:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Jan 2008 13:19:00 -0000 Received: (qmail 95594 invoked by uid 500); 22 Jan 2008 13:18:50 -0000 Delivered-To: apmail-incubator-abdera-user-archive@incubator.apache.org Received: (qmail 95575 invoked by uid 500); 22 Jan 2008 13:18:50 -0000 Mailing-List: contact abdera-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: abdera-user@incubator.apache.org Delivered-To: mailing list abdera-user@incubator.apache.org Received: (qmail 95535 invoked by uid 99); 22 Jan 2008 13:18:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jan 2008 05:18:50 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of takasho@gmail.com designates 209.85.132.247 as permitted sender) Received: from [209.85.132.247] (HELO an-out-0708.google.com) (209.85.132.247) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jan 2008 13:18:22 +0000 Received: by an-out-0708.google.com with SMTP id b33so521833ana.83 for ; Tue, 22 Jan 2008 05:18:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=r8gWf4gynwCtVuxXZm/D2YWxI0txLqGoMwDoYizkzik=; b=pGBi6NdyCD18elGUlGF4Fz9a9JorbF/VWinAk6GsAnhWMZbR6LjnzZLuSMD0XEeaVkebNif1tDpul9SRQYVvXG+2yIOi/Ip1XNrFa05IHN78vhWhEviwytVCVrG9HQjQPA3PeCLmttS+aaL6rKyA80DfqY4yRXZT5Dwpb1W6htQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=KPg9o5oENxub+5BzEoRwX1na2/cnOBMqOsSxApl1LCDeRxq6tuf5dQlbnVcae+GN5Joy3FYcIGcUGTv1mb+Q88WLA6G2YDcX9pFyLlsMwa/8I2T4E6nn8+9XbE9C3waRzGklDnrVru6QYJ47fjEJ+3BjVjAopnKPIJxgfdOLuN4= Received: by 10.100.232.13 with SMTP id e13mr17471300anh.21.1201007890705; Tue, 22 Jan 2008 05:18:10 -0800 (PST) Received: by 10.100.171.7 with HTTP; Tue, 22 Jan 2008 05:18:10 -0800 (PST) Message-ID: Date: Tue, 22 Jan 2008 13:18:10 +0000 From: Takasho To: abdera-user@incubator.apache.org Subject: Re: How do I add app:accept to a collection? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org Hi David, It looks like I had my terminology wrong. Thanks for the examples I will use the collection class instead as that was what I was trying to achieve. Thanks, Takasho On 22/01/2008, David Calavera wrote: > Hi Takasho, > > the easiest way to add an extension to a feed is using the > "addSimpleExtension" method: > > feed.addSimpleExtension(QName, value); > feed.addSimpleExtension(namespace, element_name, preffix, value); > > By the way, why do you want to add the accept element to a feed? > If you are trying to create a service document you should use the Collection > class. I.e: > > Service service = new Abdera().getFactory().getService(); > Workspace ws = service.addWorkspace("title"); > Collection cn = ws.addCollection("title", "url"); > *cn.setAccept(Strings array); > > *Regards. > > On Jan 22, 2008 12:18 PM, Takasho wrote: > > > Hi All, > > > > Just a quick mail to ask how I add the app:accept element to a > > feed/collection. > > > > I have looked through the online docs and the atompub spec to find > > that it should be regarded as external markup but I haven't found an > > explanation on how to add it to a feed I am creating with Abdera. > > > > Very simply: > > > > Abdera abdera = new Abdera(); > > Factory factory = abdera.getFactory(); > > Feed feed = factory.newFeed(); > > feed.addAuthor("Takasho"); > > feed.setTitle("sample"); > > feed.addCategory("Category1"); > > feed.addCategory("Category2"); > > feed.addCategory("Category3"); > > // Now add app:accept > > > > I am assuming it is done with Qnames and extensions but I've not been > > able to generate what I want, such as: > > > > application/xml,image/jpeg,image/png > > > > Along with appropriate xmlns added to the top feed element: > > > > > > > > I think thats right, please correct me if I'm wrong, > > > > Thanks, > > > > Takasho > > > > > > -- > David Calavera > http://www.thinkincode.net >