|
||||||||||
| 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.MCRMetaHistoryDate
public class MCRMetaHistoryDate
This class implements all methods for handling with the MCRMetaHistoryDate part of a metadata object. It use the GPL licensed ICU library of IBM.
| Nested Class Summary | |
|---|---|
protected class |
MCRMetaHistoryDate.MCRMetaHistoryDateText
This class describes the structure of pair of language an text. |
| Field Summary | |
|---|---|
protected static Logger |
LOGGER
Logger |
static int |
MCRHISTORYDATE_MAX_TEXT
The maximal length of 'text' |
| 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 | |
|---|---|
MCRMetaHistoryDate()
This is the constructor. |
|
MCRMetaHistoryDate(String set_datapart,
String set_subtag,
String default_lang,
String set_type,
int set_inherted)
This is the constructor. |
|
| Method Summary | |
|---|---|
void |
addText(String set_text,
String set_lang)
This method add a MCRMetaHistoryDateTexts instance to the ArrayList of texts. |
Object |
clone()
This method make a clone of this class. |
Element |
createXML()
This method creates a XML stream for all data in this class, defined by the MyCoRe XML MCRMetaHistoryDate definition for the given subtag. |
void |
debug()
This method put debug data to the logger (for the debug mode). |
com.ibm.icu.util.Calendar |
getBis()
This method get the bis element as ICU-Calendar. |
String |
getBisToGregorianString()
This method return the bis as string. |
String |
getCalendar()
This method get the 'calendar' text element. |
int |
getIbis()
This method get the ibis element as Julian Day integer. |
int |
getIvon()
This method get the ivon element as Julian Day integer. |
String |
getText()
Deprecated. |
MCRMetaHistoryDate.MCRMetaHistoryDateText |
getText(int index)
This method return the MCRMetaHistoryDateTexts instance of the indexed element of the ArrayList. |
MCRMetaHistoryDate.MCRMetaHistoryDateText |
getText(String set_lang)
This method return the MCRMetaHistoryDateTexts instance with the corresponding language. |
ArrayList<MCRMetaHistoryDate.MCRMetaHistoryDateText> |
getTexts()
This method read the ArryList texts |
com.ibm.icu.util.Calendar |
getVon()
This method get the von element as ICU-Calendar. |
String |
getVonToGregorianString()
This method return the von as string. |
boolean |
isValid()
This method checks the validation of the content of this class. |
void |
setBisDate(com.ibm.icu.util.Calendar set_date)
This method set the bis to the given date of a supported calendar. |
void |
setBisDate(String set_date,
String calstr)
This method set the bis to the given date. |
void |
setCalendar(com.ibm.icu.util.Calendar cal)
The method set the calendar String value. |
void |
setCalendar(String calstr)
The method set the calendar String value. |
void |
setDefaultBis()
The method set the bis values to the default. |
void |
setDefaultVon()
The method set the von values to the default. |
void |
setFromDOM(Element element)
This method reads the XML input stream part from a DOM part for the metadata of the document. |
void |
setText(String set_text)
This method set the text field for the default language. |
void |
setText(String set_text,
String set_lang)
This method set the text field for the given language. |
void |
setVonDate(com.ibm.icu.util.Calendar set_date)
This method set the von to the given date of a supported calendar. |
void |
setVonDate(String set_date,
String calstr)
This method set the von to the given date. |
int |
TextSize()
This method read the size of texts |
| 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 |
| Field Detail |
|---|
protected static Logger LOGGER
public static final int MCRHISTORYDATE_MAX_TEXT
| Constructor Detail |
|---|
public MCRMetaHistoryDate()
public MCRMetaHistoryDate(String set_datapart,
String set_subtag,
String default_lang,
String set_type,
int set_inherted)
throws MCRException
set_datapart - the global part of the elements like 'metadata'
or 'service'set_subtag - the name of the subtagdefault_lang - the default languageset_type - the optional type stringset_inherted - a value >= 0
MCRException - if the parameter values are invalid| Method Detail |
|---|
public final void setText(String set_text)
set_text - the text string for a date or range
public final void setText(String set_text,
String set_lang)
set_text - the text string for a date or rangeset_lang - the language of the text in the ISO format
public final void addText(String set_text,
String set_lang)
set_text - the text- Stringset_lang - the lang- Stringpublic final MCRMetaHistoryDate.MCRMetaHistoryDateText getText(String set_lang)
set_lang - the language String in ISO format
public final MCRMetaHistoryDate.MCRMetaHistoryDateText getText(int index)
index - the index of ArryList texts
public final ArrayList<MCRMetaHistoryDate.MCRMetaHistoryDateText> getTexts()
public final int TextSize()
public final void setCalendar(String calstr)
calstr - the calendar as String, one of CALENDARS.public final void setCalendar(com.ibm.icu.util.Calendar cal)
cal - the date of the calendar.public final void setDefaultVon()
public final void setDefaultBis()
public final void setVonDate(com.ibm.icu.util.Calendar set_date)
set_date - the date of a ICU supported calendar.
public final void setVonDate(String set_date,
String calstr)
set_date - a date stringcalstr - the calendar as String, one of CALENDARS.public final void setBisDate(com.ibm.icu.util.Calendar set_date)
set_date - the date of a ICU supported calendar
public final void setBisDate(String set_date,
String calstr)
set_date - a date stringcalstr - the calendar as String, one of CALENDARS.public final String getText()
public final String getCalendar()
public final com.ibm.icu.util.Calendar getVon()
public final String getVonToGregorianString()
public final int getIvon()
public final com.ibm.icu.util.Calendar getBis()
public final String getBisToGregorianString()
public final int getIbis()
public void setFromDOM(Element element)
setFromDOM in interface MCRMetaInterfacesetFromDOM in class MCRMetaDefaultelement - a relevant JDOM element for the metadata
public Element createXML()
throws MCRException
createXML in interface MCRMetaInterfacecreateXML in class MCRMetaDefaultMCRException - if the content of this class is not validpublic boolean isValid()
isValid in interface MCRMetaInterfaceisValid in class MCRMetaDefaultpublic Object clone()
clone in interface MCRMetaInterfaceclone in class MCRMetaDefaultpublic void debug()
debug in interface MCRMetaInterfacedebug in class MCRMetaDefault
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||