= DataObject = '''ToDo''': the getMetadata method should probably return some kind of RDF statement container (the same interface that will be used in Extractor) instead of a Map with key-value pairs, the keys of which are specific to the type of !DataObject/!DataSource. Leo about TODO: ok with me to return an RDFMap ChangeLog: * 'Metadata' is one word, hence getMetadata, not getMetaData. * Semantics and use of getParent() and getChildren()? Chris: about getParent, getChildren, etc.: I thought the idea was to just put the URIs of these objects, when known in the metadata of the DataObject. When you are interested in its parent, you should then retrieve the parent's URI from the metadata and approach the DataAccessor again with that URI. this way you can get rid of these specialized methods and are also more future-proof, when someone invents more DataSource-DataSource relations - Leo: ok, I deleted them without replacement. == Java Interface == {{{ #!java /** * A general interface for data objects. A data object consists of an identifier, * and metadata. The object is used primarily to extract * information from datasources. For the extraction, both * the RDF metadata returned by getMetadata() and methods provided by possible * sub-classes are important. * Note that in applications you will find instances of DataObject and its * child-interfaces DataObjectFile * and DataObjectFolder. Handling a DataObject, you should always (via type checking using 'instanceof') * handle additional information provided by the sub-interfaces. *

metadata and data

* Calling the getMetadata() method will retrieve structured data that exists in the datasource already, * including important metadata like size in bytes, last change date, title, author, subject, etc. * The metadata can be also data of the object: when you access a contact from an address book, the * whole contact information (including address, tel, etc) will be inside the metadata object. * Also, relations to parents and children related to this DataObject may be inside the metadata. * Note, that folder-like relations are always returned when the DataObject is an instance of * DataObjectFolder, then the metadata will contain links to all children of the folder (including * sub-folders and sub-objects) */ public interface DataObject { /** * Gets the data object's primary identifier. * * @return An identifier for this data object. */ public URI getID(); /** * Gets the DataSource from which this DataObject conceptually originated. * * @return The DataSource from which this DataObject conceptually originated. */ public DataSource getDataSource(); /** * Get the source-specific metadata and data. * The used keys and values and implementation-dependent. * For java1.4 compability reasons, the map is untyped. * It is already titled RDFMap to reflect our ideas regarding RDF * * @return The scheme-specific metadata. */ public RDFMap getMetadata(); } }}}