org.mycore.datamodel.metadata
Class MCRMetaXML

java.lang.Object
  extended by org.mycore.datamodel.metadata.MCRMetaDefault
      extended by org.mycore.datamodel.metadata.MCRMetaXML
All Implemented Interfaces:
Cloneable, MCRMetaInterface

public class MCRMetaXML
extends MCRMetaDefault

This class implements all method for handling with the MCRMetaLangText part of a metadata object. The MCRMetaLangText class present a single item, which has triples of a text and his corresponding language and optional a type.

Version:
$Revision: 14003 $ $Date: 2008-09-16 11:45:07 +0200 (Di, 16 Sep 2008) $
Author:
Thomas Scheffler (yagee), Jens Kupferschmidt, Johannes Bühler

Field Summary
(package private)  List<Content> content
           
 
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, LOGGER, NL, subtag, type
 
Constructor Summary
MCRMetaXML()
          This is the constructor.
MCRMetaXML(String set_datapart, String set_subtag, String set_type, int set_inherited)
           
 
Method Summary
 Object clone()
          This method make a clone of this class.
 Element createXML()
          This method create a XML stream for all data in this class, defined by the MyCoRe XML MCRMetaLangText definition for the given subtag.
 void debug()
          This method put debug data to the logger (for the debug mode).
 boolean isValid()
          This method check the validation of the content of this class.
 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
 

Field Detail

content

List<Content> content
Constructor Detail

MCRMetaXML

public MCRMetaXML()
This is the constructor.
Set the java.util.ArrayList of child elements to new.


MCRMetaXML

public MCRMetaXML(String set_datapart,
                  String set_subtag,
                  String set_type,
                  int set_inherited)
           throws MCRException
Throws:
MCRException
Method Detail

setFromDOM

public void setFromDOM(Element element)
This method read the XML input stream part from a DOM part for the metadata of the document.

Specified by:
setFromDOM in interface MCRMetaInterface
Overrides:
setFromDOM in class MCRMetaDefault
Parameters:
element - a relevant JDOM element for the metadata

createXML

public Element createXML()
                  throws MCRException
This method create a XML stream for all data in this class, defined by the MyCoRe XML MCRMetaLangText definition for the given subtag.

Specified by:
createXML in interface MCRMetaInterface
Specified by:
createXML in class MCRMetaDefault
Returns:
a JDOM Element with the XML MCRMetaLangText part
Throws:
MCRException - if the content of this class is not valid

isValid

public boolean isValid()
This method check the validation of the content of this class. The method returns true if otherwise the method return false

Specified by:
isValid in interface MCRMetaInterface
Overrides:
isValid in class MCRMetaDefault
Returns:
a boolean value

clone

public Object clone()
This method make a clone of this class.

Specified by:
clone in interface MCRMetaInterface
Specified by:
clone in class MCRMetaDefault

debug

public void debug()
This method put debug data to the logger (for the debug mode).

Specified by:
debug in interface MCRMetaInterface
Overrides:
debug in class MCRMetaDefault