Class MCRMetaEnrichedLinkID

All Implemented Interfaces:
Cloneable, MCRMetaInterface
Direct Known Subclasses:
MCREditableMetaEnrichedLinkID

@JsonClassDescription("Links to derivates") public class MCRMetaEnrichedLinkID extends MCRMetaLinkID
A Link to a MCRDerivate. In addition to MCRMetaLink this class contains information about the linked MCRBase like mainDoc, titles and classifications in MCRDerivate. See also MCREditableMetaEnrichedLinkID
  • Field Details

  • Constructor Details

    • MCRMetaEnrichedLinkID

      public MCRMetaEnrichedLinkID()
  • Method Details

    • fromDom

      public static MCRMetaEnrichedLinkID fromDom(Element element)
    • setFromDOM

      public void setFromDOM(Element element)
      Description copied from class: MCRMetaLinkID
      This method read 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 MCRMetaLinkID
      Parameters:
      element - a relevant DOM element for the metadata
    • createXML

      public Element createXML() throws MCRException
      Description copied from class: MCRMetaLink
      This method create a XML stream for all data in this class, defined by the MyCoRe XML MCRMetaLink definition for the given subtag.
      Specified by:
      createXML in interface MCRMetaInterface
      Overrides:
      createXML in class MCRMetaLink
      Returns:
      a JDOM Element with the XML MCRMetaLink part
      Throws:
      MCRException - if the content of this class is not valid
    • getContentList

      public List<Content> getContentList()
    • setContentList

      public void setContentList(List<Content> contentList)
    • getOrder

      public int getOrder()
    • getMainDoc

      public String getMainDoc()
    • getClassifications

      public List<MCRCategoryID> getClassifications()
    • getTitle

      public List<MCRMetaLangText> getTitle()
    • elementsWithNameFromContentList

      protected Stream<Element> elementsWithNameFromContentList(String name)
    • createJSON

      public com.google.gson.JsonObject createJSON()
      Description copied from class: MCRMetaLink
      Creates the JSON representation. Extends the MCRMetaDefault.createJSON() method with the following data. For linktype equals 'locator':
         {
           label: "MyCoRe Derivate Image",
           title: "MyCoRe Derivate Image",
           role: "image_reference",
           href: "mycore_derivate_00000001/image.tif"
         }
       
      For all other linktypes (arc):
         {
           label: "Link between Issue and Person",
           title: "Link between Issue and Person",
           role: "link",
           from: "mycore_issue_00000001",
           to: "mycore_person_00000001"
         }
       
      Specified by:
      createJSON in interface MCRMetaInterface
      Overrides:
      createJSON in class MCRMetaLink
      Returns:
      a GSON object containing the json data of the metadata part
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class MCRMetaLinkID
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class MCRMetaLink