Version 10 (modified by sauermann, 19 years ago) (diff) |
---|
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.
- TODO: what is the semantics and use of getParent() and getChildren()?
Java Interface
/** * 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. * */ 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(); /** * Gets the data object's parent, if any. * * @return the parent DataObject, or null when this DataObject has no parent. */ public DataObject getParent(); /** * Gets the data object's children, if any. This may be null to indicate that there * are no children. */ public Iterator<DataObject> getChildren(); /** * 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(); }