org.mycore.datamodel.metadata
Class MCRMetaInstitutionName

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

public final class MCRMetaInstitutionName
extends MCRMetaDefault

This class implements all methods for handling with the MCRMetaInstitutionName part of a metadata object. The MCRMetaInstitutionName class represents a name of an institution or corporation.

Version:
$Revision: 13085 $ $Date: 2008-02-06 18:27:24 +0100 (Mi, 06 Feb 2008) $
Author:
J. Kupferschmidt

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, LOGGER, NL, subtag, type
 
Constructor Summary
MCRMetaInstitutionName()
          This is the constructor.
MCRMetaInstitutionName(String set_datapart, String set_subtag, String default_lang, String set_type, int set_inherted, String set_fullname, String set_nickname, String set_property)
          This is the constructor.
 
Method Summary
 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 MCRMetaInstitutionName definition for the given subtag.
 String getFullName()
          This method get the name text element.
 String getNickname()
          This method get the nickname text element.
 String getProperty()
          This method get the property text element.
 boolean isValid()
          This method checks the validation of the content of this class.
 void set(String set_fullname, String set_nickname, String set_property)
          This methode set all name componets.
 void setFromDOM(Element element)
          This method reads the XML input stream part from a DOM part for the metadata of the document.
 
Methods inherited from class org.mycore.datamodel.metadata.MCRMetaDefault
debug, 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

MCRMetaInstitutionName

public MCRMetaInstitutionName()
This is the constructor.
The language element was set to en . All other elemnts are set to an empty string.


MCRMetaInstitutionName

public MCRMetaInstitutionName(String set_datapart,
                              String set_subtag,
                              String default_lang,
                              String set_type,
                              int set_inherted,
                              String set_fullname,
                              String set_nickname,
                              String set_property)
                       throws MCRException
This is the constructor.
The language element was set. If the value of default_lang is null, empty or false en was set. The subtag element was set to the value of set_subtag. If the value of set_subtag is null or empty an exception was throwed. The type element was set to the value of set_type, if it is null, an empty string was set to the type element. The fullname, nickname and property element was set to the value of set_..., if they are null, an empty string was set to this element.

Parameters:
set_datapart - the global part of the elements like 'metadata' or 'service'
set_subtag - the name of the subtag
default_lang - the default language
set_type - the optional type string
set_inherted - a value >= 0
set_fullname - the full name
set_nickname - the nickname
set_property - the property title
Throws:
MCRException - if the parameter values are invalid
Method Detail

set

public final void set(String set_fullname,
                      String set_nickname,
                      String set_property)
This methode set all name componets.

Parameters:
set_fullname - the full name
set_nickname - the nickname
set_property - the property title

getFullName

public final String getFullName()
This method get the name text element.

Returns:
the fullname

getNickname

public final String getNickname()
This method get the nickname text element.

Returns:
the nickname

getProperty

public final String getProperty()
This method get the property text element.

Returns:
the property

setFromDOM

public final void setFromDOM(Element element)
This method reads 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 DOM element for the metadata

createXML

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

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

isValid

public final boolean isValid()
This method checks the validation of the content of this class. The method returns false if
  • the name is empty
otherwise the method returns true.

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

clone

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

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