source: OAIProvider/trunk/src/main/java/eu/clarin/oai/provider/Record.java @ 1914

Last change on this file since 1914 was 1914, checked in by oschonef, 12 years ago
  • more refactoring
  • Property svn:eol-style set to native
File size: 1.7 KB
Line 
1package eu.clarin.oai.provider;
2
3import java.util.Date;
4import java.util.List;
5
6import javax.xml.stream.XMLStreamException;
7import javax.xml.stream.XMLStreamWriter;
8
9/**
10 * An item in the repository. This adapter interface is used by the OAI
11 * provider to get items from the repository. The repository is expected
12 * to set the required values.
13 */
14public interface Record {
15    /**
16     * Get the localId of the record. The returned object must be compatible
17     * with repository's implementation of <code>parseLocalId</code> and
18     * <code>unparseLocalId</code>.
19     *
20     * @returns the local Id object of the record
21     * @see Repository#parseLocalId(String)
22     * @see Repository#unparseLocalId(Object)
23     */
24    public Object getLocalId();
25   
26    /**
27     * Get the last changed timestamp of the item.
28     *
29     * @return the last changed timestamp of the item
30     * @see Repository#getGranularity()
31     */
32    public Date getDatestamp();
33
34    /**
35     * set deletion state of the record.
36     *
37     * @return <code>true</code> of the record is deleted, <code>false</code>
38     *         otherwise
39     * @see Repository#getDeletedNotion()           
40     */
41    public boolean isDeleted();
42
43    /**
44     * Get the sets to which this record belongs to.
45     *
46     * @return the list of sets to which the records belongs to or
47     *         <code>null</code> if it does not belong to any sets or the
48     *         repository does not support set
49     */
50    public List<String> getSetSpecs();
51
52    public boolean supportsFormat(MetadataFormat format);
53
54    public void writeRecord(XMLStreamWriter writer, MetadataFormat format)
55            throws XMLStreamException, OAIException;
56} // interface Record
Note: See TracBrowser for help on using the repository browser.