org.gcube.common.scan.scanners.url
Class DirScanner

java.lang.Object
  extended by org.gcube.common.scan.scanners.url.DirScanner
All Implemented Interfaces:
URLScanner

public class DirScanner
extends Object
implements URLScanner

Implements URLScanner for file: URLs refer to directories.

Author:
Fabio Simeoni

Constructor Summary
DirScanner()
           
 
Method Summary
 Set<URL> additional(URL url)
          Returns additional URLs to be scanned in addition to a given URL.
 boolean handles(URL url)
          Returns true if this handler can scan a given URL.
 Set<ClasspathResource> scan(URL url)
          Scans a given URL for ClasspathResources.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirScanner

public DirScanner()
Method Detail

handles

public boolean handles(URL url)
Description copied from interface: URLScanner
Returns true if this handler can scan a given URL.

Specified by:
handles in interface URLScanner
Parameters:
url - the URL
Returns:
true if this handler can scan the URL

additional

public Set<URL> additional(URL url)
Description copied from interface: URLScanner
Returns additional URLs to be scanned in addition to a given URL.

Specified by:
additional in interface URLScanner
Parameters:
url - the URL
Returns:
the additional URLs

scan

public Set<ClasspathResource> scan(URL url)
                            throws Exception
Description copied from interface: URLScanner
Scans a given URL for ClasspathResources.

Specified by:
scan in interface URLScanner
Parameters:
url - the URL
Returns:
the scanned resources
Throws:
Exception - if the URL cannot be scanned


Copyright © 2014. All Rights Reserved.