|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BrowsableResource
This is the interface for a DataResource that has higher-level
features and may contain other resources. You can think of a
BrowsableResource as a file that is a
directory or a
regular file. However it may be both and it can
originate from other sources than the filesystem.
ATTENTION:
This API has a high level of abstraction. It is possible that the underlying
implementation e.g. forms a web-crawler where a HTML-page is
data containing the HTML-content as well as a
folder containing the linked sites. Further you have to
be careful when recursively scanning BrowsableResources that you
avoid infinity loops. E.g. create a Set holding the
URIs of the BrowsableResources that have already
been visited.
| Method Summary | |
|---|---|
Iterable<BrowsableResource> |
getChildResources()
This method iterates the immediate child- resources contained in this BrowsableResource. |
Iterable<BrowsableResource> |
getChildResources(Filter<BrowsableResource> filter)
This method iterates the immediate child- resources contained in this BrowsableResource and are
accepted by the given filter. |
boolean |
isFolder()
This method determines if this BrowsableResource is a
folder that potentially contains other resources. |
| Methods inherited from interface net.sf.mmm.util.resource.api.DataResource |
|---|
getLastModificationDate, getName, getPath, getSize, getUri, getUrl, isAvailable, isData, isModifiedSince, navigate, openOutputStream, openStream |
| Method Detail |
|---|
Iterable<BrowsableResource> getChildResources()
resources contained in this BrowsableResource.folder, this method will always return an
empty Iterable.
Iterable of the child-resources.Iterable<BrowsableResource> getChildResources(Filter<BrowsableResource> filter)
resources contained in this BrowsableResource and are
accepted by the given filter.
filter - is the Filter applied to the
child-resources.
Iterable of the child-resources.boolean isFolder()
BrowsableResource is a
folder that potentially contains other resources. Otherwise if this is no folder, getChildResources()
will be empty (return an empty Iterable). However
getChildResources() can also be empty, if this is a folder.BrowsableResource is
containing data, please use DataResource.isAvailable().
Please note that isFolder() and DataResource.isAvailable() can both
return true or both return false.
true if this is a folder, false
otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||