KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > lenya > cms > publication > DublinCore


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */

17
18 /* $Id: DublinCore.java 43154 2004-07-30 10:18:09Z andreas $ */
19
20 package org.apache.lenya.cms.publication;
21
22 public interface DublinCore {
23
24     String JavaDoc ELEMENT_TITLE = "title";
25     String JavaDoc ELEMENT_CREATOR = "creator";
26     String JavaDoc ELEMENT_SUBJECT = "subject";
27     String JavaDoc ELEMENT_DESCRIPTION = "description";
28     String JavaDoc ELEMENT_PUBLISHER = "publisher";
29     String JavaDoc ELEMENT_CONTRIBUTOR = "contributor";
30     String JavaDoc ELEMENT_DATE = "date";
31     String JavaDoc ELEMENT_TYPE = "type";
32     String JavaDoc ELEMENT_FORMAT = "format";
33     String JavaDoc ELEMENT_IDENTIFIER = "identifier";
34     String JavaDoc ELEMENT_SOURCE = "source";
35     String JavaDoc ELEMENT_LANGUAGE = "language";
36     String JavaDoc ELEMENT_RELATION = "relation";
37     String JavaDoc ELEMENT_COVERAGE = "coverage";
38     String JavaDoc ELEMENT_RIGHTS = "rights";
39
40     String JavaDoc TERM_AUDIENCE = "audience";
41     String JavaDoc TERM_ALTERNATIVE = "alternative";
42     String JavaDoc TERM_TABLEOFCONTENTS = "tableOfContents";
43     String JavaDoc TERM_ABSTRACT = "abstract";
44     String JavaDoc TERM_CREATED = "created";
45     String JavaDoc TERM_VALID = "valid";
46     String JavaDoc TERM_AVAILABLE = "available";
47     String JavaDoc TERM_ISSUED = "issued";
48     String JavaDoc TERM_MODIFIED = "modified";
49     String JavaDoc TERM_EXTENT = "extent";
50     String JavaDoc TERM_MEDIUM = "medium";
51     String JavaDoc TERM_ISVERSIONOF = "isVersionOf";
52     String JavaDoc TERM_HASVERSION = "hasVersion";
53     String JavaDoc TERM_ISREPLACEDBY = "isReplacedBy";
54     String JavaDoc TERM_REPLACES = "replaces";
55     String JavaDoc TERM_ISREQUIREDBY = "isRequiredBy";
56     String JavaDoc TERM_REQUIRES = "requires";
57     String JavaDoc TERM_ISPARTOF = "isPartOf";
58     String JavaDoc TERM_HASPART = "hasPart";
59     String JavaDoc TERM_ISREFERENCEDBY = "isReferencedBy";
60     String JavaDoc TERM_REFERENCES = "references";
61     String JavaDoc TERM_ISFORMATOF = "isFormatOf";
62     String JavaDoc TERM_HASFORMAT = "hasFormat";
63     String JavaDoc TERM_CONFORMSTO = "conformsTo";
64     String JavaDoc TERM_SPATIAL = "spatial";
65     String JavaDoc TERM_TEMPORAL = "temporal";
66     String JavaDoc TERM_MEDIATOR = "mediator";
67     String JavaDoc TERM_DATEACCEPTED = "dateAccepted";
68     String JavaDoc TERM_DATECOPYRIGHTED = "dateCopyrighted";
69     String JavaDoc TERM_DATESUBMITTED = "dateSubmitted";
70     String JavaDoc TERM_EDUCATIONLEVEL = "educationLevel";
71     String JavaDoc TERM_ACCESSRIGHTS = "accessRights";
72     String JavaDoc TERM_BIBLIOGRAPHICCITATION = "bibliographicCitation";
73
74     /**
75      * Save the meta data.
76      *
77      * @throws DocumentException if the meta data could not be made persistent.
78      */

79     void save() throws DocumentException;
80
81     /**
82      * Get the creator
83      *
84      * @return the creator
85      *
86      * @throws DocumentException if an error occurs
87      * @deprecated Use {@link #getValues(java.lang.String)} or {@link #getFirstValue(java.lang.String)} instead.
88      */

89     String JavaDoc getCreator() throws DocumentException;
90
91     /**
92      * Set the DC creator
93      *
94      * @param creator the Creator
95      *
96      * @throws DocumentException if an error occurs
97      * @deprecated Use {@link #addValue(java.lang.String, java.lang.String)} or {@link #setValue(java.lang.String, java.lang.String)} instead.
98      */

99     void setCreator(String JavaDoc creator) throws DocumentException;
100
101     /**
102      * Get the title
103      *
104      * @return the title
105      *
106      * @throws DocumentException if an error occurs
107      * @deprecated Use {@link #getValues(java.lang.String)} or {@link #getFirstValue(java.lang.String)} instead.
108      */

109     String JavaDoc getTitle() throws DocumentException;
110
111     /**
112      * Set the DC title
113      *
114      * @param title the title
115      *
116      * @throws DocumentException if an error occurs
117      * @deprecated Use {@link #addValue(java.lang.String, java.lang.String)} or {@link #setValue(java.lang.String, java.lang.String)} instead.
118      */

119     void setTitle(String JavaDoc title) throws DocumentException;
120
121     /**
122      * Get the description
123      *
124      * @return the description
125      *
126      * @throws DocumentException if an error occurs
127      * @deprecated Use {@link #getValues(java.lang.String)} or {@link #getFirstValue(java.lang.String)} instead.
128      */

129     String JavaDoc getDescription() throws DocumentException;
130
131     /**
132      * Set the DC Description
133      *
134      * @param description the description
135      *
136      * @throws DocumentException if an error occurs
137      * @deprecated Use {@link #addValue(java.lang.String, java.lang.String)} or {@link #setValue(java.lang.String, java.lang.String)} instead.
138      */

139     void setDescription(String JavaDoc description) throws DocumentException;
140
141     /**
142      * Get the identifier
143      *
144      * @return the identifier
145      *
146      * @throws DocumentException if an error occurs
147      * @deprecated Use {@link #getValues(java.lang.String)} or {@link #getFirstValue(java.lang.String)} instead.
148      */

149     String JavaDoc getIdentifier() throws DocumentException;
150
151     /**
152      * Set the DC Identifier
153      *
154      * @param identifier the identifier
155      *
156      * @throws DocumentException if an error occurs
157      * @deprecated Use {@link #addValue(java.lang.String, java.lang.String)} or {@link #setValue(java.lang.String, java.lang.String)} instead.
158      */

159     void setIdentifier(String JavaDoc identifier) throws DocumentException;
160
161     /**
162      * Get the subject.
163      *
164      * @return the subject
165      *
166      * @throws DocumentException if an error occurs
167      * @deprecated Use {@link #getValues(java.lang.String)} or {@link #getFirstValue(java.lang.String)} instead.
168      */

169     String JavaDoc getSubject() throws DocumentException;
170
171     /**
172      * Set the DC Subject
173      *
174      * @param subject the subject
175      *
176      * @throws DocumentException if an error occurs
177      * @deprecated Use {@link #addValue(java.lang.String, java.lang.String)} or {@link #setValue(java.lang.String, java.lang.String)} instead.
178      */

179     void setSubject(String JavaDoc subject) throws DocumentException;
180
181     /**
182      * Get the publisher
183      *
184      * @return the publisher
185      *
186      * @throws DocumentException if an error occurs
187      * @deprecated Use {@link #getValues(java.lang.String)} or {@link #getFirstValue(java.lang.String)} instead.
188      */

189     String JavaDoc getPublisher() throws DocumentException;
190
191     /**
192      * Set the publisher
193      *
194      * @param publisher the publisher
195      *
196      * @throws DocumentException if an error occurs
197      * @deprecated Use {@link #addValue(java.lang.String, java.lang.String)} or {@link #setValue(java.lang.String, java.lang.String)} instead.
198      */

199     void setPublisher(String JavaDoc publisher) throws DocumentException;
200
201     /**
202      * Get the date of issue
203      *
204      * @return the date of issue
205      *
206      * @throws DocumentException if an error occurs
207      * @deprecated Use {@link #getValues(java.lang.String)} or {@link #getFirstValue(java.lang.String)} instead.
208      */

209     String JavaDoc getDateIssued() throws DocumentException;
210
211     /**
212      * Set the date of issue
213      *
214      * @param dateIssued the date of issue
215      *
216      * @throws DocumentException if an error occurs
217      * @deprecated Use {@link #addValue(java.lang.String, java.lang.String)} or {@link #setValue(java.lang.String, java.lang.String)} instead.
218      */

219     void setDateIssued(String JavaDoc dateIssued) throws DocumentException;
220
221     /**
222      * Get the date of creation
223      *
224      * @return the date of creation
225      *
226      * @throws DocumentException if an error occurs
227      * @deprecated Use {@link #getValues(java.lang.String)} or {@link #getFirstValue(java.lang.String)} instead.
228      */

229     String JavaDoc getDateCreated() throws DocumentException;
230
231     /**
232      * Set the date of creation
233      *
234      * @param dateCreated the date of creation
235      *
236      * @throws DocumentException if an error occurs
237      * @deprecated Use {@link #addValue(java.lang.String, java.lang.String)} or {@link #setValue(java.lang.String, java.lang.String)} instead.
238      */

239     void setDateCreated(String JavaDoc dateCreated) throws DocumentException;
240
241     /**
242      * Get the rights
243      *
244      * @return the rights
245      *
246      * @throws DocumentException if an error occurs
247      * @deprecated Use {@link #getValues(java.lang.String)} or {@link #getFirstValue(java.lang.String)} instead.
248      */

249     String JavaDoc getRights() throws DocumentException;
250
251     /**
252      * Set the DC Rights
253      *
254      * @param rights the rights
255      *
256      * @throws DocumentException if an error occurs
257      * @deprecated Use {@link #addValue(java.lang.String, java.lang.String)} or {@link #setValue(java.lang.String, java.lang.String)} instead.
258      */

259     void setRights(String JavaDoc rights) throws DocumentException;
260
261     /**
262      * Get isReferencedBy
263      *
264      * @return isReferencedBy
265      *
266      * @throws DocumentException if an error occurs
267      * @deprecated Use {@link #getValues(java.lang.String)} or {@link #getFirstValue(java.lang.String)} instead.
268      */

269     String JavaDoc getIsReferencedBy() throws DocumentException;
270
271     /**
272      * Set isReferencedBy
273      *
274      * @param isReferencedBy isReferencedBy
275      *
276      * @throws DocumentException if an error occurs
277      * @deprecated Use {@link #addValue(java.lang.String, java.lang.String)} or {@link #setValue(java.lang.String, java.lang.String)} instead.
278      */

279     void setIsReferencedBy(String JavaDoc isReferencedBy) throws DocumentException;
280
281     /**
282      * Returns the values for a certain key.
283      * @param key The key.
284      * @return An array of strings.
285      * @throws DocumentException when something went wrong.
286      */

287     String JavaDoc[] getValues(String JavaDoc key) throws DocumentException;
288
289     /**
290      * Returns the first value for a certain key.
291      * @param key The key.
292      * @return A string or <code>null</code> if no value is set for this key.
293      * @throws DocumentException if an error occurs.
294      */

295     String JavaDoc getFirstValue(String JavaDoc key) throws DocumentException;
296
297     /**
298      * Sets the value for a certain key. All existing values will be removed.
299      * @param key The key.
300      * @param value The value to set.
301      * @throws DocumentException when something went wrong.
302      */

303     void setValue(String JavaDoc key, String JavaDoc value) throws DocumentException;
304
305     /**
306      * Adds a value for a certain key.
307      * @param key The key.
308      * @param value The value to add.
309      * @throws DocumentException when something went wrong.
310      */

311     void addValue(String JavaDoc key, String JavaDoc value) throws DocumentException;
312
313     /**
314      * Add all values for a certain key.
315      *
316      * @param key The key
317      * @param values The value to add
318      * @throws DocumentException if something went wrong
319      */

320     void addValues(String JavaDoc key, String JavaDoc[] values) throws DocumentException;
321
322     /**
323      * Removes a specific value for a certain key.
324      * @param key The key.
325      * @param value The value to remove.
326      * @throws DocumentException when something went wrong.
327      */

328     void removeValue(String JavaDoc key, String JavaDoc value) throws DocumentException;
329
330     /**
331      * Removes all values for a certain key.
332      * @param key The key.
333      * @throws DocumentException when something went wrong.
334      */

335     void removeAllValues(String JavaDoc key) throws DocumentException;
336     
337     /**
338      * Replace the contents of the current dublin core by the
339      * contents of other.
340      * @param other The other dublin core object.
341      * @throws DocumentException if an error occurs.
342      */

343     void replaceBy(DublinCore other) throws DocumentException;
344
345 }
346
Popular Tags