Package org.mycore.datamodel.metadata
Class MCRMetaPersonName
java.lang.Object
org.mycore.datamodel.metadata.MCRMetaDefault
org.mycore.datamodel.metadata.MCRMetaPersonName
- All Implemented Interfaces:
Cloneable
,MCRMetaInterface
This class implements all methods for handling a name with the
MCRMetaPersonName datamodel. The MCRMetaPersonName class represents a natural
or legal person specified by a list of names parts.
- Author:
- J. Vogler, J. Kupferschmidt
-
Field Summary
Fields inherited from class org.mycore.datamodel.metadata.MCRMetaDefault
datapart, DEFAULT_ATTRIBUTE_INHERITED, DEFAULT_ATTRIBUTE_LANG, DEFAULT_ATTRIBUTE_SEQUENCE, DEFAULT_ATTRIBUTE_TYPE, DEFAULT_ELEMENT_DATAPART, DEFAULT_INHERITED, DEFAULT_LANG_LENGTH, DEFAULT_LANGUAGE, DEFAULT_SEQUENCE, DEFAULT_STRING_LENGTH, DEFAULT_TYPE_LENGTH, inherited, lang, NL, sequence, subtag, type
-
Constructor Summary
ConstructorDescriptionThis is the constructor.MCRMetaPersonName
(String subtag, int inherted) This is the constructor. -
Method Summary
Modifier and TypeMethodDescriptionclone()
clone of this instance you will get a (deep) clone of this elementThis method creates a XML stream for all data in this class, defined by the MyCoRe XML MCRMetaPersonName definition for the given subtag.void
debug()
This method put debug data to the logger (for the debug mode).boolean
This method compares this instance with a MCRMetaPersonName objectThis method get the academic text element.getAffix()
This method get the affix text element.This method get the call name text element.This method get the first name text element.This method get the full name text element.This method get the numeration text element.This method get the peerage text element.This method get the prefix text element.This method get the surname text element.getTitle()
This method get the title text element.void
setAcademic
(String academic) This method set the academic text element.void
This method set the affix text element.void
setCallName
(String callname) This method set the call name text element.void
setFirstName
(String firstname) This method set the first name text element.void
setFromDOM
(Element element) This method reads the XML input stream part from a DOM part for the metadata of the document.void
setFullName
(String fullname) This method set the full name text element.void
setNumeration
(String numeration) This method set the numeration text element.void
setPeerage
(String peerage) This method set the peerage text element.void
This method set the prefix text element.void
setSurName
(String surname) This method set the surname text element.void
This method set the title text element.void
validate()
Validates this MCRMetaPersonName.Methods inherited from class org.mycore.datamodel.metadata.MCRMetaDefault
createJSON, debugDefault, decrementInherited, getInherited, getLang, getSequence, getSubTag, getType, hashCode, incrementInherited, isValid, setInherited, setLang, setSequence, setSubTag, setType
-
Constructor Details
-
MCRMetaPersonName
public MCRMetaPersonName()This is the constructor.
The language element was set to application default language. All other elements will be set to an empty string. -
MCRMetaPersonName
This is the constructor.
The method set all common fields of all MCRMetaXXX datamodel types. It set the language to the application default language. The type attribute will be set to an empty String.- Parameters:
subtag
- the name of the subtaginherted
- a value >= 0- Throws:
MCRException
- if the parameter values are invalid
-
-
Method Details
-
getFirstName
This method get the first name text element.- Returns:
- the first name
-
setFirstName
This method set the first name text element. -
getCallName
This method get the call name text element.- Returns:
- the call name
-
setCallName
This method set the call name text element. -
getSurName
This method get the surname text element.- Returns:
- the surname
-
setSurName
This method set the surname text element. -
getFullName
This method get the full name text element.- Returns:
- the full name
-
setFullName
This method set the full name text element. -
getAcademic
This method get the academic text element.- Returns:
- the academic
-
setAcademic
This method set the academic text element. -
getPeerage
This method get the peerage text element.- Returns:
- the peerage
-
setPeerage
This method set the peerage text element. -
getNumeration
This method get the numeration text element.- Returns:
- the numeration
-
setNumeration
This method set the numeration text element. -
getTitle
This method get the title text element.- Returns:
- the title
-
setTitle
This method set the title text element. -
getPrefix
This method get the prefix text element.- Returns:
- the prefix
-
setPrefix
This method set the prefix text element. -
getAffix
This method get the affix text element.- Returns:
- the affix
-
setAffix
This method set the affix text element. -
setFromDOM
This method reads the XML input stream part from a DOM part for the metadata of the document.- Specified by:
setFromDOM
in interfaceMCRMetaInterface
- Overrides:
setFromDOM
in classMCRMetaDefault
- Parameters:
element
- a relevant JDOM element for the metadata
-
createXML
This method creates a XML stream for all data in this class, defined by the MyCoRe XML MCRMetaPersonName definition for the given subtag.- Specified by:
createXML
in interfaceMCRMetaInterface
- Overrides:
createXML
in classMCRMetaDefault
- Returns:
- a JDOM Element with the XML MCRMetaPersonName part
- Throws:
MCRException
- if the content of this class is not valid
-
validate
Validates this MCRMetaPersonName. This method throws an exception if:- the subtag is not null or empty
- the lang value was supported
- the inherited value is lower than zero
- the firstname, the callname or the fullname is null
- Specified by:
validate
in interfaceMCRMetaInterface
- Overrides:
validate
in classMCRMetaDefault
- Throws:
MCRException
- the MCRMetaPersonName is invalid
-
clone
clone of this instance you will get a (deep) clone of this element- Specified by:
clone
in interfaceMCRMetaInterface
- Overrides:
clone
in classMCRMetaDefault
- See Also:
-
debug
public void debug()This method put debug data to the logger (for the debug mode).- Specified by:
debug
in interfaceMCRMetaInterface
- Overrides:
debug
in classMCRMetaDefault
-
equals
This method compares this instance with a MCRMetaPersonName object- Overrides:
equals
in classMCRMetaDefault
-