Interface DublinCore
- All Known Implementing Classes:
DublinCoreCatalog
Dublin Core is an initiative to create a digital "library card catalog" for the Web. Dublin Core, in its simple form, is made up of 15 metadata (data that describes data) elements that offer expanded cataloging information and improved document indexing for search engine programs.
Two forms of Dublin Core exist: Simple Dublin Core and Qualified Dublin Core. Simple Dublin
Core expresses properties as literal strings using just the 15 metadata elements from the Dublin Core Metadata
Element Sets. Each element can have multiple values, but order is defined. Values may have an associated language.
Please see http://dublincore.org/documents/dces/ for further
information.
Qualified Dublin Core increases the specificity of metadata by extending the set of properties (elements) and by
adding information about encoding schemes. While enabling searches to be more specific, qualifiers are also more
complex and can pose challenges to interoperability.
Please see http://dublincore.org/documents/dcmi-terms/ and
http://dublincore.org/documents/dc-xml-guidelines/
Section 5 for further information.
Current limitations
- This interface assumes that Dublin Core metadata is stored as XML. According to the Dublin Core specification this is not necessary.
- Encoding schemes aren't fully supported yet.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringNamespace prefix if theElements 1.1namespace.static final StringNamespace name of the/elements/1.1/namespace.static final ENameSyntax encoding schemeBox.static final ENameSyntax encoding schemeISO3166.static final ENameSyntax encoding schemeISO639-1.static final ENameSyntax encoding schemeISO639-3.static final ENameSyntax encoding schemeISO8601used for durations.static final ENameSyntax encoding schemePeriod.static final ENameSyntax encoding schemePoint.static final ENameSyntax encoding schemeRFC1766.static final ENameSyntax encoding schemeRFC3066.static final ENameSyntax encoding schemeRFC4646.static final ENameSyntax encoding schemeURI.static final ENameSyntax encoding schemeW3CDTF.static final StringLanguage code that matches any language.static final StringLanguage code for properties without language information.static final ENameDublin Core Property abstract in the /terms/ namespace.static final ENameDublin Core Property accessRights in the /terms/ namespace.static final ENameDublin Core Property accrualMethod in the /terms/ namespace.static final ENameDublin Core Property accrualPeriodicity in the /terms/ namespace.static final ENameDublin Core Property accrualPolicy in the /terms/ namespace.static final ENameDublin Core Property alternative in the /terms/ namespace.static final ENameDublin Core Property audience in the /terms/ namespace.static final ENameDublin Core Property available in the /terms/ namespace.static final ENameDublin Core Property bibliographicCitation in the /terms/ namespace.static final ENameDublin Core Property conformsTo in the /terms/ namespace.static final ENameDublin Core Property contributor in the /terms/ namespace.static final ENameDublin Core Property coverage in the /terms/ namespace.static final ENameDublin Core Property created in the /terms/ namespace.static final ENameDublin Core Property creator in the /terms/ namespace.static final ENameDublin Core Property date in the /terms/ namespace.static final ENameDublin Core Property dateAccepted in the /terms/ namespace.static final ENameDublin Core Property dateCopyrighted in the /terms/ namespace.static final ENameDublin Core Property dateSubmitted in the /terms/ namespace.static final ENameDublin Core Property description in the /terms/ namespace.static final ENameDublin Core Property educationLevel in the /terms/ namespace.static final ENameDublin Core Property extent in the /terms/ namespace.static final ENameDublin Core Property format in the /terms/ namespace.static final ENameDublin Core Property hasFormat in the /terms/ namespace.static final ENameDublin Core Property hasPart in the /terms/ namespace.static final ENameDublin Core Property hasVersion in the /terms/ namespace.static final ENameDublin Core Property identifier in the /terms/ namespace.static final ENameDublin Core Property instructionalMethod in the /terms/ namespace.static final ENameDublin Core Property isFormatOf in the /terms/ namespace.static final ENameDublin Core Property isPartOf in the /terms/ namespace.static final ENameDublin Core Property isReferencedBy in the /terms/ namespace.static final ENameDublin Core Property isReplacedBy in the /terms/ namespace.static final ENameDublin Core Property isRequiredBy in the /terms/ namespace.static final ENameDublin Core Property isVersionOf in the /terms/ namespace.static final ENameDublin Core Property issued in the /terms/ namespace.static final ENameDublin Core Property language in the /terms/ namespace.static final ENameDublin Core Property license in the /terms/ namespace.static final ENameDublin Core Property mediator in the /terms/ namespace.static final ENameDublin Core Property medium in the /terms/ namespace.static final ENameDublin Core Property modified in the /terms/ namespace.static final ENameDublin Core Property provenance in the /terms/ namespace.static final ENameDublin Core Property publisher in the /terms/ namespace.static final ENameDublin Core Property references in the /terms/ namespace.static final ENameDublin Core Property relation in the /terms/ namespace.static final ENameDublin Core Property replaces in the /terms/ namespace.static final ENameDublin Core Property requires in the /terms/ namespace.static final ENameDublin Core Property rights in the /terms/ namespace.static final ENameDublin Core Property rightsHolder in the /terms/ namespace.static final ENameDublin Core Property source in the /terms/ namespace.static final ENameDublin Core Property spatial in the /terms/ namespace.static final ENameDublin Core Property subject in the /terms/ namespace.static final ENameDublin Core Property tableOfContents in the /terms/ namespace.static final ENameDublin Core Property temporal in the /terms/ namespace.static final ENameDublin Core Property title in the /terms/ namespace.static final ENameDublin Core Property type in the /terms/ namespace.static final ENameDublin Core Property valid in the /terms/ namespace.static final StringNamespace prefix if the/terms/namespace.static final StringNamespace name of the/terms/namespace. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a value without language information to a property.voidAdd a value to a property.voidadd(EName property, DublinCoreValue value) Add a value to a property.voidclear()Clear the Dublin CoreGet all values of a property no matter what language they have.Get all values of a property, either in a certain language or in all contained languages.Return all values separated by a delimiter.Get the first value of a property, no matter what language it is in.Likeget(EName, String)but returns only the first value of the list.getFirstVal(EName property) Get the first value of a property, no matter what language it is in.getLanguages(EName property) Return all languages this property has values in.Return all contained properties.Get all contained values grouped by property.Get all values as a flat list.booleanhasMultipleValues(EName property) Check if a property has multiple values, ignoring any language information.booleanhasMultipleValues(EName property, String language) Check, if a property has multiple values assigned.booleanCheck if a property has at least on value without language information assigned.booleanCheck if a property has at least one value assigned.voidRemove a complete property.voidRemove values of a property.voidSet a value without language information to a property, overwriting an existing value.voidSet a property to the given value, overwriting an existing value in the given language.voidset(EName property, List<DublinCoreValue> values) Set a property to a list of values, overwriting any existing.voidset(EName property, DublinCoreValue value) Set a property to a value, overwriting an existing value.
-
Field Details
-
TERMS_NS_URI
Namespace name of the/terms/namespace. See http://dublincore.org/documents/dcmi-terms/ for details.- See Also:
-
TERMS_NS_PREFIX
Namespace prefix if the/terms/namespace. See http://dublincore.org/documents/dcmi-terms/ for details.- See Also:
-
ELEMENTS_1_1_NS_URI
Namespace name of the/elements/1.1/namespace. See http://dublincore.org/documents/dces/ for details.- See Also:
-
ELEMENTS_1_1_NS_PREFIX
Namespace prefix if theElements 1.1namespace. See http://dublincore.org/documents/dces/ for details.- See Also:
-
PROPERTY_ABSTRACT
Dublin Core Property abstract in the /terms/ namespace. See DCMI Terms Abstract. -
PROPERTY_ACCESS_RIGHTS
Dublin Core Property accessRights in the /terms/ namespace. See DCMI Terms Access Rights. -
PROPERTY_ACCRUAL_METHOD
Dublin Core Property accrualMethod in the /terms/ namespace. See DCMI Terms Accrual Method. -
PROPERTY_ACCRUAL_PERIODICITY
Dublin Core Property accrualPeriodicity in the /terms/ namespace. See DCMI Terms Accrual Periodicity. -
PROPERTY_ACCRUAL_POLICY
Dublin Core Property accrualPolicy in the /terms/ namespace. See DCMI Terms Accrual Policy. -
PROPERTY_ALTERNATIVE
Dublin Core Property alternative in the /terms/ namespace. See DCMI Terms Alternative. -
PROPERTY_AUDIENCE
Dublin Core Property audience in the /terms/ namespace. See DCMI Terms Audience. -
PROPERTY_AVAILABLE
Dublin Core Property available in the /terms/ namespace. See DCMI Terms Available. -
PROPERTY_BIBLIOGRAPHIC_CITATION
Dublin Core Property bibliographicCitation in the /terms/ namespace. See DCMI Terms Bibliographic Citation. -
PROPERTY_CONFORMS_TO
Dublin Core Property conformsTo in the /terms/ namespace. See DCMI Terms Conforms To. -
PROPERTY_CONTRIBUTOR
Dublin Core Property contributor in the /terms/ namespace. See DCMI Terms Contributor. -
PROPERTY_COVERAGE
Dublin Core Property coverage in the /terms/ namespace. See DCMI Terms Coverage. -
PROPERTY_CREATED
Dublin Core Property created in the /terms/ namespace. See DCMI Terms Created. -
PROPERTY_CREATOR
Dublin Core Property creator in the /terms/ namespace. See DCMI Terms Creator. -
PROPERTY_DATE
Dublin Core Property date in the /terms/ namespace. See DCMI Terms Date. -
PROPERTY_DATE_ACCEPTED
Dublin Core Property dateAccepted in the /terms/ namespace. See DCMI Terms Date Accepted. -
PROPERTY_DATE_COPYRIGHTED
Dublin Core Property dateCopyrighted in the /terms/ namespace. See DCMI Terms Date Copyrighted. -
PROPERTY_DATE_SUBMITTED
Dublin Core Property dateSubmitted in the /terms/ namespace. See DCMI Terms Date Submitted. -
PROPERTY_DESCRIPTION
Dublin Core Property description in the /terms/ namespace. See DCMI Terms Description. -
PROPERTY_EDUCATION_LEVEL
Dublin Core Property educationLevel in the /terms/ namespace. See DCMI Terms Education Level. -
PROPERTY_EXTENT
Dublin Core Property extent in the /terms/ namespace. See DCMI Terms Extent. -
PROPERTY_FORMAT
Dublin Core Property format in the /terms/ namespace. See DCMI Terms Format. -
PROPERTY_HAS_FORMAT
Dublin Core Property hasFormat in the /terms/ namespace. See DCMI Terms Has Format. -
PROPERTY_HAS_PART
Dublin Core Property hasPart in the /terms/ namespace. See DCMI Terms Has Part. -
PROPERTY_HAS_VERSION
Dublin Core Property hasVersion in the /terms/ namespace. See DCMI Terms Has Version. -
PROPERTY_IDENTIFIER
Dublin Core Property identifier in the /terms/ namespace. See DCMI Terms Identifier. -
PROPERTY_INSTRUCTIONAL_METHOD
Dublin Core Property instructionalMethod in the /terms/ namespace. See DCMI Terms Instructional Method. -
PROPERTY_IS_FORMAT_OF
Dublin Core Property isFormatOf in the /terms/ namespace. See DCMI Terms Is Format Of. -
PROPERTY_IS_PART_OF
Dublin Core Property isPartOf in the /terms/ namespace. See DCMI Terms Is Part Of. -
PROPERTY_IS_REFERENCED_BY
Dublin Core Property isReferencedBy in the /terms/ namespace. See DCMI Terms Is Referenced By. -
PROPERTY_IS_REPLACED_BY
Dublin Core Property isReplacedBy in the /terms/ namespace. See DCMI Terms Is Replaced By. -
PROPERTY_IS_REQUIRED_BY
Dublin Core Property isRequiredBy in the /terms/ namespace. See DCMI Terms Is Required By. -
PROPERTY_ISSUED
Dublin Core Property issued in the /terms/ namespace. See DCMI Terms Issued. -
PROPERTY_IS_VERSION_OF
Dublin Core Property isVersionOf in the /terms/ namespace. See DCMI Terms Is Version Of. -
PROPERTY_LANGUAGE
Dublin Core Property language in the /terms/ namespace. See DCMI Terms Language. -
PROPERTY_LICENSE
Dublin Core Property license in the /terms/ namespace. See DCMI Terms License. -
PROPERTY_MEDIATOR
Dublin Core Property mediator in the /terms/ namespace. See DCMI Terms Mediator. -
PROPERTY_MEDIUM
Dublin Core Property medium in the /terms/ namespace. See DCMI Terms Medium. -
PROPERTY_MODIFIED
Dublin Core Property modified in the /terms/ namespace. See DCMI Terms Modified. -
PROPERTY_PROVENANCE
Dublin Core Property provenance in the /terms/ namespace. See DCMI Terms Provenance. -
PROPERTY_PUBLISHER
Dublin Core Property publisher in the /terms/ namespace. See DCMI Terms Publisher. -
PROPERTY_REFERENCES
Dublin Core Property references in the /terms/ namespace. See DCMI Terms References. -
PROPERTY_RELATION
Dublin Core Property relation in the /terms/ namespace. See DCMI Terms Relation. -
PROPERTY_REPLACES
Dublin Core Property replaces in the /terms/ namespace. See DCMI Terms Replaces. -
PROPERTY_REQUIRES
Dublin Core Property requires in the /terms/ namespace. See DCMI Terms Requires. -
PROPERTY_RIGHTS
Dublin Core Property rights in the /terms/ namespace. See DCMI Terms Rights. -
PROPERTY_RIGHTS_HOLDER
Dublin Core Property rightsHolder in the /terms/ namespace. See DCMI Terms Rights Holder. -
PROPERTY_SOURCE
Dublin Core Property source in the /terms/ namespace. See DCMI Terms Source. -
PROPERTY_SPATIAL
Dublin Core Property spatial in the /terms/ namespace. See DCMI Terms Spatial. -
PROPERTY_SUBJECT
Dublin Core Property subject in the /terms/ namespace. See DCMI Terms Subject. -
PROPERTY_TABLE_OF_CONTENTS
Dublin Core Property tableOfContents in the /terms/ namespace. See DCMI Terms Table Of Contents. -
PROPERTY_TEMPORAL
Dublin Core Property temporal in the /terms/ namespace. See DCMI Terms Temporal. -
PROPERTY_TITLE
Dublin Core Property title in the /terms/ namespace. See DCMI Terms Title. -
PROPERTY_TYPE
Dublin Core Property type in the /terms/ namespace. See DCMI Terms Type. -
PROPERTY_VALID
Dublin Core Property valid in the /terms/ namespace. See DCMI Terms Valid. -
ENC_SCHEME_BOX
Syntax encoding schemeBox. See http://dublincore.org/documents/dcmi-terms/#H5 -
ENC_SCHEME_ISO3166
Syntax encoding schemeISO3166. See http://dublincore.org/documents/dcmi-terms/#H5 -
ENC_SCHEME_ISO639_2
Syntax encoding schemeISO639-1. See http://dublincore.org/documents/dcmi-terms/#H5 -
ENC_SCHEME_ISO639_3
Syntax encoding schemeISO639-3. See http://dublincore.org/documents/dcmi-terms/#H5 -
ENC_SCHEME_PERIOD
Syntax encoding schemePeriod. See http://dublincore.org/documents/dcmi-terms/#H5 -
ENC_SCHEME_POINT
Syntax encoding schemePoint. See http://dublincore.org/documents/dcmi-terms/#H5 -
ENC_SCHEME_RFC1766
Syntax encoding schemeRFC1766. See http://dublincore.org/documents/dcmi-terms/#H5 -
ENC_SCHEME_RFC3066
Syntax encoding schemeRFC3066. See http://dublincore.org/documents/dcmi-terms/#H5 -
ENC_SCHEME_RFC4646
Syntax encoding schemeRFC4646. See http://dublincore.org/documents/dcmi-terms/#H5 -
ENC_SCHEME_URI
Syntax encoding schemeURI. See http://dublincore.org/documents/dcmi-terms/#H5 -
ENC_SCHEME_W3CDTF
Syntax encoding schemeW3CDTF. See http://dublincore.org/documents/dcmi-terms/#H5 -
ENC_SCHEME_ISO8601
Syntax encoding schemeISO8601used for durations. See http://en.wikipedia.org/wiki/ISO_8601#Durations -
LANGUAGE_UNDEFINED
Language code for properties without language information.- See Also:
-
LANGUAGE_ANY
Language code that matches any language.Use this code whenever you need values in all languages or you don't care about the language. Note that all methods taking this as a legal value for the language parameter are adviced to return at first a value for
LANGUAGE_UNDEFINEDif multiple values exist and only one value is wanted.- See Also:
-
-
Method Details
-
get
Get all values of a property, either in a certain language or in all contained languages.- Parameters:
property- the property qnamelanguage- a language code,LANGUAGE_UNDEFINEDorLANGUAGE_ANY- Returns:
- a list of values which is empty if the property is not set
-
get
Get all values of a property no matter what language they have.- Parameters:
property- the property's expanded name- Returns:
- a list of values
-
getValues
Map<EName,List<DublinCoreValue>> getValues()Get all contained values grouped by property. -
getValuesFlat
List<DublinCoreValue> getValuesFlat()Get all values as a flat list. -
getFirst
Likeget(EName, String)but returns only the first value of the list. This method is intended to be a convenience method for those properties that have only one value.Please note, that if you pass
LANGUAGE_ANY, values with anundefined languageare returned preferably.- Parameters:
property- the property's expanded namelanguage- a language code,LANGUAGE_UNDEFINEDorLANGUAGE_ANY- Returns:
- the value or null
-
getFirst
Get the first value of a property, no matter what language it is in. Like a call ofgetFirst(EName, String)withlanguage =. Please not that values with anLANGUAGE_ANYundefined languageare returned preferably.- Parameters:
property- the property's expanded name- Returns:
- the value or null
- See Also:
-
getFirstVal
Get the first value of a property, no matter what language it is in. Like a call ofgetFirst(EName, String)withlanguage =. Please not that values with anLANGUAGE_ANYundefined languageare returned preferably.- Parameters:
property- the property's expanded name- Returns:
- the value or null
- See Also:
-
getAsText
Return all values separated by a delimiter.- Parameters:
property- the property's expanded namelanguage- a language code,LANGUAGE_UNDEFINEDorLANGUAGE_ANYdelimiter- a delimiter- Returns:
- the concatenated values or null (FIXME bad API. Should not return null)
-
getLanguages
Return all languages this property has values in.- Parameters:
property- the property's expanded name- Returns:
- a set of languages which may be empty in case the property does not have any value. Note that the state of
having no language defined (
LANGUAGE_UNDEFINED) is treated like a language.
-
hasMultipleValues
Check, if a property has multiple values assigned.- Parameters:
property- the property's expanded namelanguage- a language code,LANGUAGE_UNDEFINEDorLANGUAGE_ANY
-
hasMultipleValues
Check if a property has multiple values, ignoring any language information.- Parameters:
property- the property's expanded name
-
hasValue
Check if a property has at least one value assigned.- Parameters:
property- the property's expanded namelanguage- a language code,LANGUAGE_UNDEFINEDorLANGUAGE_ANY
-
hasValue
Check if a property has at least on value without language information assigned. Like a call ofhasValue(EName)withlanguage =LANGUAGE_ANY- Parameters:
property- the property's expanded name
-
set
Set a property to the given value, overwriting an existing value in the given language.Please note that it is not allowed to pass
LANGUAGE_ANYaslanguage.- Parameters:
property- the property's expanded namevalue- the value or null to remove all values of the given language for this propertylanguage- a language code orLANGUAGE_UNDEFINED
-
set
Set a value without language information to a property, overwriting an existing value. This is like callingset(EName, String, String)withlanguage =LANGUAGE_UNDEFINED- Parameters:
property- the property's expanded namevalue- the value or null to remove all values ofLANGUAGE_UNDEFINEDfor this property
-
set
Set a property to a value, overwriting an existing value.- Parameters:
property- the property's expanded namevalue- the value or null to completely remove the property (all values in all languages)
-
set
Set a property to a list of values, overwriting any existing.- Parameters:
property- the property's expanded namevalues- the values or an empty list
-
add
Add a value to a property.Please note that it is not allowed to pass
LANGUAGE_ANYaslanguage.- Parameters:
property- the property's expanded namevalue- the valuelanguage- a language code orLANGUAGE_UNDEFINED
-
add
Add a value without language information to a property. This is like callingadd(EName, String, String)withlanguage =LANGUAGE_UNDEFINED- Parameters:
property- the property's expanded namevalue- the value
-
add
Add a value to a property.- Parameters:
property- the property's expanded namevalue- the value
-
remove
Remove values of a property.-
LANGUAGE_ANY: remove the whole element -
LANGUAGE_UNDEFINED: remove only values with no language information - language code: remove values of that language
- Parameters:
property- the property's expanded namelanguage- a language code,LANGUAGE_UNDEFINEDorLANGUAGE_ANY
-
-
remove
Remove a complete property.- Parameters:
property- the property's expanded name
-
clear
void clear()Clear the Dublin Core -
getProperties
Return all contained properties.- Returns:
- a set of property names
-