ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominique Devienne" <ddevie...@gmail.com>
Subject Re: Resource.getURL()
Date Mon, 25 Sep 2006 17:01:09 GMT
> > This is the reason why I'm saying that a getURL only makes sense for
> > true URLResources only.
> getURL() makes sense for FileResource and ZipResource too.

Yes, but these can be expressed as URLResource just the same. Maybe
they should in fact derive from URLResource... This way, we could
differentiate betweem "pure" Resource which are content-only, with no
way to "address" or "locate" them (like StringResource and
PropertyResource) , and those which are in fact URL-based
(FileResource, ZipResource, etc...). Types who only care about content
would use Resource, while those who also care of resolving other
resources relative to another would accept URLResource, and not
"plain" Resource.

XML processing, which you mention as an use case for the getURL
method, is in fact more abstracted than that, and depends only on
SAX's InputSource and EntityResolver. InputSource itself only depends
on InputStream/Reader, although you can supply a URL as well. --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message