org.semanticdesktop.aperture.detector.filesystem
Class HomeFolderDetector

java.lang.Object
  extended by org.semanticdesktop.aperture.detector.filesystem.HomeFolderDetector
All Implemented Interfaces:
DataSourceDetector

public class HomeFolderDetector
extends Object
implements DataSourceDetector

Detect the "my documents" folder of the user. On the mac, this is "~/Documents", on windows the "my documents" folder, etc.

Author:
sauermann, 2.7.2008, grimnes

Constructor Summary
HomeFolderDetector()
           
 
Method Summary
 List<DataSourceDescription> detect()
          Detect one or more datasources. returns an empty list if nothing detected
 URI getSupportedType()
          Returns the URI of the supported DataSource type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HomeFolderDetector

public HomeFolderDetector()
Method Detail

detect

public List<DataSourceDescription> detect()
                                   throws Exception
Description copied from interface: DataSourceDetector
Detect one or more datasources. returns an empty list if nothing detected

Specified by:
detect in interface DataSourceDetector
Returns:
a list of detected datasources. May be empty, but never null
Throws:
Exception - if there is a severe problem when detecting the datasource. The method will only throw an Exception, if it can usually detect a datasource, but is not able to detect it due to a faulty environment. For example, if the operating system is Apple, but the Address book was removed, or if Microsoft Outlook is detected, but in a version that is unknown. Error messages must be readable by the end-user and give hints how to add the datasource by hand or how to fix the problem.

getSupportedType

public URI getSupportedType()
Description copied from interface: DataSourceDetector
Returns the URI of the supported DataSource type.

Specified by:
getSupportedType in interface DataSourceDetector
See Also:
DataSourceFactory.getSupportedType()


Copyright © 2010 Aperture Development Team. All Rights Reserved.