org.semanticdesktop.aperture.accessor
Interface DataObject

All Known Subinterfaces:
FileDataObject, FolderDataObject, MessageDataObject
All Known Implementing Classes:
DataObjectBase, FileDataObjectBase, FolderDataObjectBase, MessageDataObjectBase

public interface DataObject

A general interface for information items obtained from accessing a DataSource. DataObjects typically represent files, folders, web pages, e-mails, etc.

A DataObject consists of an identifier (a URI) and metadata that describes that identifier. Subinterfaces may define methods for accessing additional information, e.g. an InputStream.

Calling the getMetadata() method will retrieve structured data that exists in the realm of the DataSource. Examples include path and file names, sizes, last modification dates, etc.


Method Summary
 void dispose()
          Closes this DataObject, freeing any resources that it keeps hold of.
 DataSource getDataSource()
          Gets the DataSource from which this DataObject was obtained.
 URI getID()
          Gets the DataObject's primary identifier.
 RDFContainer getMetadata()
          Get the metadata describing this DataObject's ID.
 

Method Detail

getID

URI getID()
Gets the DataObject's primary identifier.

Returns:
An identifier for this DataObject.

getDataSource

DataSource getDataSource()
Gets the DataSource from which this DataObject was obtained.

Returns:
The DataSource from which this DataObject originated.

getMetadata

RDFContainer getMetadata()
Get the metadata describing this DataObject's ID.

Returns:
An RDFContainer containing an RDF model formulated using the Aperture vocabulary.

dispose

void dispose()
Closes this DataObject, freeing any resources that it keeps hold of. This method disposes the underlying metadata RDFContainer. It doesn't dispose the DataSource. The metadata RDFContainer cannot be used after the call to this method.



Copyright © 2010 Aperture Development Team. All Rights Reserved.