Return-Path: Delivered-To: apmail-incubator-abdera-user-archive@locus.apache.org Received: (qmail 85680 invoked from network); 8 Aug 2006 19:17:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Aug 2006 19:17:48 -0000 Received: (qmail 93997 invoked by uid 500); 8 Aug 2006 19:17:48 -0000 Delivered-To: apmail-incubator-abdera-user-archive@incubator.apache.org Received: (qmail 93983 invoked by uid 500); 8 Aug 2006 19:17:47 -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 93974 invoked by uid 99); 8 Aug 2006 19:17:47 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Aug 2006 12:17:47 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jasnell@gmail.com designates 66.249.82.226 as permitted sender) Received: from [66.249.82.226] (HELO wx-out-0506.google.com) (66.249.82.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Aug 2006 12:17:46 -0700 Received: by wx-out-0506.google.com with SMTP id s13so548705wxc for ; Tue, 08 Aug 2006 12:17:26 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=qzXab5YMHtbIGvWCnq8PrNJ9u45K7H0m9r97yIu0bFvpWYH7ebGYIhgCmHaUr7TTpmC0NTDTOa5q8My5g2Xs2QeGwAUlg62kuGf3e0SHEGmpzs6uzNrP5vb7AiOWr3GASc/VnhyZjADQcn0+QkWc7RuFI21iEM3oaTVOfyo4VE0= Received: by 10.70.72.11 with SMTP id u11mr1240268wxa; Tue, 08 Aug 2006 12:17:25 -0700 (PDT) Received: from ?192.168.1.104? ( [67.181.218.96]) by mx.gmail.com with ESMTP id 65sm660966wra.2006.08.08.12.17.24; Tue, 08 Aug 2006 12:17:25 -0700 (PDT) Message-ID: <44D8E33F.8040706@gmail.com> Date: Tue, 08 Aug 2006 12:17:19 -0700 From: James M Snell User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: abdera-user@incubator.apache.org Subject: Re: References: <3C24167B-1E85-4AAF-85D6-6F4A03E80118@gmail.com> <7edfeeef0608080730j5808121evc74af4ee811dee43@mail.gmail.com> <44D8B233.5090005@gmail.com> <8E9A76B4-35E1-4188-9DAA-7C0511352102@gmail.com> <44D8BB66.1020708@gmail.com> <7edfeeef0608081015n5e751ecfjf27cf11b3bebb99e@mail.gmail.com> <9B588FBB-B650-4B87-A8DF-17B3557A1775@gmail.com> <7edfeeef0608081023g24647bb2s87e18011ec706a0c@mail.gmail.com> <63CE61F8-AFAD-4A5B-BE18-E2092341B6D7@gmail.com> In-Reply-To: <63CE61F8-AFAD-4A5B-BE18-E2092341B6D7@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Patched! Thank's Ugo Ugo Cei wrote: > > On Aug 8, 2006, at 7:23 PM, Garrett Rooney wrote: > >> Does it perhaps have a filename that looks ungood to one of the mail >> servers in the way? Perhaps changing it to .txt? > > Let's try. > > > ------------------------------------------------------------------------ > > Index: java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java > =================================================================== > --- java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java (revision 429733) > +++ java/trunk/core/src/main/java/org/apache/abdera/model/Entry.java (working copy) > @@ -214,6 +214,17 @@ > Content setContent(String value, String mediatype) throws MimeTypeParseException; > > /** > + * Sets the content for this entry as out of line. > + * > + * @param uri URI of the content (value of the "src" attribute). > + * @param mediatype Type of the content. > + * @return The new content element. > + * @throws MimeTypeParseException if the mime type is invalid. > + * @throws URISyntaxException if the URI is invalid. > + */ > + Content setContent(URI uri, String mediatype) throws MimeTypeParseException, URISyntaxException; > + > + /** > * Returns the text of the content element > */ > String getContent(); > Index: java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java > =================================================================== > --- java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java (revision 429733) > +++ java/trunk/parser/src/main/java/org/apache/abdera/parser/stax/FOMEntry.java (working copy) > @@ -259,6 +259,19 @@ > setContentElement(content); > return content; > } > + > + /** > + * Sets the content for this entry > + * @throws MimeTypeParseException > + * @throws URISyntaxException > + */ > + public Content setContent(URI uri, String mediatype) throws MimeTypeParseException, URISyntaxException { > + FOMFactory factory = (FOMFactory) this.factory; > + Content content = factory.newContent(new MimeType(mediatype)); > + content.setSrc(uri.toString()); > + setContentElement(content); > + return content; > + } > > > public List getContributors() { > Index: java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/Create.java > =================================================================== > --- java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/Create.java (revision 429733) > +++ java/trunk/examples/src/main/java/org/apache/abdera/examples/simple/Create.java (working copy) > @@ -17,6 +17,7 @@ > */ > package org.apache.abdera.examples.simple; > > +import java.net.URI; > import java.util.Date; > > import org.apache.abdera.factory.Factory; > @@ -63,6 +64,14 @@ > entry3.setSummaryAsHtml("

Test

").setBaseUri("http://example.org/site/"); > entry3.setSource(feed.getAsSource()); > > + // Out-of-line content > + Entry entry4 = feed.addEntry(); > + entry4.setTitle("re: Atom-Powered Robots Run Amok"); > + entry4.addLink("/2003/12/13/atom03/3"); > + entry4.setId("urn:uuid:1225c695-cfb8-4ebb-aaaa-cafebabecafe"); > + entry4.setUpdated(new Date()); > + entry4.setSummary("An entry with out-of-line content"); > + entry4.setContent(new URI("http://example.org/0xcafebabe"), "text/html"); > feed.getDocument().writeTo(System.out); > } > > > > ------------------------------------------------------------------------ > > > Ugo