Interface MCRMetaInterface

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

public interface MCRMetaInterface extends Cloneable
This interface is designed to to have a general description of the common method set of all metadata classes.
Version:
$Revision$ $Date$
Author:
Jens Kupferschmidt
  • Method Summary

    Modifier and Type
    Method
    Description
    This method make a clone of this class.
    com.google.gson.JsonObject
    This method creates a JSON representation of the metadata part.
    This method create a XML stream for a metadata part.
    void
    This method put debug data to the logger (for the debug mode).
    void
    This method decrements the inherited value with 1.
    int
    This method get the inherited element.
    This method get the language element.
    This method get the subtag element.
    This method get the type element.
    void
    This method increments the inherited value with 1.
    boolean
    This method check the validation of the content of this class.
    void
    This method 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
    This methode set the default language to the class.
    void
    setSubTag(String subtag)
    This method set the subtag element.
    void
    This method set the type element.
    void
    Validates the content of this class.
  • Method Details

    • getInherited

      int getInherited()
      This method get the inherited element.
      Returns:
      the inherited flag as int
    • 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 is 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 lang)
      This methode set the default language to the class.
      Parameters:
      lang - the language
    • setSubTag

      void setSubTag(String subtag) throws MCRException
      This method set the subtag element. If the value of subtag is null or empty an exception is throwed.
      Parameters:
      subtag - the subtag
      Throws:
      MCRException - if the subtag value is null or empty
    • setType

      void setType(String type)
      This method set the type element. If the value of type is null or empty nothing was changed.
      Parameters:
      type - the optional type
    • setFromDOM

      void setFromDOM(Element element)
      This method 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 method 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
    • createJSON

      com.google.gson.JsonObject createJSON()
      This method creates a JSON representation of the metadata part.
      Returns:
      a GSON object containing the json data of the metadata part
    • isValid

      boolean isValid()
      This method check the validation of the content of this class.
      Returns:
      a boolean value
    • validate

      void validate() throws MCRException
      Validates the content of this class.
      Throws:
      MCRException - the content is invalid
    • clone

      This method make a clone of this class.
    • debug

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