public interface BrowsableResource extends DataResource
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. data
containing the HTML-content as well as a
folder
containing the linked sites. Further you have to be careful when recursively
scanning BrowsableResource
s that you avoid infinity loops. E.g. create a Set
holding the URIs
of the BrowsableResource
s that have already been visited.Modifier and Type | Method and Description |
---|---|
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 . |
getLastModificationDate, getName, getPath, getSize, getUri, getUrl, isAvailable, isData, isModifiedSince, navigate, openOutputStream, openStream
Iterable<BrowsableResource> getChildResources()
resources
contained in this
BrowsableResource
. folder
, this method will always return an empty Iterable
.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.Copyright © 2001–2014 mmm-Team. All rights reserved.