org.ceryle.xml
Class DCMI

java.lang.Object
  extended by org.ceryle.xml.DCMI

public class DCMI
extends Object

Provides constants for the Dublin Core Metadata Terms, including the Dublin Core Metadata Element Set (DCMES) 1.1. For more information:

DCMI Metadata Terms

DC Metadata Terms Changes

With changes due to the current DCMI Metadata Terms and Expressing Dublin Core in HTML/XHTML meta and link elements Recommendations, the way that qualified DCMI Terms are expressed in HTML/XHTML has changed. Where previously qualifications where appended to the term name, it is now recommended that the DCTERM is itself used directly, E.g., "DC.date.modified" is now "DCTERMS.modified". So where previously the method call was:

    String date_created_uri = DCMI.getURI(DCMI.DC_date,DCMI.DC_created);
 
this should now be:
    String date_created_uri = DCMI.getTermURI(DCMI.DCTERMS_created);
 
Likewise, DCTERMS URIs are to be those assigned to the qualifid term rather than any appended to the core term. The previous names are to still be supported in existing software, but the new terms are to be favoured. This class has been updated to generate the correct term names and URIs as per the current version of the Recommendation.

Since:
JDK1.1
Version:
$Id: DCMI.java,v 3.10 2007-06-15 12:10:28 altheim Exp $
Author:
Murray Altheim

Field Summary
static String ATTR_DC_Contributor
           
static String ATTR_DC_Coverage
           
static String ATTR_DC_Creator
           
static String ATTR_DC_Date
           
static String ATTR_DC_Description
           
static String ATTR_DC_Format
           
static String ATTR_DC_Identifier
           
static String ATTR_DC_Language
           
static String ATTR_DC_Publisher
           
static String ATTR_DC_Relation
           
static String ATTR_DC_Rights
           
static String ATTR_DC_Source
           
static String ATTR_DC_Subject
           
static String ATTR_DC_Title
           
static String ATTR_DC_Type
           
static String DC
           
static String DC_contributor
           
static String DC_coverage
           
static String DC_creator
           
static String DC_date
           
static String DC_description
           
static String DC_format
           
static String DC_identifier
           
static String DC_language
           
static String DC_publisher
           
static String DC_relation
           
static String DC_rights
           
static String DC_source
           
static String DC_subject
           
static String DC_title
           
static String DC_type
           
static String DCDot
          The 'DC.' prefix.
static String DCMITYPE_Collection
           
static String DCMITYPE_Dataset
           
static String DCMITYPE_Event
           
static String DCMITYPE_Image
           
static String DCMITYPE_InteractiveResource
           
static String DCMITYPE_PhysicalObject
           
static String DCMITYPE_Service
           
static String DCMITYPE_Software
           
static String DCMITYPE_Sound
           
static String DCMITYPE_Text
           
static String DCTERMS
           
static String DCTERMS_abstract
           
static String DCTERMS_accessRights
           
static String DCTERMS_alternative
           
static String DCTERMS_audience
           
static String DCTERMS_available
           
static String DCTERMS_bibliographicCitation
           
static String DCTERMS_Box
           
static String DCTERMS_conformsTo
           
static String DCTERMS_created
           
static String DCTERMS_dateAccepted
           
static String DCTERMS_dateCopyrighted
           
static String DCTERMS_dateSubmitted
           
static String DCTERMS_DCC
           
static String DCTERMS_DCMIType
           
static String DCTERMS_educationLevel
           
static String DCTERMS_extent
           
static String DCTERMS_hasFormat
           
static String DCTERMS_hasPart
           
static String DCTERMS_hasVersion
           
static String DCTERMS_IMT
           
static String DCTERMS_isFormatOf
           
static String DCTERMS_ISO3166
           
static String DCTERMS_ISO639_2
           
static String DCTERMS_isPartOf
           
static String DCTERMS_isReferencedBy
           
static String DCTERMS_isReplacedBy
           
static String DCTERMS_isRequiredBy
           
static String DCTERMS_issued
           
static String DCTERMS_isVersionOf
           
static String DCTERMS_LCC
           
static String DCTERMS_LCSH
           
static String DCTERMS_mediator
           
static String DCTERMS_medium
           
static String DCTERMS_MESH
           
static String DCTERMS_modified
           
static String DCTERMS_Period
           
static String DCTERMS_Point
           
static String DCTERMS_references
           
static String DCTERMS_replaces
           
static String DCTERMS_requires
           
static String DCTERMS_RFC1766
           
static String DCTERMS_RFC3066
           
static String DCTERMS_spatial
           
static String DCTERMS_tableOfContents
           
static String DCTERMS_temporal
           
static String DCTERMS_TGN
           
static String DCTERMS_UDC
           
static String DCTERMS_URI
           
static String DCTERMS_valid
           
static String DCTERMS_W3CDTF
           
static String DCTERMSDot
          The 'DCTERMS.' prefix.
static String DCTERMSUnder
          The 'DCTERMS_' prefix.
static String DCUK_fpi
           
static String DCUK_isbn
           
static String DCUK_issn
           
static String DCUK_sici
           
static String DCUK_url
           
static String DCUK_urn
           
static String DCUK_version
           
static String DCUnder
          The 'DC_' prefix.
static String XMLNS_dcmes
          XML Namespace URI for the Dublin Core Metadata Element Set (DCMES).
static String XMLNS_dcterms
          XML Namespace URI for the Dublin Core Metadata Other Terms and Refinements.
 
Constructor Summary
DCMI()
           
 
Method Summary
static String getAttributeName(String dcname)
          A method to return the DC-qualified attribute name for the DCMES Element dcname, as used in HTML/XHTML.
static String getProperty(String name)
          A convenience method to return the DC property name for the DCMES Element name, as used in HTML/XHTML.
static String getProperty(String name, String refinement)
          A convenience method to return the DC refined property name for the DCMES Element name and refinement, as used in HTML/XHTML.
static String getPropertyFromURI(String uri)
          Return the DC property name for the DCMES Element corresponding to the provided DCMI URI.
static String[] getTags(String dcname, String langcode)
          A method to return the DCMI start and end tags as a two member String array, for the DCMES Element dcname, as used in RDF and XML formats of DCMI metadata.
static String getTermURI(String term)
          A convenience method to return the URI for the DCMES Term or Refinement name.
static String getURI(String name)
          A convenience method to return the URI for the DCMES Element name.
static String getURI(String name, String qualifier)
          A convenience method to return the URI for the DCMES Element name, with optional qualifier qualifier (null if unused).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XMLNS_dcmes

public static final String XMLNS_dcmes
XML Namespace URI for the Dublin Core Metadata Element Set (DCMES).

See Also:
Constant Field Values

XMLNS_dcterms

public static final String XMLNS_dcterms
XML Namespace URI for the Dublin Core Metadata Other Terms and Refinements.

See Also:
Constant Field Values

DCDot

public static final String DCDot
The 'DC.' prefix.

See Also:
Constant Field Values

DCUnder

public static final String DCUnder
The 'DC_' prefix. (used only internally to the class as an identifier)

See Also:
Constant Field Values

DCTERMSDot

public static final String DCTERMSDot
The 'DCTERMS.' prefix.

See Also:
Constant Field Values

DCTERMSUnder

public static final String DCTERMSUnder
The 'DCTERMS_' prefix. (used only internally to the class as an identifier)

See Also:
Constant Field Values

ATTR_DC_Title

public static String ATTR_DC_Title

ATTR_DC_Creator

public static String ATTR_DC_Creator

ATTR_DC_Subject

public static String ATTR_DC_Subject

ATTR_DC_Description

public static String ATTR_DC_Description

ATTR_DC_Publisher

public static String ATTR_DC_Publisher

ATTR_DC_Contributor

public static String ATTR_DC_Contributor

ATTR_DC_Date

public static String ATTR_DC_Date

ATTR_DC_Type

public static String ATTR_DC_Type

ATTR_DC_Format

public static String ATTR_DC_Format

ATTR_DC_Identifier

public static String ATTR_DC_Identifier

ATTR_DC_Source

public static String ATTR_DC_Source

ATTR_DC_Language

public static String ATTR_DC_Language

ATTR_DC_Relation

public static String ATTR_DC_Relation

ATTR_DC_Coverage

public static String ATTR_DC_Coverage

ATTR_DC_Rights

public static String ATTR_DC_Rights

DC

public static String DC

DC_title

public static String DC_title

DC_creator

public static String DC_creator

DC_subject

public static String DC_subject

DC_description

public static String DC_description

DC_publisher

public static String DC_publisher

DC_contributor

public static String DC_contributor

DC_date

public static String DC_date

DC_type

public static String DC_type

DC_format

public static String DC_format

DC_identifier

public static String DC_identifier

DC_source

public static String DC_source

DC_language

public static String DC_language

DC_relation

public static String DC_relation

DC_coverage

public static String DC_coverage

DC_rights

public static String DC_rights

DCTERMS

public static String DCTERMS

DCTERMS_audience

public static String DCTERMS_audience

DCTERMS_alternative

public static String DCTERMS_alternative

DCTERMS_tableOfContents

public static String DCTERMS_tableOfContents

DCTERMS_abstract

public static String DCTERMS_abstract

DCTERMS_created

public static String DCTERMS_created

DCTERMS_valid

public static String DCTERMS_valid

DCTERMS_available

public static String DCTERMS_available

DCTERMS_issued

public static String DCTERMS_issued

DCTERMS_modified

public static String DCTERMS_modified

DCTERMS_extent

public static String DCTERMS_extent

DCTERMS_medium

public static String DCTERMS_medium

DCTERMS_isVersionOf

public static String DCTERMS_isVersionOf

DCTERMS_hasVersion

public static String DCTERMS_hasVersion

DCTERMS_isReplacedBy

public static String DCTERMS_isReplacedBy

DCTERMS_replaces

public static String DCTERMS_replaces

DCTERMS_isRequiredBy

public static String DCTERMS_isRequiredBy

DCTERMS_requires

public static String DCTERMS_requires

DCTERMS_isPartOf

public static String DCTERMS_isPartOf

DCTERMS_hasPart

public static String DCTERMS_hasPart

DCTERMS_isReferencedBy

public static String DCTERMS_isReferencedBy

DCTERMS_references

public static String DCTERMS_references

DCTERMS_isFormatOf

public static String DCTERMS_isFormatOf

DCTERMS_hasFormat

public static String DCTERMS_hasFormat

DCTERMS_conformsTo

public static String DCTERMS_conformsTo

DCTERMS_spatial

public static String DCTERMS_spatial

DCTERMS_temporal

public static String DCTERMS_temporal

DCTERMS_mediator

public static String DCTERMS_mediator

DCTERMS_dateAccepted

public static String DCTERMS_dateAccepted

DCTERMS_dateCopyrighted

public static String DCTERMS_dateCopyrighted

DCTERMS_dateSubmitted

public static String DCTERMS_dateSubmitted

DCTERMS_educationLevel

public static String DCTERMS_educationLevel

DCTERMS_accessRights

public static String DCTERMS_accessRights

DCTERMS_bibliographicCitation

public static String DCTERMS_bibliographicCitation

DCUK_url

public static String DCUK_url

DCUK_urn

public static String DCUK_urn

DCUK_isbn

public static String DCUK_isbn

DCUK_issn

public static String DCUK_issn

DCUK_fpi

public static String DCUK_fpi

DCUK_sici

public static String DCUK_sici

DCUK_version

public static String DCUK_version

DCTERMS_LCSH

public static String DCTERMS_LCSH

DCTERMS_MESH

public static String DCTERMS_MESH

DCTERMS_DCC

public static String DCTERMS_DCC

DCTERMS_LCC

public static String DCTERMS_LCC

DCTERMS_UDC

public static String DCTERMS_UDC

DCTERMS_DCMIType

public static String DCTERMS_DCMIType

DCTERMS_IMT

public static String DCTERMS_IMT

DCTERMS_ISO639_2

public static String DCTERMS_ISO639_2

DCTERMS_RFC1766

public static String DCTERMS_RFC1766

DCTERMS_URI

public static String DCTERMS_URI

DCTERMS_Point

public static String DCTERMS_Point

DCTERMS_ISO3166

public static String DCTERMS_ISO3166

DCTERMS_Box

public static String DCTERMS_Box

DCTERMS_TGN

public static String DCTERMS_TGN

DCTERMS_Period

public static String DCTERMS_Period

DCTERMS_W3CDTF

public static String DCTERMS_W3CDTF

DCTERMS_RFC3066

public static String DCTERMS_RFC3066

DCMITYPE_Collection

public static String DCMITYPE_Collection

DCMITYPE_Dataset

public static String DCMITYPE_Dataset

DCMITYPE_Event

public static String DCMITYPE_Event

DCMITYPE_Image

public static String DCMITYPE_Image

DCMITYPE_InteractiveResource

public static String DCMITYPE_InteractiveResource

DCMITYPE_Service

public static String DCMITYPE_Service

DCMITYPE_Software

public static String DCMITYPE_Software

DCMITYPE_Sound

public static String DCMITYPE_Sound

DCMITYPE_Text

public static String DCMITYPE_Text

DCMITYPE_PhysicalObject

public static String DCMITYPE_PhysicalObject
Constructor Detail

DCMI

public DCMI()
Method Detail

getURI

public static String getURI(String name)
A convenience method to return the URI for the DCMES Element name. For example, to return the URI for the DC element "subject":
     String uri = DCMI.getURI(DCMI.DC_subject);
 
The value of uri would be: "http://purl.org/dc/elements/1.1/subject"

Note: see DC Metadata Terms Changes for update information due to changes to DCMI Metadata Terms.


getURI

public static String getURI(String name,
                            String qualifier)
A convenience method to return the URI for the DCMES Element name, with optional qualifier qualifier (null if unused). For example, to return the URI for the DC element "subject":
     String uri = DCMI.getURI(DCMI.DC_date,DCMI.DCTERMS_created);
 
The value of uri would be: "http://purl.org/dc/elements/1.1/date.created"

Note: see DC Metadata Terms Changes for update information due to changes to DCMI Metadata Terms. Specifically, this method will return the now-deprecated appended-qualifier term, where currently getTermURI(String) should now be used. In a future version of this method it will automatically sense use of DC vs. DCTERMS and return the correct value.


getTermURI

public static String getTermURI(String term)
A convenience method to return the URI for the DCMES Term or Refinement name. For example, to return the URI for the DC "modified" refinement:
     String uri = DCMI.getTermURI(DCMI.DCTERMS_modified);
 
The value of uri would be: "http://purl.org/dc/terms/modified" Note that this method does not police which elements and terms are appropriate to the base URI, it merely concatenates the Strings.


getProperty

public static String getProperty(String name)
A convenience method to return the DC property name for the DCMES Element name, as used in HTML/XHTML. E.g., provided DCMI.DC_title, returns "DC.title", or provided DCMI.DCTERMS_modified, returns "DCTERMS.modified".


getProperty

public static String getProperty(String name,
                                 String refinement)
A convenience method to return the DC refined property name for the DCMES Element name and refinement, as used in HTML/XHTML. E.g., "DC.date.created". Use of this method will in the future be deprecated, in favour of using the DCTERMS term directly, e.g., "DC.date.modified" should be "DCTERMS.modified". Because this method is necessary to be able reproduce the deprecated property name, it is not modified for compatibility; getProperty(String) with a DCTERMS parameter should be used instead.


getPropertyFromURI

public static String getPropertyFromURI(String uri)
Return the DC property name for the DCMES Element corresponding to the provided DCMI URI. E.g., when supplied with the parameter http://purl.org/dc/elements/1.1/subject, returns DC.Subject.

If the provided URI does not begin with the DCMI or DCTERMS base URI, null is returned. Note that this does not validate the actual contents, merely removes the base URI and prefixes it with "DC." or "DCTERMS.".

Previous versions of this method capitalized the first character of the element name — this is no longer current DCMI practice, so the name itself is left in lowercase form.


getAttributeName

public static String getAttributeName(String dcname)
A method to return the DC-qualified attribute name for the DCMES Element dcname, as used in HTML/XHTML. E.g., "DC.title" returns "dc:title". Returns null if the name is not recognized.


getTags

public static String[] getTags(String dcname,
                               String langcode)
A method to return the DCMI start and end tags as a two member String array, for the DCMES Element dcname, as used in RDF and XML formats of DCMI metadata. E.g., "DC.title" returns "<dc:title>" and "</dc:title>". The optional language code will be included as an xml:lang attribute if the supplied value is non-null. Returns null if the tag name is not recognized.



The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.