Class DublinCoreHelper
java.lang.Object
org.ametys.plugins.repository.jcr.DublinCoreHelper
Helper class providing methods to get and set Dublin Core metadata on
MetadataAwareAmetysObject
s.-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Constant for Dublin Core metadata container name.static final String
Constant for Dublin Core contributor metadata.static final String
Constant for Dublin Core coverage metadata.static final String
Constant for Dublin Core creator metadata.static final String
Constant for Dublin Core date metadata.static final String
Constant for Dublin Core description metadata.static final String
Constant for Dublin Core title Format.static final String
Constant for Dublin Core identifier metadata.static final String
Constant for Dublin Core language metadata.static final String
Constant for Dublin Core publisher metadata.static final String
Constant for Dublin Core relation metadata.static final String
Constant for Dublin Core rights metadata.static final String
Constant for Dublin Core source metadata.static final String
Constant for Dublin Core subject metadata.static final String
Constant for Dublin Core title metadata.static final String
Constant for Dublin Core type metadata. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Get the Dublin Core contributor.static String
getDCContributor
(MetadataAwareAmetysObject object, String defaultValue) Get the Dublin Core contributor.static String
Get the Dublin Core coverage.static String
getDCCoverage
(MetadataAwareAmetysObject object, String defaultValue) Get the Dublin Core coverage.static String
Get the Dublin Core creator.static String
getDCCreator
(MetadataAwareAmetysObject object, String defaultValue) Get the Dublin Core creator.static Date
getDCDate
(MetadataAwareAmetysObject object) Get the Dublin Core date.static Date
getDCDate
(MetadataAwareAmetysObject object, Date defaultValue) Get the Dublin Core date.static String
Get the Dublin Core description.static String
getDCDescription
(MetadataAwareAmetysObject object, String defaultValue) Get the Dublin Core description.static String
getDCFormat
(MetadataAwareAmetysObject object) Get the Dublin Core format.static String
getDCFormat
(MetadataAwareAmetysObject object, String defaultValue) Get the Dublin Core format.static String
Get the Dublin Core identifier.static String
getDCIdentifier
(MetadataAwareAmetysObject object, String defaultValue) Get the Dublin Core identifier.static String
Get the Dublin Core language.static String
getDCLanguage
(MetadataAwareAmetysObject object, String defaultValue) Get the Dublin Core language.static String
Get the Dublin Core publisher.static String
getDCPublisher
(MetadataAwareAmetysObject object, String defaultValue) Get the Dublin Core publisher.static String
Get the Dublin Core relation.static String
getDCRelation
(MetadataAwareAmetysObject object, String defaultValue) Get the Dublin Core relation.static String
getDCRights
(MetadataAwareAmetysObject object) Get the Dublin Core rights.static String
getDCRights
(MetadataAwareAmetysObject object, String defaultValue) Get the Dublin Core rights.static String
getDCSource
(MetadataAwareAmetysObject object) Get the Dublin Core source.static String
getDCSource
(MetadataAwareAmetysObject object, String defaultValue) Get the Dublin Core source.static String[]
Get the Dublin Core subject.static String[]
getDCSubject
(MetadataAwareAmetysObject object, String[] defaultValue) Get the Dublin Core subject.static String
getDCTitle
(MetadataAwareAmetysObject object) Get the Dublin Core title.static String
getDCTitle
(MetadataAwareAmetysObject object, String defaultValue) Get the Dublin Core title.static String
getDCType
(MetadataAwareAmetysObject object) Get the Dublin Core type.static String
getDCType
(MetadataAwareAmetysObject object, String defaultValue) Get the Dublin Core type.static void
setDCContributor
(ModifiableMetadataAwareAmetysObject object, String contributor) Set the Dublin Core contributor.static void
setDCCoverage
(ModifiableMetadataAwareAmetysObject object, String coverage) Set the Dublin Core coverage.static void
setDCCreator
(ModifiableMetadataAwareAmetysObject object, String creator) Set the Dublin Core creator.static void
setDCDate
(ModifiableMetadataAwareAmetysObject object, Date date) Set the Dublin Core date.static void
setDCDescription
(ModifiableMetadataAwareAmetysObject object, String description) Set the Dublin Core description.static void
setDCFormat
(ModifiableMetadataAwareAmetysObject object, String format) Set the Dublin Core format.static void
setDCIdentifier
(ModifiableMetadataAwareAmetysObject object, String identifier) Set the Dublin Core identifier.static void
setDCLanguage
(ModifiableMetadataAwareAmetysObject object, String language) Set the Dublin Core language.static void
setDCPublisher
(ModifiableMetadataAwareAmetysObject object, String publisher) Set the Dublin Core publisher.static void
setDCRelation
(ModifiableMetadataAwareAmetysObject object, String relation) Set the Dublin Core relation.static void
setDCRights
(ModifiableMetadataAwareAmetysObject object, String rights) Set the Dublin Core rights.static void
setDCSource
(ModifiableMetadataAwareAmetysObject object, String source) Set the Dublin Core source.static void
setDCSubject
(ModifiableMetadataAwareAmetysObject object, String[] subject) Set the Dublin Core subject.static void
setDCTitle
(ModifiableMetadataAwareAmetysObject object, String title) Set the Dublin Core title.static void
setDCType
(ModifiableMetadataAwareAmetysObject object, String type) Set the Dublin Core type.
-
Field Details
-
METADATA_DC_CONTAINER
Constant for Dublin Core metadata container name.- See Also:
-
METADATA_DC_TITLE
Constant for Dublin Core title metadata.- See Also:
-
METADATA_DC_CREATOR
Constant for Dublin Core creator metadata.- See Also:
-
METADATA_DC_SUBJECT
Constant for Dublin Core subject metadata.- See Also:
-
METADATA_DC_DESCRIPTION
Constant for Dublin Core description metadata.- See Also:
-
METADATA_DC_PUBLISHER
Constant for Dublin Core publisher metadata.- See Also:
-
METADATA_DC_CONTRIBUTOR
Constant for Dublin Core contributor metadata.- See Also:
-
METADATA_DC_DATE
Constant for Dublin Core date metadata.- See Also:
-
METADATA_DC_TYPE
Constant for Dublin Core type metadata.- See Also:
-
METADATA_DC_FORMAT
Constant for Dublin Core title Format.- See Also:
-
METADATA_DC_IDENTIFIER
Constant for Dublin Core identifier metadata.- See Also:
-
METADATA_DC_SOURCE
Constant for Dublin Core source metadata.- See Also:
-
METADATA_DC_LANGUAGE
Constant for Dublin Core language metadata.- See Also:
-
METADATA_DC_RELATION
Constant for Dublin Core relation metadata.- See Also:
-
METADATA_DC_COVERAGE
Constant for Dublin Core coverage metadata.- See Also:
-
METADATA_DC_RIGHTS
Constant for Dublin Core rights metadata.- See Also:
-
-
Method Details
-
getDCTitle
Get the Dublin Core title.- Parameters:
object
- the object.- Returns:
- the Dublin Core title. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCTitle
public static String getDCTitle(MetadataAwareAmetysObject object, String defaultValue) throws AmetysRepositoryException Get the Dublin Core title.- Parameters:
object
- the object.defaultValue
- the default title.- Returns:
- the Dublin Core title.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCCreator
public static String getDCCreator(MetadataAwareAmetysObject object) throws AmetysRepositoryException Get the Dublin Core creator.- Parameters:
object
- the object.- Returns:
- the Dublin Core creator. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCCreator
public static String getDCCreator(MetadataAwareAmetysObject object, String defaultValue) throws AmetysRepositoryException Get the Dublin Core creator.- Parameters:
object
- the object.defaultValue
- the default creator.- Returns:
- the Dublin Core creator.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCSubject
public static String[] getDCSubject(MetadataAwareAmetysObject object) throws AmetysRepositoryException Get the Dublin Core subject.- Parameters:
object
- the object.- Returns:
- the Dublin Core subject. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCSubject
public static String[] getDCSubject(MetadataAwareAmetysObject object, String[] defaultValue) throws AmetysRepositoryException Get the Dublin Core subject.- Parameters:
object
- the object.defaultValue
- the default subject.- Returns:
- the Dublin Core subject.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCDescription
public static String getDCDescription(MetadataAwareAmetysObject object) throws AmetysRepositoryException Get the Dublin Core description.- Parameters:
object
- the object.- Returns:
- the Dublin Core description. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCDescription
public static String getDCDescription(MetadataAwareAmetysObject object, String defaultValue) throws AmetysRepositoryException Get the Dublin Core description.- Parameters:
object
- the object.defaultValue
- the default description.- Returns:
- the Dublin Core description.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCPublisher
public static String getDCPublisher(MetadataAwareAmetysObject object) throws AmetysRepositoryException Get the Dublin Core publisher.- Parameters:
object
- the object.- Returns:
- the Dublin Core publisher. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCPublisher
public static String getDCPublisher(MetadataAwareAmetysObject object, String defaultValue) throws AmetysRepositoryException Get the Dublin Core publisher.- Parameters:
object
- the object.defaultValue
- the default publisher.- Returns:
- the Dublin Core publisher.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCContributor
public static String getDCContributor(MetadataAwareAmetysObject object) throws AmetysRepositoryException Get the Dublin Core contributor.- Parameters:
object
- the object.- Returns:
- the Dublin Core contributor. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCContributor
public static String getDCContributor(MetadataAwareAmetysObject object, String defaultValue) throws AmetysRepositoryException Get the Dublin Core contributor.- Parameters:
object
- the object.defaultValue
- the default contributor.- Returns:
- the Dublin Core contributor.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCDate
Get the Dublin Core date.- Parameters:
object
- the object.- Returns:
- the Dublin Core date. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCDate
public static Date getDCDate(MetadataAwareAmetysObject object, Date defaultValue) throws AmetysRepositoryException Get the Dublin Core date.- Parameters:
object
- the object.defaultValue
- the default date.- Returns:
- the Dublin Core date.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCType
Get the Dublin Core type.- Parameters:
object
- the object.- Returns:
- the Dublin Core type. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCType
public static String getDCType(MetadataAwareAmetysObject object, String defaultValue) throws AmetysRepositoryException Get the Dublin Core type.- Parameters:
object
- the object.defaultValue
- the default type.- Returns:
- the Dublin Core type.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCFormat
Get the Dublin Core format.- Parameters:
object
- the object.- Returns:
- the Dublin Core format. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCFormat
public static String getDCFormat(MetadataAwareAmetysObject object, String defaultValue) throws AmetysRepositoryException Get the Dublin Core format.- Parameters:
object
- the object.defaultValue
- the default format.- Returns:
- the Dublin Core format.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCIdentifier
public static String getDCIdentifier(MetadataAwareAmetysObject object) throws AmetysRepositoryException Get the Dublin Core identifier.- Parameters:
object
- the object.- Returns:
- the Dublin Core identifier. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCIdentifier
public static String getDCIdentifier(MetadataAwareAmetysObject object, String defaultValue) throws AmetysRepositoryException Get the Dublin Core identifier.- Parameters:
object
- the object.defaultValue
- the default identifier.- Returns:
- the Dublin Core identifier.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCSource
Get the Dublin Core source.- Parameters:
object
- the object.- Returns:
- the Dublin Core source. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCSource
public static String getDCSource(MetadataAwareAmetysObject object, String defaultValue) throws AmetysRepositoryException Get the Dublin Core source.- Parameters:
object
- the object.defaultValue
- the default source.- Returns:
- the Dublin Core source.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCLanguage
public static String getDCLanguage(MetadataAwareAmetysObject object) throws AmetysRepositoryException Get the Dublin Core language.- Parameters:
object
- the object.- Returns:
- the Dublin Core language. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCLanguage
public static String getDCLanguage(MetadataAwareAmetysObject object, String defaultValue) throws AmetysRepositoryException Get the Dublin Core language.- Parameters:
object
- the object.defaultValue
- the default language.- Returns:
- the Dublin Core language.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCRelation
public static String getDCRelation(MetadataAwareAmetysObject object) throws AmetysRepositoryException Get the Dublin Core relation.- Parameters:
object
- the object.- Returns:
- the Dublin Core relation. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCRelation
public static String getDCRelation(MetadataAwareAmetysObject object, String defaultValue) throws AmetysRepositoryException Get the Dublin Core relation.- Parameters:
object
- the object.defaultValue
- the default relation.- Returns:
- the Dublin Core relation.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCCoverage
public static String getDCCoverage(MetadataAwareAmetysObject object) throws AmetysRepositoryException Get the Dublin Core coverage.- Parameters:
object
- the object.- Returns:
- the Dublin Core coverage. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCCoverage
public static String getDCCoverage(MetadataAwareAmetysObject object, String defaultValue) throws AmetysRepositoryException Get the Dublin Core coverage.- Parameters:
object
- the object.defaultValue
- the default coverage.- Returns:
- the Dublin Core coverage.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCRights
Get the Dublin Core rights.- Parameters:
object
- the object.- Returns:
- the Dublin Core rights. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCRights
public static String getDCRights(MetadataAwareAmetysObject object, String defaultValue) throws AmetysRepositoryException Get the Dublin Core rights.- Parameters:
object
- the object.defaultValue
- the default rights.- Returns:
- the Dublin Core rights.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCTitle
public static void setDCTitle(ModifiableMetadataAwareAmetysObject object, String title) throws AmetysRepositoryException Set the Dublin Core title.- Parameters:
object
- the ametys object.title
- the Dublin Core title to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCCreator
public static void setDCCreator(ModifiableMetadataAwareAmetysObject object, String creator) throws AmetysRepositoryException Set the Dublin Core creator.- Parameters:
object
- the ametys object.creator
- the Dublin Core creator to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCSubject
public static void setDCSubject(ModifiableMetadataAwareAmetysObject object, String[] subject) throws AmetysRepositoryException Set the Dublin Core subject.- Parameters:
object
- the ametys object.subject
- the Dublin Core subject to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCDescription
public static void setDCDescription(ModifiableMetadataAwareAmetysObject object, String description) throws AmetysRepositoryException Set the Dublin Core description.- Parameters:
object
- the ametys object.description
- the Dublin Core description to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCPublisher
public static void setDCPublisher(ModifiableMetadataAwareAmetysObject object, String publisher) throws AmetysRepositoryException Set the Dublin Core publisher.- Parameters:
object
- the ametys object.publisher
- the Dublin Core publisher to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCContributor
public static void setDCContributor(ModifiableMetadataAwareAmetysObject object, String contributor) throws AmetysRepositoryException Set the Dublin Core contributor.- Parameters:
object
- the ametys object.contributor
- the Dublin Core contributor to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCDate
public static void setDCDate(ModifiableMetadataAwareAmetysObject object, Date date) throws AmetysRepositoryException Set the Dublin Core date.- Parameters:
object
- the ametys object.date
- the Dublin Core date to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCType
public static void setDCType(ModifiableMetadataAwareAmetysObject object, String type) throws AmetysRepositoryException Set the Dublin Core type.- Parameters:
object
- the ametys object.type
- the Dublin Core type to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCFormat
public static void setDCFormat(ModifiableMetadataAwareAmetysObject object, String format) throws AmetysRepositoryException Set the Dublin Core format.- Parameters:
object
- the ametys object.format
- the Dublin Core format to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCIdentifier
public static void setDCIdentifier(ModifiableMetadataAwareAmetysObject object, String identifier) throws AmetysRepositoryException Set the Dublin Core identifier.- Parameters:
object
- the ametys object.identifier
- the Dublin Core identifier to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCSource
public static void setDCSource(ModifiableMetadataAwareAmetysObject object, String source) throws AmetysRepositoryException Set the Dublin Core source.- Parameters:
object
- the ametys object.source
- the Dublin Core source to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCLanguage
public static void setDCLanguage(ModifiableMetadataAwareAmetysObject object, String language) throws AmetysRepositoryException Set the Dublin Core language.- Parameters:
object
- the ametys object.language
- the Dublin Core language to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCRelation
public static void setDCRelation(ModifiableMetadataAwareAmetysObject object, String relation) throws AmetysRepositoryException Set the Dublin Core relation.- Parameters:
object
- the ametys object.relation
- the Dublin Core relation to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCCoverage
public static void setDCCoverage(ModifiableMetadataAwareAmetysObject object, String coverage) throws AmetysRepositoryException Set the Dublin Core coverage.- Parameters:
object
- the ametys object.coverage
- the Dublin Core coverage to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCRights
public static void setDCRights(ModifiableMetadataAwareAmetysObject object, String rights) throws AmetysRepositoryException Set the Dublin Core rights.- Parameters:
object
- the ametys object.rights
- the Dublin Core rights to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-