|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.datamodel.metadata.MCRMetaElement
public class MCRMetaElement
This class is designed to to have a basic class for all metadata. The class has inside a ArrayList that holds all metaddata elements for one XML tag. Furthermore, this class supports the linking of a document owing this metadata element to another document, the id of which is given in the xlink:href attribute of the MCRMetaLink representing the link. The class name of such a metadata element must be MCRMetaLink, and the metadata element is considered to be a folder of links.
| Field Summary | |
|---|---|
protected static MCRConfiguration |
CONFIG
|
static boolean |
DEFAULT_HERITABLE
|
static String |
DEFAULT_LANGUAGE
|
static boolean |
DEFAULT_NOT_INHERIT
|
(package private) static Logger |
LOGGER
|
| Constructor Summary | |
|---|---|
MCRMetaElement()
This is the constructor of the MCRMetaElement class. |
|
MCRMetaElement(String default_lang)
This is the constructor of the MCRMetaElement class. |
|
MCRMetaElement(String set_lang,
String set_classname,
String set_tag,
boolean set_heritable,
boolean set_notinherit,
ArrayList<MCRMetaInterface> set_list)
This is the constructor of the MCRMetaElement class. |
|
| Method Summary | |
|---|---|
void |
addMetaObject(MCRMetaInterface obj)
The method add a metadata object, that implements the MCRMetaInterface to this element. |
Object |
clone()
This method make a clone of this class. |
Element |
createXML(boolean flag)
This methode create a XML stream for all data in this class, defined by the MyCoRe XML MCRLangText definition for the given subtag. |
void |
debug()
This method put debug data to the logger (for the debug mode). |
String |
getClassName()
This methode return the name of this metadata class as string. |
MCRMetaInterface |
getElement(int index)
This methode return the instance of an element from the list with index i. |
boolean |
getHeritable()
This methode return the heritable flag of this metadata as boolean value. |
String |
getLang()
This methode return the default language of this metadata class as string. |
boolean |
getNotInherit()
This methode return the nonherit flag of this metadata as boolean value. |
String |
getTag()
This methode return the tag of this metadata class as string. |
boolean |
isValid()
This methode check the validation of the content of this class. |
void |
removeInheritedObject()
The method removes all inherited metadata objects of this MCRMetaElement. |
void |
setClassName(String classname)
This methode set the element class name for the metadata elements. |
void |
setFromDOM(Element element)
This methode read the XML input stream part from a DOM part for the metadata of the document. |
void |
setHeritable(boolean heritable)
This methode set the heritable flag for the metadata class. |
void |
setHeritable(String heritable)
This methode set the heritable flag for the metadata class. |
void |
setNotInherit(boolean notinherit)
This methode set the notinherit flag for the metadata class. |
void |
setNotInherit(String notinherit)
This methode set the notinherit flag for the metadata class. |
void |
setTag(String tag)
This methode set the tag for the metadata class. |
int |
size()
size returns the number of elements in this instance. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_LANGUAGE
public static final boolean DEFAULT_HERITABLE
public static final boolean DEFAULT_NOT_INHERIT
protected static final MCRConfiguration CONFIG
static Logger LOGGER
| Constructor Detail |
|---|
public MCRMetaElement()
public MCRMetaElement(String default_lang)
default_lang - the default language
public MCRMetaElement(String set_lang,
String set_classname,
String set_tag,
boolean set_heritable,
boolean set_notinherit,
ArrayList<MCRMetaInterface> set_list)
set_lang - the default languageset_classname - the name of the MCRMeta... classset_tag - the name of this tagset_heritable - set this flag to true if all child objects of this element can
inherit this dataset_notinherit - set this flag to true if this element should not inherit from
his parent objectset_list - a list of MCRMeta... data lines to add in this element| Method Detail |
|---|
public final String getClassName()
public final MCRMetaInterface getElement(int index)
public final boolean getHeritable()
public final boolean getNotInherit()
public final String getLang()
public final String getTag()
public void setHeritable(String heritable)
heritable - the heritable flag as stringpublic void setHeritable(boolean heritable)
heritable - the heritable flag as boolean valuepublic void setNotInherit(String notinherit)
notinherit - the notinherit flag as stringpublic void setNotInherit(boolean notinherit)
notinherit - the notinherit flag as boolean valuepublic void setTag(String tag)
tag - the tag for the metadata classpublic final void setClassName(String classname)
classname - the class name for the metadata elementspublic final int size()
public final void addMetaObject(MCRMetaInterface obj)
obj - a metadata object
MCRException - if the class name of the object is not the same like the
name of all store metadata in this element.public final void removeInheritedObject()
public final void setFromDOM(Element element)
throws MCRException
element - a relevant JDOM element for the metadata
MCRException - if the class can't loaded
public final Element createXML(boolean flag)
throws MCRException
flag - true if all inherited data should be include, else false
MCRException - if the content of this class is not validpublic final boolean isValid()
public final Object clone()
clone in class Objectpublic final void debug()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||