org.mycore.datamodel.metadata
Interface MCRMetaInterface

All Superinterfaces:
Cloneable
All Known Implementing Classes:
MCRMetaAccessRule, MCRMetaAddress, MCRMetaBoolean, MCRMetaClassification, MCRMetaDefault, MCRMetaDerivateLink, MCRMetaHistoryDate, MCRMetaIFS, MCRMetaInstitutionName, MCRMetaISBN, MCRMetaISO8601Date, MCRMetaLangText, MCRMetaLink, MCRMetaLinkID, MCRMetaNBN, MCRMetaNumber, MCRMetaPersonName, MCRMetaXML

public interface MCRMetaInterface
extends Cloneable

This interface is designed to to have a general description of the common methode set of all metadata classes.

Version:
$Revision: 14003 $ $Date: 2008-09-16 11:45:07 +0200 (Di, 16 Sep 2008) $
Author:
Jens Kupferschmidt

Method Summary
 Object clone()
          This method make a clone of this class.
 Element createXML()
          This methode create a XML stream for a metadata part.
 void debug()
          This method put debug data to the logger (for the debug mode).
 void decrementInherited()
          This method decrements the inherited value with 1.
 int getInherited()
          This method get the inherited element.
 String getInheritedToString()
          This method get the inherited element.
 String getLang()
          This method get the language element.
 String getSubTag()
          This method get the subtag element.
 String getType()
          This method get the type element.
 void incrementInherited()
          This method increments the inherited value with 1.
 boolean isValid()
          This methode check the validation of the content of this class.
 void setFromDOM(Element element)
          This methode read the XML input stream part from a DOM part for the metadata of the document.
 void setInherited(int value)
          This method set the inherited level.
 void setLang(String default_lang)
          This methode set the default language to the class.
 void setSubTag(String set_subtag)
          This method set the subtag element.
 void setType(String set_type)
          This method set the type element.
 

Method Detail

getInherited

int getInherited()
This method get the inherited element.

Returns:
the inherited flag as int

getInheritedToString

String getInheritedToString()
This method get the inherited element.

Returns:
the inherited value as string

getLang

String getLang()
This method get the language element.

Returns:
the language

getSubTag

String getSubTag()
This method get the subtag element.

Returns:
the subtag

getType

String getType()
This method get the type element.

Returns:
the type

setInherited

void setInherited(int value)
This method set the inherited level. This can be 0 or an integer higher 0.

Parameters:
value - the inherited level value, if it is < 0, 0 was set

incrementInherited

void incrementInherited()
This method increments the inherited value with 1.


decrementInherited

void decrementInherited()
This method decrements the inherited value with 1.


setLang

void setLang(String default_lang)
This methode set the default language to the class.

Parameters:
default_lang - the default language

setSubTag

void setSubTag(String set_subtag)
               throws MCRException
This method set the subtag element. If the value of set_subtag is null or empty an exception was throwed.

Parameters:
set_subtag - the subtag
Throws:
MCRException - if the set_subtag value is null or empty

setType

void setType(String set_type)
This method set the type element. If the value of set_type is null or empty nothing was changed.

Parameters:
set_type - the optional type

setFromDOM

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

Parameters:
element - a relevant JDOM element for the metadata

createXML

Element createXML()
                  throws MCRException
This methode create a XML stream for a metadata part.

Returns:
a JDOM Element with the XML data of the metadata part
Throws:
MCRException - if the content of this class is not valid

isValid

boolean isValid()
This methode check the validation of the content of this class.

Returns:
a boolean value

clone

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


debug

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