Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 72031 invoked from network); 26 Sep 2006 07:17:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Sep 2006 07:17:39 -0000 Received: (qmail 27358 invoked by uid 500); 26 Sep 2006 07:17:39 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 27027 invoked by uid 500); 26 Sep 2006 07:17:38 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 27016 invoked by uid 99); 26 Sep 2006 07:17:38 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Sep 2006 00:17:38 -0700 Authentication-Results: idunn.apache.osuosl.org smtp.mail=mcconnell@dpml.net; spf=permerror X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received-SPF: error (idunn.apache.osuosl.org: domain dpml.net from 203.59.1.128 cause and error) Received: from [203.59.1.128] ([203.59.1.128:35090] helo=customer-domains.icp-qv1-irony7.iinet.net.au) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 76/22-05603-F04D8154 for ; Tue, 26 Sep 2006 00:17:37 -0700 Received: from 203-173-50-61.dyn.iinet.net.au (HELO julia) ([203.173.50.61]) by customer-domains.icp-qv1-irony7.iinet.net.au with ESMTP; 26 Sep 2006 15:17:31 +0800 X-BrightmailFiltered: true X-Brightmail-Tracker: AAAAAA== X-IronPort-AV: i="4.09,218,1157299200"; d="scan'208"; a="359774912:sNHT15433848" From: "Stephen McConnell" To: "'Ant Developers List'" Subject: RE: Resource.getURL() Date: Tue, 26 Sep 2006 16:47:53 +0930 Keywords: Business Message-ID: <002401c6e13b$e2426540$0301a8c0@julia> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 In-Reply-To: <20060925205812.27594.qmail@web55106.mail.re4.yahoo.com> Thread-Index: Acbg5Vqs/WSCkiOCQCKAQ8tQx7NZcgAUeg2g X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N > -----Original Message----- > From: Matt Benson [mailto:gudnabrsam@yahoo.com] > Sent: Tuesday, 26 September 2006 6:28 AM > To: Ant Developers List > Subject: RE: Resource.getURL() [snip] > > Matt: > > > > Can you expand on what you mean by "a string representation of a > > Resource"? > > Are your implying something equivalent to the way a URL can be > > externalized to a string (which could be done if all resources are > > associated with dedicated url handlers). Some concrete > > usage examples would be handy. > > > > /Steve. > > Exactly. Take for example the echo task. It defines a > method like public void setFile(File). > Ant knows how to resolve file="somefile" to a File object. > Resources' OutputStream is hardly used at present; the > concept behind its (OutputStream's) addition to the API is: > > bar > > I used "to" here; maybe the right name is "toresource" > or simply "resource" as is "file". The implementation of > setFile(File f) would be: > > setTo(new FileResource(f)); > > This is the exact use case driving this, from my perspective > anyway. It should be solvable, as you mention, using either > application-level pseudo-protocols or custom protocol > handlers. But without this functionality I will consider any > solution incomplete. OK - now things are making more sense. In effect the 'property:foo' is a resource identifier in that the resource protocol is 'property' and the resource name is 'foo'. For the other resource types: tar:[name] TarResource in memory tar archive zip:[name] ZipArchive in memory zip archive bzip:[name] BZipResource in memory compressed archive gzip:[name] GZipArchive in memory compressed archive file:[name] FileResource named reference to file or directory property:[name] PropertyResource in memory property binding string:[name] StringResource in memory string value uri:[name] URLResource named reference to a streamable source defined by a URL I have not included CompressedResource or JavaResource resource in the above list because my impression is that these two are both abstract resource definitions. For example, something like 'class:[name]' could map to a resource class derived from JavaResource. E.g: class:[name] ClassResource named reference to classname and path handler:[name] HandlerResource named reference to a protocol handler Also important to note is that: * all of the above return URLs that are in fact URIs identifiy the resource instance Does that sound correct? /Steve. -------------------------- Stephen McConnell mailto:mcconnell@dpml.net http://www.dpml.net --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org