Class MCRMetaPersonName

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

public final class MCRMetaPersonName extends MCRMetaDefault
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
  • 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

      public MCRMetaPersonName(String subtag, int inherted) throws MCRException
      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 subtag
      inherted - a value >= 0
      Throws:
      MCRException - if the parameter values are invalid
  • Method Details

    • getFirstName

      public String getFirstName()
      This method get the first name text element.
      Returns:
      the first name
    • setFirstName

      public void setFirstName(String firstname)
      This method set the first name text element.
    • getCallName

      public String getCallName()
      This method get the call name text element.
      Returns:
      the call name
    • setCallName

      public void setCallName(String callname)
      This method set the call name text element.
    • getSurName

      public String getSurName()
      This method get the surname text element.
      Returns:
      the surname
    • setSurName

      public void setSurName(String surname)
      This method set the surname text element.
    • getFullName

      public String getFullName()
      This method get the full name text element.
      Returns:
      the full name
    • setFullName

      public void setFullName(String fullname)
      This method set the full name text element.
    • getAcademic

      public String getAcademic()
      This method get the academic text element.
      Returns:
      the academic
    • setAcademic

      public void setAcademic(String academic)
      This method set the academic text element.
    • getPeerage

      public String getPeerage()
      This method get the peerage text element.
      Returns:
      the peerage
    • setPeerage

      public void setPeerage(String peerage)
      This method set the peerage text element.
    • getNumeration

      public String getNumeration()
      This method get the numeration text element.
      Returns:
      the numeration
    • setNumeration

      public void setNumeration(String numeration)
      This method set the numeration text element.
    • getTitle

      public String getTitle()
      This method get the title text element.
      Returns:
      the title
    • setTitle

      public void setTitle(String title)
      This method set the title text element.
    • getPrefix

      public String getPrefix()
      This method get the prefix text element.
      Returns:
      the prefix
    • setPrefix

      public void setPrefix(String prefix)
      This method set the prefix text element.
    • getAffix

      public String getAffix()
      This method get the affix text element.
      Returns:
      the affix
    • setAffix

      public void setAffix(String affix)
      This method set the affix text element.
    • setFromDOM

      public 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 JDOM element for the metadata
    • createXML

      public Element createXML() throws MCRException
      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 interface MCRMetaInterface
      Overrides:
      createXML in class MCRMetaDefault
      Returns:
      a JDOM Element with the XML MCRMetaPersonName part
      Throws:
      MCRException - if the content of this class is not valid
    • validate

      public void validate() throws MCRException
      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 interface MCRMetaInterface
      Overrides:
      validate in class MCRMetaDefault
      Throws:
      MCRException - the MCRMetaPersonName is invalid
    • clone

      public MCRMetaPersonName clone()
      clone of this instance you will get a (deep) clone of this element
      Specified by:
      clone in interface MCRMetaInterface
      Overrides:
      clone in class MCRMetaDefault
      See Also:
    • 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
    • equals

      public boolean equals(Object obj)
      This method compares this instance with a MCRMetaPersonName object
      Overrides:
      equals in class MCRMetaDefault