View Javadoc
1   /*
2    * Licensed to The Apereo Foundation under one or more contributor license
3    * agreements. See the NOTICE file distributed with this work for additional
4    * information regarding copyright ownership.
5    *
6    *
7    * The Apereo Foundation licenses this file to you under the Educational
8    * Community License, Version 2.0 (the "License"); you may not use this file
9    * except in compliance with the License. You may obtain a copy of the License
10   * at:
11   *
12   *   http://opensource.org/licenses/ecl2.txt
13   *
14   * Unless required by applicable law or agreed to in writing, software
15   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
17   * License for the specific language governing permissions and limitations under
18   * the License.
19   *
20   */
21  
22  
23  package org.opencastproject.metadata.dublincore;
24  
25  import org.opencastproject.mediapackage.EName;
26  
27  import java.util.List;
28  import java.util.Map;
29  import java.util.Set;
30  
31  import javax.annotation.Nullable;
32  import javax.annotation.ParametersAreNonnullByDefault;
33  
34  /**
35   * This interface is mainly intended to encapsulate Dublin Core metadata, but it is also capable of maintaining
36   * proprietary metadata alongside the Dublin Core.
37   * <p>
38   * Dublin Core is an initiative to create a digital "library card catalog" for the Web. Dublin Core, in its simple form,
39   * is made up of 15 metadata (data that describes data) elements that offer expanded cataloging information and improved
40   * document indexing for search engine programs.
41   * <p>
42   * Two forms of Dublin Core exist: <code>Simple Dublin Core</code> and <code>Qualified Dublin Core</code>. Simple Dublin
43   * Core expresses properties as literal strings using just the 15 metadata elements from the Dublin Core Metadata
44   * Element Sets. Each element can have multiple values, but order is defined. Values may have an associated language.
45   * <br> Please see <a href="http://dublincore.org/documents/dces/">http://dublincore.org/documents/dces/</a> for further
46   * information.
47   * <p>
48   * Qualified Dublin Core increases the specificity of metadata by extending the set of properties (elements) and by
49   * adding information about encoding schemes. While enabling searches to be more specific, qualifiers are also more
50   * complex and can pose challenges to interoperability. <br>
51   * Please see <a href="http://dublincore.org/documents/dcmi-terms/">http://dublincore.org/documents/dcmi-terms/</a> and
52   * <a href="http://dublincore.org/documents/dc-xml-guidelines/">http://dublincore.org/documents/dc-xml-guidelines/</a>
53   * Section 5 for further information.
54   * <p>
55   * <h2>Current limitations</h2>
56   * <ul>
57   * <li>This interface assumes that Dublin Core metadata is stored as XML. According to the Dublin Core specification
58   * this is not necessary.
59   * <li>Encoding schemes aren't fully supported yet.
60   * </ul>
61   */
62  @ParametersAreNonnullByDefault
63  public interface DublinCore {
64  
65    /**
66     * Namespace name of the <code>/terms/</code> namespace. See <a
67     * href="http://dublincore.org/documents/dcmi-terms/">http://dublincore.org/documents/dcmi-terms/</a> for details.
68     */
69    String TERMS_NS_URI = "http://purl.org/dc/terms/";
70  
71    /**
72     * Namespace prefix if the <code>/terms/</code> namespace. See <a
73     * href="http://dublincore.org/documents/dcmi-terms/">http://dublincore.org/documents/dcmi-terms/</a> for details.
74     */
75    String TERMS_NS_PREFIX = "dcterms";
76  
77    /**
78     * Namespace name of the <code>/elements/1.1/</code> namespace. See <a
79     * href="http://dublincore.org/documents/dces/">http://dublincore.org/documents/dces/</a> for details.
80     */
81    String ELEMENTS_1_1_NS_URI = "http://purl.org/dc/elements/1.1/";
82  
83    /**
84     * Namespace prefix if the <code>Elements 1.1</code> namespace. See <a
85     * href="http://dublincore.org/documents/dces/">http://dublincore.org/documents/dces/</a> for details.
86     */
87    String ELEMENTS_1_1_NS_PREFIX = "dc";
88  
89    /**
90     * Dublin Core Property <dfn>abstract</dfn> in the /terms/ namespace. See <a
91     * href="http://dublincore.org/documents/dcmi-terms/#terms-abstract">DCMI Terms Abstract</a>.
92     */
93    EName PROPERTY_ABSTRACT = new EName(TERMS_NS_URI, "abstract");
94  
95    /**
96     * Dublin Core Property <dfn>accessRights</dfn> in the /terms/ namespace. See <a
97     * href="http://dublincore.org/documents/dcmi-terms/#terms-accessRights">DCMI Terms Access Rights</a>.
98     */
99    EName PROPERTY_ACCESS_RIGHTS = new EName(TERMS_NS_URI, "accessRights");
100 
101   /**
102    * Dublin Core Property <dfn>accrualMethod</dfn> in the /terms/ namespace. See <a
103    * href="http://dublincore.org/documents/dcmi-terms/#terms-accrualMethod">DCMI Terms Accrual Method</a>.
104    */
105   EName PROPERTY_ACCRUAL_METHOD = new EName(TERMS_NS_URI, "accrualMethod");
106 
107   /**
108    * Dublin Core Property <dfn>accrualPeriodicity</dfn> in the /terms/ namespace. See <a
109    * href="http://dublincore.org/documents/dcmi-terms/#terms-accrualPeriodicity">DCMI Terms Accrual Periodicity</a>.
110    */
111   EName PROPERTY_ACCRUAL_PERIODICITY = new EName(TERMS_NS_URI, "accrualPeriodicity");
112 
113   /**
114    * Dublin Core Property <dfn>accrualPolicy</dfn> in the /terms/ namespace. See <a
115    * href="http://dublincore.org/documents/dcmi-terms/#terms-accrualPolicy">DCMI Terms Accrual Policy</a>.
116    */
117   EName PROPERTY_ACCRUAL_POLICY = new EName(TERMS_NS_URI, "accrualPolicy");
118 
119   /**
120    * Dublin Core Property <dfn>alternative</dfn> in the /terms/ namespace. See <a
121    * href="http://dublincore.org/documents/dcmi-terms/#terms-alternative">DCMI Terms Alternative</a>.
122    */
123   EName PROPERTY_ALTERNATIVE = new EName(TERMS_NS_URI, "alternative");
124 
125   /**
126    * Dublin Core Property <dfn>audience</dfn> in the /terms/ namespace. See <a
127    * href="http://dublincore.org/documents/dcmi-terms/#terms-audience">DCMI Terms Audience</a>.
128    */
129   EName PROPERTY_AUDIENCE = new EName(TERMS_NS_URI, "audience");
130 
131   /**
132    * Dublin Core Property <dfn>available</dfn> in the /terms/ namespace. See <a
133    * href="http://dublincore.org/documents/dcmi-terms/#terms-available">DCMI Terms Available</a>.
134    */
135   EName PROPERTY_AVAILABLE = new EName(TERMS_NS_URI, "available");
136 
137   /**
138    * Dublin Core Property <dfn>bibliographicCitation</dfn> in the /terms/ namespace. See <a
139    * href="http://dublincore.org/documents/dcmi-terms/#terms-bibliographicCitation">DCMI Terms Bibliographic Citation
140    * </a>.
141    */
142   EName PROPERTY_BIBLIOGRAPHIC_CITATION = new EName(TERMS_NS_URI, "bibliographicCitation");
143 
144   /**
145    * Dublin Core Property <dfn>conformsTo</dfn> in the /terms/ namespace. See <a
146    * href="http://dublincore.org/documents/dcmi-terms/#terms-conformsTo">DCMI Terms Conforms To</a>.
147    */
148   EName PROPERTY_CONFORMS_TO = new EName(TERMS_NS_URI, "conformsTo");
149 
150   /**
151    * Dublin Core Property <dfn>contributor</dfn> in the /terms/ namespace. See <a
152    * href="http://dublincore.org/documents/dcmi-terms/#terms-contributor">DCMI Terms Contributor</a>.
153    */
154   EName PROPERTY_CONTRIBUTOR = new EName(TERMS_NS_URI, "contributor");
155 
156   /**
157    * Dublin Core Property <dfn>coverage</dfn> in the /terms/ namespace. See <a
158    * href="http://dublincore.org/documents/dcmi-terms/#terms-coverage">DCMI Terms Coverage</a>.
159    */
160   EName PROPERTY_COVERAGE = new EName(TERMS_NS_URI, "coverage");
161 
162   /**
163    * Dublin Core Property <dfn>created</dfn> in the /terms/ namespace. See <a
164    * href="http://dublincore.org/documents/dcmi-terms/#terms-created">DCMI Terms Created</a>.
165    */
166   EName PROPERTY_CREATED = new EName(TERMS_NS_URI, "created");
167 
168   /**
169    * Dublin Core Property <dfn>creator</dfn> in the /terms/ namespace. See <a
170    * href="http://dublincore.org/documents/dcmi-terms/#terms-creator">DCMI Terms Creator</a>.
171    */
172   EName PROPERTY_CREATOR = new EName(TERMS_NS_URI, "creator");
173 
174   /**
175    * Dublin Core Property <dfn>date</dfn> in the /terms/ namespace. See <a
176    * href="http://dublincore.org/documents/dcmi-terms/#terms-date">DCMI Terms Date</a>.
177    */
178   EName PROPERTY_DATE = new EName(TERMS_NS_URI, "date");
179 
180   /**
181    * Dublin Core Property <dfn>dateAccepted</dfn> in the /terms/ namespace. See <a
182    * href="http://dublincore.org/documents/dcmi-terms/#terms-dateAccepted">DCMI Terms Date Accepted</a>.
183    */
184   EName PROPERTY_DATE_ACCEPTED = new EName(TERMS_NS_URI, "dateAccepted");
185 
186   /**
187    * Dublin Core Property <dfn>dateCopyrighted</dfn> in the /terms/ namespace. See <a
188    * href="http://dublincore.org/documents/dcmi-terms/#terms-dateCopyrighted">DCMI Terms Date Copyrighted</a>.
189    */
190   EName PROPERTY_DATE_COPYRIGHTED = new EName(TERMS_NS_URI, "dateCopyrighted");
191 
192   /**
193    * Dublin Core Property <dfn>dateSubmitted</dfn> in the /terms/ namespace. See <a
194    * href="http://dublincore.org/documents/dcmi-terms/#terms-dateSubmitted">DCMI Terms Date Submitted</a>.
195    */
196   EName PROPERTY_DATE_SUBMITTED = new EName(TERMS_NS_URI, "dateSubmitted");
197 
198   /**
199    * Dublin Core Property <dfn>description</dfn> in the /terms/ namespace. See <a
200    * href="http://dublincore.org/documents/dcmi-terms/#terms-description">DCMI Terms Description</a>.
201    */
202   EName PROPERTY_DESCRIPTION = new EName(TERMS_NS_URI, "description");
203 
204   /**
205    * Dublin Core Property <dfn>educationLevel</dfn> in the /terms/ namespace. See <a
206    * href="http://dublincore.org/documents/dcmi-terms/#terms-educationLevel">DCMI Terms Education Level</a>.
207    */
208   EName PROPERTY_EDUCATION_LEVEL = new EName(TERMS_NS_URI, "educationLevel");
209 
210   /**
211    * Dublin Core Property <dfn>extent</dfn> in the /terms/ namespace. See <a
212    * href="http://dublincore.org/documents/dcmi-terms/#terms-extent">DCMI Terms Extent</a>.
213    */
214   EName PROPERTY_EXTENT = new EName(TERMS_NS_URI, "extent");
215 
216   /**
217    * Dublin Core Property <dfn>format</dfn> in the /terms/ namespace. See <a
218    * href="http://dublincore.org/documents/dcmi-terms/#terms-format">DCMI Terms Format</a>.
219    */
220   EName PROPERTY_FORMAT = new EName(TERMS_NS_URI, "format");
221 
222   /**
223    * Dublin Core Property <dfn>hasFormat</dfn> in the /terms/ namespace. See <a
224    * href="http://dublincore.org/documents/dcmi-terms/#terms-hasFormat">DCMI Terms Has Format</a>.
225    */
226   EName PROPERTY_HAS_FORMAT = new EName(TERMS_NS_URI, "hasFormat");
227 
228   /**
229    * Dublin Core Property <dfn>hasPart</dfn> in the /terms/ namespace. See <a
230    * href="http://dublincore.org/documents/dcmi-terms/#terms-hasPart">DCMI Terms Has Part</a>.
231    */
232   EName PROPERTY_HAS_PART = new EName(TERMS_NS_URI, "hasPart");
233 
234   /**
235    * Dublin Core Property <dfn>hasVersion</dfn> in the /terms/ namespace. See <a
236    * href="http://dublincore.org/documents/dcmi-terms/#terms-hasVersion">DCMI Terms Has Version</a>.
237    */
238   EName PROPERTY_HAS_VERSION = new EName(TERMS_NS_URI, "hasVersion");
239 
240   /**
241    * Dublin Core Property <dfn>identifier</dfn> in the /terms/ namespace. See <a
242    * href="http://dublincore.org/documents/dcmi-terms/#terms-identifier">DCMI Terms Identifier</a>.
243    */
244   EName PROPERTY_IDENTIFIER = new EName(TERMS_NS_URI, "identifier");
245 
246   /**
247    * Dublin Core Property <dfn>instructionalMethod</dfn> in the /terms/ namespace. See <a
248    * href="http://dublincore.org/documents/dcmi-terms/#terms-instructionalMethod">DCMI Terms Instructional Method</a>.
249    */
250   EName PROPERTY_INSTRUCTIONAL_METHOD = new EName(TERMS_NS_URI, "instructionalMethod");
251 
252   /**
253    * Dublin Core Property <dfn>isFormatOf</dfn> in the /terms/ namespace. See <a
254    * href="http://dublincore.org/documents/dcmi-terms/#terms-isFormatOf">DCMI Terms Is Format Of</a>.
255    */
256   EName PROPERTY_IS_FORMAT_OF = new EName(TERMS_NS_URI, "isFormatOf");
257 
258   /**
259    * Dublin Core Property <dfn>isPartOf</dfn> in the /terms/ namespace. See <a
260    * href="http://dublincore.org/documents/dcmi-terms/#terms-isPartOf">DCMI Terms Is Part Of</a>.
261    */
262   EName PROPERTY_IS_PART_OF = new EName(TERMS_NS_URI, "isPartOf");
263 
264   /**
265    * Dublin Core Property <dfn>isReferencedBy</dfn> in the /terms/ namespace. See <a
266    * href="http://dublincore.org/documents/dcmi-terms/#terms-isReferencedBy">DCMI Terms Is Referenced By</a>.
267    */
268   EName PROPERTY_IS_REFERENCED_BY = new EName(TERMS_NS_URI, "isReferencedBy");
269 
270   /**
271    * Dublin Core Property <dfn>isReplacedBy</dfn> in the /terms/ namespace. See <a
272    * href="http://dublincore.org/documents/dcmi-terms/#terms-isReplacedBy">DCMI Terms Is Replaced By</a>.
273    */
274   EName PROPERTY_IS_REPLACED_BY = new EName(TERMS_NS_URI, "isReplacedBy");
275 
276   /**
277    * Dublin Core Property <dfn>isRequiredBy</dfn> in the /terms/ namespace. See <a
278    * href="http://dublincore.org/documents/dcmi-terms/#terms-isRequiredBy">DCMI Terms Is Required By</a>.
279    */
280   EName PROPERTY_IS_REQUIRED_BY = new EName(TERMS_NS_URI, "isRequiredBy");
281 
282   /**
283    * Dublin Core Property <dfn>issued</dfn> in the /terms/ namespace. See <a
284    * href="http://dublincore.org/documents/dcmi-terms/#terms-issued">DCMI Terms Issued</a>.
285    */
286   EName PROPERTY_ISSUED = new EName(TERMS_NS_URI, "issued");
287 
288   /**
289    * Dublin Core Property <dfn>isVersionOf</dfn> in the /terms/ namespace. See <a
290    * href="http://dublincore.org/documents/dcmi-terms/#terms-isVersionOf">DCMI Terms Is Version Of</a>.
291    */
292   EName PROPERTY_IS_VERSION_OF = new EName(TERMS_NS_URI, "isVersionOf");
293 
294   /**
295    * Dublin Core Property <dfn>language</dfn> in the /terms/ namespace. See <a
296    * href="http://dublincore.org/documents/dcmi-terms/#terms-language">DCMI Terms Language</a>.
297    */
298   EName PROPERTY_LANGUAGE = new EName(TERMS_NS_URI, "language");
299 
300   /**
301    * Dublin Core Property <dfn>license</dfn> in the /terms/ namespace. See <a
302    * href="http://dublincore.org/documents/dcmi-terms/#terms-license">DCMI Terms License</a>.
303    */
304   EName PROPERTY_LICENSE = new EName(TERMS_NS_URI, "license");
305 
306   /**
307    * Dublin Core Property <dfn>mediator</dfn> in the /terms/ namespace. See <a
308    * href="http://dublincore.org/documents/dcmi-terms/#terms-mediator">DCMI Terms Mediator</a>.
309    */
310   EName PROPERTY_MEDIATOR = new EName(TERMS_NS_URI, "mediator");
311 
312   /**
313    * Dublin Core Property <dfn>medium</dfn> in the /terms/ namespace. See <a
314    * href="http://dublincore.org/documents/dcmi-terms/#terms-medium">DCMI Terms Medium</a>.
315    */
316   EName PROPERTY_MEDIUM = new EName(TERMS_NS_URI, "medium");
317 
318   /**
319    * Dublin Core Property <dfn>modified</dfn> in the /terms/ namespace. See <a
320    * href="http://dublincore.org/documents/dcmi-terms/#terms-modified">DCMI Terms Modified</a>.
321    */
322   EName PROPERTY_MODIFIED = new EName(TERMS_NS_URI, "modified");
323 
324   /**
325    * Dublin Core Property <dfn>provenance</dfn> in the /terms/ namespace. See <a
326    * href="http://dublincore.org/documents/dcmi-terms/#terms-provenance">DCMI Terms Provenance</a>.
327    */
328   EName PROPERTY_PROVENANCE = new EName(TERMS_NS_URI, "provenance");
329 
330   /**
331    * Dublin Core Property <dfn>publisher</dfn> in the /terms/ namespace. See <a
332    * href="http://dublincore.org/documents/dcmi-terms/#terms-publisher">DCMI Terms Publisher</a>.
333    */
334   EName PROPERTY_PUBLISHER = new EName(TERMS_NS_URI, "publisher");
335 
336   /**
337    * Dublin Core Property <dfn>references</dfn> in the /terms/ namespace. See <a
338    * href="http://dublincore.org/documents/dcmi-terms/#terms-references">DCMI Terms References</a>.
339    */
340   EName PROPERTY_REFERENCES = new EName(TERMS_NS_URI, "references");
341 
342   /**
343    * Dublin Core Property <dfn>relation</dfn> in the /terms/ namespace. See <a
344    * href="http://dublincore.org/documents/dcmi-terms/#terms-relation">DCMI Terms Relation</a>.
345    */
346   EName PROPERTY_RELATION = new EName(TERMS_NS_URI, "relation");
347 
348   /**
349    * Dublin Core Property <dfn>replaces</dfn> in the /terms/ namespace. See <a
350    * href="http://dublincore.org/documents/dcmi-terms/#terms-replaces">DCMI Terms Replaces</a>.
351    */
352   EName PROPERTY_REPLACES = new EName(TERMS_NS_URI, "replaces");
353 
354   /**
355    * Dublin Core Property <dfn>requires</dfn> in the /terms/ namespace. See <a
356    * href="http://dublincore.org/documents/dcmi-terms/#terms-requires">DCMI Terms Requires</a>.
357    */
358   EName PROPERTY_REQUIRES = new EName(TERMS_NS_URI, "requires");
359 
360   /**
361    * Dublin Core Property <dfn>rights</dfn> in the /terms/ namespace. See <a
362    * href="http://dublincore.org/documents/dcmi-terms/#terms-rights">DCMI Terms Rights</a>.
363    */
364   EName PROPERTY_RIGHTS = new EName(TERMS_NS_URI, "rights");
365 
366   /**
367    * Dublin Core Property <dfn>rightsHolder</dfn> in the /terms/ namespace. See <a
368    * href="http://dublincore.org/documents/dcmi-terms/#terms-rightsHolder">DCMI Terms Rights Holder</a>.
369    */
370   EName PROPERTY_RIGHTS_HOLDER = new EName(TERMS_NS_URI, "rightsHolder");
371 
372   /**
373    * Dublin Core Property <dfn>source</dfn> in the /terms/ namespace. See <a
374    * href="http://dublincore.org/documents/dcmi-terms/#terms-source">DCMI Terms Source</a>.
375    */
376   EName PROPERTY_SOURCE = new EName(TERMS_NS_URI, "source");
377 
378   /**
379    * Dublin Core Property <dfn>spatial</dfn> in the /terms/ namespace. See <a
380    * href="http://dublincore.org/documents/dcmi-terms/#terms-spatial">DCMI Terms Spatial</a>.
381    */
382   EName PROPERTY_SPATIAL = new EName(TERMS_NS_URI, "spatial");
383 
384   /**
385    * Dublin Core Property <dfn>subject</dfn> in the /terms/ namespace. See <a
386    * href="http://dublincore.org/documents/dcmi-terms/#terms-subject">DCMI Terms Subject</a>.
387    */
388   EName PROPERTY_SUBJECT = new EName(TERMS_NS_URI, "subject");
389 
390   /**
391    * Dublin Core Property <dfn>tableOfContents</dfn> in the /terms/ namespace. See <a
392    * href="http://dublincore.org/documents/dcmi-terms/#terms-tableOfContents">DCMI Terms Table Of Contents</a>.
393    */
394   EName PROPERTY_TABLE_OF_CONTENTS = new EName(TERMS_NS_URI, "tableOfContents");
395 
396   /**
397    * Dublin Core Property <dfn>temporal</dfn> in the /terms/ namespace. See <a
398    * href="http://dublincore.org/documents/dcmi-terms/#terms-temporal">DCMI Terms Temporal</a>.
399    */
400   EName PROPERTY_TEMPORAL = new EName(TERMS_NS_URI, "temporal");
401 
402   /**
403    * Dublin Core Property <dfn>title</dfn> in the /terms/ namespace. See <a
404    * href="http://dublincore.org/documents/dcmi-terms/#terms-title">DCMI Terms Title</a>.
405    */
406   EName PROPERTY_TITLE = new EName(TERMS_NS_URI, "title");
407 
408   /**
409    * Dublin Core Property <dfn>type</dfn> in the /terms/ namespace. See <a
410    * href="http://dublincore.org/documents/dcmi-terms/#terms-type">DCMI Terms Type</a>.
411    */
412   EName PROPERTY_TYPE = new EName(TERMS_NS_URI, "type");
413 
414   /**
415    * Dublin Core Property <dfn>valid</dfn> in the /terms/ namespace. See <a
416    * href="http://dublincore.org/documents/dcmi-terms/#terms-valid">DCMI Terms Valid</a>.
417    */
418   EName PROPERTY_VALID = new EName(TERMS_NS_URI, "valid");
419 
420   /**
421    * Syntax encoding scheme <code>Box</code>. See <a
422    * href="http://dublincore.org/documents/dcmi-terms/#H5">http://dublincore.org/documents/dcmi-terms/#H5</a>
423    */
424   EName ENC_SCHEME_BOX = new EName(TERMS_NS_URI, "Box");
425 
426   /**
427    * Syntax encoding scheme <code>ISO3166</code>. See <a
428    * href="http://dublincore.org/documents/dcmi-terms/#H5">http://dublincore.org/documents/dcmi-terms/#H5</a>
429    */
430   EName ENC_SCHEME_ISO3166 = new EName(TERMS_NS_URI, "ISO3166");
431 
432   /**
433    * Syntax encoding scheme <code>ISO639-1</code>. See <a
434    * href="http://dublincore.org/documents/dcmi-terms/#H5">http://dublincore.org/documents/dcmi-terms/#H5</a>
435    */
436   EName ENC_SCHEME_ISO639_2 = new EName(TERMS_NS_URI, "ISO639-1");
437 
438   /**
439    * Syntax encoding scheme <code>ISO639-3</code>. See <a
440    * href="http://dublincore.org/documents/dcmi-terms/#H5">http://dublincore.org/documents/dcmi-terms/#H5</a>
441    */
442   EName ENC_SCHEME_ISO639_3 = new EName(TERMS_NS_URI, "ISO639-3");
443 
444   /**
445    * Syntax encoding scheme <code>Period</code>. See <a
446    * href="http://dublincore.org/documents/dcmi-terms/#H5">http://dublincore.org/documents/dcmi-terms/#H5</a>
447    */
448   EName ENC_SCHEME_PERIOD = new EName(TERMS_NS_URI, "Period");
449 
450   /**
451    * Syntax encoding scheme <code>Point</code>. See <a
452    * href="http://dublincore.org/documents/dcmi-terms/#H5">http://dublincore.org/documents/dcmi-terms/#H5</a>
453    */
454   EName ENC_SCHEME_POINT = new EName(TERMS_NS_URI, "Point");
455 
456   /**
457    * Syntax encoding scheme <code>RFC1766</code>. See <a
458    * href="http://dublincore.org/documents/dcmi-terms/#H5">http://dublincore.org/documents/dcmi-terms/#H5</a>
459    */
460   EName ENC_SCHEME_RFC1766 = new EName(TERMS_NS_URI, "RFC1766");
461 
462   /**
463    * Syntax encoding scheme <code>RFC3066</code>. See <a
464    * href="http://dublincore.org/documents/dcmi-terms/#H5">http://dublincore.org/documents/dcmi-terms/#H5</a>
465    */
466   EName ENC_SCHEME_RFC3066 = new EName(TERMS_NS_URI, "RFC3066");
467 
468   /**
469    * Syntax encoding scheme <code>RFC4646</code>. See <a
470    * href="http://dublincore.org/documents/dcmi-terms/#H5">http://dublincore.org/documents/dcmi-terms/#H5</a>
471    */
472   EName ENC_SCHEME_RFC4646 = new EName(TERMS_NS_URI, "RFC4646");
473 
474   /**
475    * Syntax encoding scheme <code>URI</code>. See <a
476    * href="http://dublincore.org/documents/dcmi-terms/#H5">http://dublincore.org/documents/dcmi-terms/#H5</a>
477    */
478   EName ENC_SCHEME_URI = new EName(TERMS_NS_URI, "URI");
479 
480   /**
481    * Syntax encoding scheme <code>W3CDTF</code>. See <a
482    * href="http://dublincore.org/documents/dcmi-terms/#H5">http://dublincore.org/documents/dcmi-terms/#H5</a>
483    */
484   EName ENC_SCHEME_W3CDTF = new EName(TERMS_NS_URI, "W3CDTF");
485 
486   /**
487    * Syntax encoding scheme <code>ISO8601</code> used for durations. See <a
488    * href="http://en.wikipedia.org/wiki/ISO_8601#Durations">http://en.wikipedia.org/wiki/ISO_8601#Durations</a>
489    */
490   EName ENC_SCHEME_ISO8601 = new EName(TERMS_NS_URI, "ISO8601");
491 
492   /* Language constants */
493 
494   /** Language code for properties without language information. */
495   String LANGUAGE_UNDEFINED = "__";
496 
497   /**
498    * Language code that matches any language.
499    * <p>
500    * Use this code whenever you need values in <em>all</em> languages or you don't care about the language. Note that
501    * all methods taking this as a legal value for the language parameter are adviced to return at first a value for
502    * {@link #LANGUAGE_UNDEFINED} if multiple values exist and only one value is wanted.
503    */
504   String LANGUAGE_ANY = "**";
505 
506   /**
507    * Get all values of a property, either in a certain language or in all contained languages.
508    *
509    * @param property
510    *         the property qname
511    * @param language
512    *         a language code, {@link #LANGUAGE_UNDEFINED} or {@link #LANGUAGE_ANY}
513    * @return a list of values which is empty if the property is not set
514    */
515   List<String> get(EName property, String language);
516 
517   /**
518    * Get all values of a property no matter what language they have.
519    *
520    * @param property
521    *         the property's expanded name
522    * @return a list of values
523    */
524   List<DublinCoreValue> get(EName property);
525 
526   /** Get all contained values grouped by property. */
527   Map<EName, List<DublinCoreValue>> getValues();
528 
529   /** Get all values as a flat list. */
530   List<DublinCoreValue> getValuesFlat();
531 
532   /**
533    * Like {@link #get(EName, String)} but returns only the first value of the list. This method is intended to be a
534    * convenience method for those properties that have only one value.
535    * <p>
536    * Please note, that if you pass {@link #LANGUAGE_ANY}, values with an {@link #LANGUAGE_UNDEFINED undefined language}
537    * are returned preferably.
538    *
539    * @param property
540    *         the property's expanded name
541    * @param language
542    *         a language code, {@link #LANGUAGE_UNDEFINED} or {@link #LANGUAGE_ANY}
543    * @return the value or null
544    */
545   @Nullable String getFirst(EName property, String language);
546 
547   /**
548    * Get the first value of a property, no matter what language it is in. Like a call of
549    * {@link #getFirst(EName, String)} with <code>language = {@link #LANGUAGE_ANY}</code>. Please not that values with an
550    * {@link #LANGUAGE_UNDEFINED undefined language} are returned preferably.
551    *
552    * @param property
553    *         the property's expanded name
554    * @return the value or null
555    * @see #getFirst(EName, String)
556    */
557   @Nullable String getFirst(EName property);
558 
559   /**
560    * Get the first value of a property, no matter what language it is in. Like a call of
561    * {@link #getFirst(EName, String)} with <code>language = {@link #LANGUAGE_ANY}</code>. Please not that values with an
562    * {@link #LANGUAGE_UNDEFINED undefined language} are returned preferably.
563    *
564    * @param property
565    *         the property's expanded name
566    * @return the value or null
567    * @see #getFirst(EName, String)
568    */
569   @Nullable DublinCoreValue getFirstVal(EName property);
570 
571   /**
572    * Return all values separated by a delimiter.
573    *
574    * @param property
575    *         the property's expanded name
576    * @param language
577    *         a language code, {@link #LANGUAGE_UNDEFINED} or {@link #LANGUAGE_ANY}
578    * @param delimiter
579    *         a delimiter
580    * @return the concatenated values or null (FIXME bad API. Should not return null)
581    */
582   @Nullable String getAsText(EName property, String language, String delimiter);
583 
584   /**
585    * Return all languages this property has values in.
586    *
587    * @param property
588    *         the property's expanded name
589    * @return a set of languages which may be empty in case the property does not have any value. Note that the state of
590    *         having no language defined ({@link #LANGUAGE_UNDEFINED}) is treated like a language.
591    */
592   Set<String> getLanguages(EName property);
593 
594   /**
595    * Check, if a property has multiple values assigned.
596    *
597    * @param property
598    *         the property's expanded name
599    * @param language
600    *         a language code, {@link #LANGUAGE_UNDEFINED} or {@link #LANGUAGE_ANY}
601    */
602   boolean hasMultipleValues(EName property, String language);
603 
604   /**
605    * Check if a property has multiple values, ignoring any language information.
606    *
607    * @param property
608    *         the property's expanded name
609    */
610   boolean hasMultipleValues(EName property);
611 
612   /**
613    * Check if a property has at least one value assigned.
614    *
615    * @param property
616    *         the property's expanded name
617    * @param language
618    *         a language code, {@link #LANGUAGE_UNDEFINED} or {@link #LANGUAGE_ANY}
619    */
620   boolean hasValue(EName property, String language);
621 
622   /**
623    * Check if a property has at least on value without language information assigned. Like a call of
624    * {@link #hasValue(EName)} with <code>language = {@link #LANGUAGE_ANY}</code>
625    *
626    * @param property
627    *         the property's expanded name
628    */
629   boolean hasValue(EName property);
630 
631   /**
632    * Set a property to the given value, overwriting an existing value in the given language.
633    * <p>
634    * Please note that it is not allowed to pass {@link #LANGUAGE_ANY} as <code>language</code>.
635    *
636    * @param property
637    *         the property's expanded name
638    * @param value
639    *         the value or null to remove all values of the given language for this property
640    * @param language
641    *         a language code or {@link #LANGUAGE_UNDEFINED}
642    */
643   void set(EName property, @Nullable String value, String language);
644 
645   /**
646    * Set a value without language information to a property, overwriting an existing value. This is like calling
647    * {@link #set(EName, String, String)} with <code>language = {@link #LANGUAGE_UNDEFINED}</code>
648    *
649    * @param property
650    *         the property's expanded name
651    * @param value
652    *         the value or null to remove all values of {@link #LANGUAGE_UNDEFINED} for this property
653    */
654   void set(EName property, @Nullable String value);
655 
656   /**
657    * Set a property to a value, overwriting an existing value.
658    *
659    * @param property
660    *         the property's expanded name
661    * @param value
662    *         the value or null to completely remove the property (all values in all languages)
663    */
664   void set(EName property, @Nullable DublinCoreValue value);
665 
666   /**
667    * Set a property to a list of values, overwriting any existing.
668    *
669    * @param property
670    *         the property's expanded name
671    * @param values
672    *         the values or an empty list
673    */
674   void set(EName property, List<DublinCoreValue> values);
675 
676   /**
677    * Add a value to a property.
678    * <p>
679    * Please note that it is not allowed to pass {@link #LANGUAGE_ANY} as <code>language</code>.
680    *
681    * @param property
682    *         the property's expanded name
683    * @param value
684    *         the value
685    * @param language
686    *         a language code or {@link #LANGUAGE_UNDEFINED}
687    */
688   void add(EName property, String value, String language);
689 
690   /**
691    * Add a value without language information to a property. This is like calling {@link #add(EName, String, String)}
692    * with <code>language = {@link #LANGUAGE_UNDEFINED}</code>
693    *
694    * @param property
695    *         the property's expanded name
696    * @param value
697    *         the value
698    */
699   void add(EName property, String value);
700 
701   /**
702    * Add a value to a property.
703    *
704    * @param property
705    *         the property's expanded name
706    * @param value
707    *         the value
708    */
709   void add(EName property, DublinCoreValue value);
710 
711   /**
712    * Remove values of a property.
713    * <ul>
714    * <li> {@link #LANGUAGE_ANY}: remove the whole element
715    * <li> {@link #LANGUAGE_UNDEFINED}: remove only values with no language information
716    * <li>language code: remove values of that language
717    * </ul>
718    *
719    * @param property
720    *         the property's expanded name
721    * @param language
722    *         a language code, {@link #LANGUAGE_UNDEFINED} or {@link #LANGUAGE_ANY}
723    */
724   void remove(EName property, String language);
725 
726   /**
727    * Remove a complete property.
728    *
729    * @param property
730    *         the property's expanded name
731    */
732   void remove(EName property);
733 
734   /** Clear the Dublin Core */
735   void clear();
736 
737   /**
738    * Return all contained properties.
739    *
740    * @return a set of property names
741    */
742   Set<EName> getProperties();
743 }