|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.datamodel.metadata.MCRMetaDefault
org.mycore.datamodel.metadata.MCRMetaISO8601Date
public final class MCRMetaISO8601Date
provides support for a restricted range of formats, all of which are valid ISO 8601 dates and times. The range of supported formats is exactly the same range that is suggested by the W3C datetime profile in its version from 1997-09-15.
| Nested Class Summary | |
|---|---|
protected static class |
MCRMetaISO8601Date.FormatChooser
is a helper class for MCRMetaISO8601Date. |
static class |
MCRMetaISO8601Date.IsoFormat
|
| Field Summary |
|---|
| Fields inherited from class org.mycore.datamodel.metadata.MCRMetaDefault |
|---|
datapart, DEFAULT_DATAPART, DEFAULT_INHERITED, DEFAULT_LANG_LENGTH, DEFAULT_LANGUAGE, DEFAULT_STRING_LENGTH, DEFAULT_TYPE_LENGTH, inherited, lang, NL, subtag, type |
| Constructor Summary | |
|---|---|
MCRMetaISO8601Date()
constructs a empty instance. |
|
MCRMetaISO8601Date(String set_datapart,
String set_subtag,
String set_type,
int set_inherted)
same as superImplentation but sets lang attribute to "null" |
|
| Method Summary | |
|---|---|
Object |
clone()
clone of this instance you will get a (deep) clone of this element |
Element |
createXML()
This abstract method create a XML stream for all data in this class, defined by the MyCoRe XML MCRMeta... |
void |
debug()
This method put debug data to the logger (for the debug mode). |
String |
format(String format,
Locale locale)
formats the date to a String |
Date |
getDate()
returns the Date representing this element. |
MCRMetaISO8601Date.IsoFormat |
getFormat()
gets the input and output format. |
String |
getISOString()
returns a ISO 8601 conform String using the current set format. |
protected static Namespace |
getNs()
returns the namespace of this element |
boolean |
isValid()
checks the formal correctness of this element. |
void |
setDate(Date dt)
sets the date for this meta data object |
void |
setDate(String isoString)
sets the date for this meta data object |
void |
setFormat(MCRMetaISO8601Date.IsoFormat isoFormat)
sets the input and output format. |
void |
setFormat(String format)
sets the input and output format. |
void |
setFromDOM(Element element)
This method read the XML input stream part from a DOM part for the metadata of the document. |
| Methods inherited from class org.mycore.datamodel.metadata.MCRMetaDefault |
|---|
debugDefault, decrementInherited, getDataPart, getInherited, getInheritedToString, getLang, getSubTag, getType, incrementInherited, setDataPart, setInherited, setLang, setSubTag, setType |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MCRMetaISO8601Date()
MCRMetaDefault.MCRMetaDefault()
public MCRMetaISO8601Date(String set_datapart,
String set_subtag,
String set_type,
int set_inherted)
MCRMetaDefault.MCRMetaDefault(String, String, String, String, int)| Method Detail |
|---|
public Element createXML()
throws MCRException
MCRMetaDefault
createXML in interface MCRMetaInterfacecreateXML in class MCRMetaDefaultMCRException - if the content of this class is not validpublic void setFromDOM(Element element)
MCRMetaDefault
setFromDOM in interface MCRMetaInterfacesetFromDOM in class MCRMetaDefaultelement - a relevant DOM element for the metadataprotected static Namespace getNs()
public final void setDate(String isoString)
isoString - Date in any form that is a valid W3C dateTimepublic final Date getDate()
public void setDate(Date dt)
dt - Date object representing date String in Elementpublic final String getISOString()
public void setFormat(String format)
format - a format string that is valid conforming to xsd:duration
schema type.public void setFormat(MCRMetaISO8601Date.IsoFormat isoFormat)
public String format(String format,
Locale locale)
format - as in DateTimeFormatlocale - used by format process
public MCRMetaISO8601Date.IsoFormat getFormat()
public void debug()
debug in interface MCRMetaInterfacedebug in class MCRMetaDefaultpublic Object clone()
clone in interface MCRMetaInterfaceclone in class MCRMetaDefaultObject.clone()public boolean isValid()
isValid in interface MCRMetaInterfaceisValid in class MCRMetaDefaultMCRMetaDefault.isValid()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||