Class MCRDerivate

java.lang.Object
org.mycore.datamodel.metadata.MCRBase
org.mycore.datamodel.metadata.MCRDerivate

public final class MCRDerivate extends MCRBase
This class holds all information of a derivate. For persistence operations see methods of MCRMetadataManager.
Version:
$Revision$ $Date: 2010-09-30 17:49:21 +0200 (Thu, 30 Sep 2010) $
Author:
Jens Kupferschmidt, Thomas Scheffler
  • Field Details

  • Constructor Details

  • Method Details

    • getDerivate

      public MCRObjectDerivate getDerivate()
      This methode return the instance of the MCRObjectDerivate class. If this was not found, null was returned.
      Returns:
      the instance of the MCRObjectDerivate class
    • setUp

      protected void setUp() throws MCRException
      The given DOM was convert into an internal view of metadata. This are the object ID and the object label, also the blocks structure, flags and metadata.
      Overrides:
      setUp in class MCRBase
      Throws:
      MCRException - general Exception of MyCoRe
    • createXML

      public Document createXML() throws MCRException
      This methode create a XML stream for all object data.
      Overrides:
      createXML in class MCRBase
      Returns:
      a JDOM Document with the XML data of the object as byte array
      Throws:
      MCRException - if the content of this class is not valid
    • getRootTagName

      protected String getRootTagName()
      Specified by:
      getRootTagName in class MCRBase
    • getUrnMap

      public Map<String,String> getUrnMap()
      Reads all files and urns from the derivate.
      Returns:
      A Map which contains the files as key and the urns as value. If no URN assigned the map will be empty.
    • getLabel

      public String getLabel()
      This methode return the label or null if it was not set.
      Returns:
      the label as a string
    • debug

      public void debug()
      The method print all informations about this MCRObject.
    • validate

      public void validate() throws MCRException
      Validates this MCRDerivate. This method throws an exception if:
      • the mcr_id is null
      • the XML schema is null or empty
      • the service part is null or invalid
      • the MCRObjectDerivate is null or invalid
      Overrides:
      validate in class MCRBase
      Throws:
      MCRException - the MCRDerivate is invalid
    • getOwnerID

      public MCRObjectID getOwnerID()
      Returns:
      the MCRObjectID of the owner of the derivate
    • setId

      public void setId(MCRObjectID id)
      Description copied from class: MCRBase
      This method set the object ID.
      Overrides:
      setId in class MCRBase
      Parameters:
      id - the object ID
    • setLabel

      public void setLabel(String label)
      This method set the derivate label.
      Parameters:
      label - - the derivate label
    • getOrder

      public int getOrder()
    • setOrder

      public void setOrder(int order)
    • setFromJDOM

      protected void setFromJDOM(Document doc)
      Overrides:
      setFromJDOM in class MCRBase
    • createJSON

      public com.google.gson.JsonObject createJSON()
      Description copied from class: MCRBase
      Creates the JSON representation of this object.
         {
           id: "mycore_project_00000001",
           version: "3.0"
         }
       
      Overrides:
      createJSON in class MCRBase