org.semanticdesktop.aperture.outlook
Class OutlookAccessor

java.lang.Object
  extended by org.semanticdesktop.aperture.outlook.OutlookAccessor
All Implemented Interfaces:
DataAccessor

public class OutlookAccessor
extends Object
implements DataAccessor

Access individual Outlook Objects.

Author:
sauermann $Id: OutlookAccessor.java 1497 2008-11-27 12:41:37Z mylka $

Field Summary
static String PARAM_MAPI
          for passing in the already instantiated mapi
static String PARAM_OUTLOOKPARENT
          the parent of the current node. type: OutlookResource
static String PARAM_OUTLOOKRESOURCE
          for passing in the already instantiated outlook resource object. type: OutlookResource
 
Constructor Summary
OutlookAccessor()
           
 
Method Summary
 DataObject getDataObject(String url, DataSource source, Map params, RDFContainerFactory containerFactory)
          Get a DataObject for the specified url.
 DataObject getDataObjectIfModified(String url, DataSource source, AccessData accessData, Map params, RDFContainerFactory containerFactory)
          Get a DataObject for the specified url.
 DataObject getDataObjectIfModifiedOutlook(String url, DataSource source, AccessData accessData, Map params, RDFContainerFactory containerFactory, OutlookResource resource, OutlookResource parent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_OUTLOOKRESOURCE

public static final String PARAM_OUTLOOKRESOURCE
for passing in the already instantiated outlook resource object. type: OutlookResource

See Also:
Constant Field Values

PARAM_OUTLOOKPARENT

public static final String PARAM_OUTLOOKPARENT
the parent of the current node. type: OutlookResource

See Also:
Constant Field Values

PARAM_MAPI

public static final String PARAM_MAPI
for passing in the already instantiated mapi

See Also:
Constant Field Values
Constructor Detail

OutlookAccessor

public OutlookAccessor()
Method Detail

getDataObject

public DataObject getDataObject(String url,
                                DataSource source,
                                Map params,
                                RDFContainerFactory containerFactory)
                         throws UrlNotFoundException,
                                IOException
Description copied from interface: DataAccessor
Get a DataObject for the specified url.

The resulting DataObject's ID may differ from the specified url due to normalization schemes, following of redirected URLs, etc. It is required though to provide a URI through which this DataAccessor can later on also access the same resource, i.e. the URI should also be a URL.

Specific DataAccessor implementations may accept additional parameters through the params Map, e.g. to speed up this method with ready-made datastructures it can reuse. See the documentation of these implementations for information on the type of parameters they accept. However, implementations should not rely on the contents of this Map to work properly.

Specified by:
getDataObject in interface DataAccessor
Parameters:
url - The url of the requested resource.
source - The DataSource to be registered as the source of the DataObject (optional).
params - Additional parameters facilitating access to the physical resource (optional).
containerFactory - An RDFContainerFactory that delivers the RDFContainer to which the metadata of the DataObject should be added. The provided RDFContainer can later be retrieved as the DataObject's metadata container.
Returns:
A DataObject for the specified URI.
Throws:
UrlNotFoundException - When the specified url did not point to an existing resource.
IOException - When any kind of I/O error occurs.

getDataObjectIfModified

public DataObject getDataObjectIfModified(String url,
                                          DataSource source,
                                          AccessData accessData,
                                          Map params,
                                          RDFContainerFactory containerFactory)
                                   throws UrlNotFoundException,
                                          IOException
Description copied from interface: DataAccessor
Get a DataObject for the specified url.

The resulting DataObject's ID may differ from the specified url due to normalization schemes, following of redirected URLs, etc. It is required though to provide a URI through which this DataAccessor can later on also access the same resource, i.e. the URI should also be a URL.

The optionally passed AccessData can be used to let the DataAccessor store information about the created DataSource. The next time it is invoked with the same URL, it can then use this information to determine whether the resource has changed or not. The DataAccessor should return null when the resource has not changed. This facilitates fast incremental crawling of DataSources. When no AccessData is specified, no change detection takes place and an AccessData is always returned.

Specific DataAccessor implementations may accept additional parameters through the params Map, e.g. to speed up this method with ready-made datastructures it can reuse. See the documentation of these implementations for information on the type of parameters they accept. However, implementations should not rely on the contents of this Map to work properly.

Specified by:
getDataObjectIfModified in interface DataAccessor
Parameters:
url - The url of the requested resource.
source - The DataSource to be registered as the source of the DataObject (optional).
accessData - Any access data obtained during the previous access to this DataObject (optional).
params - Additional parameters facilitating access to the physical resource (optional).
containerFactory - An RDFContainerFactory that delivers the RDFContainer to which the metadata of the DataObject should be added. The provided RDFContainer can later be retrieved as the DataObject's metadata container.
Returns:
A DataObject for the specified URI, or null when the binary resource has not been modified since the last access.
Throws:
UrlNotFoundException - When the specified url did not point to an existing resource.
IOException - When any kind of I/O error occurs.

getDataObjectIfModifiedOutlook

public DataObject getDataObjectIfModifiedOutlook(String url,
                                                 DataSource source,
                                                 AccessData accessData,
                                                 Map params,
                                                 RDFContainerFactory containerFactory,
                                                 OutlookResource resource,
                                                 OutlookResource parent)
                                          throws UrlNotFoundException,
                                                 IOException
Throws:
UrlNotFoundException
IOException


Copyright © 2010 Aperture Development Team. All Rights Reserved.