Class MCRWorksSection

java.lang.Object
org.mycore.orcid.works.MCRWorksSection

public class MCRWorksSection extends Object
Represents the "works" section of an ORCID profile with grouped works
Author:
Frank Lützenkirchen
  • Constructor Details

  • Method Details

    • getORCID

      public MCRORCIDProfile getORCID()
    • getWorks

      public List<MCRWork> getWorks()
    • getWork

      public MCRWork getWork(String putCode)
      Returns the work with the given put code, if any
    • getGroups

      public List<MCRGroupOfWorks> getGroups()
      Returns the list of grouped works after fetching work summaries. Multiple works from different sources which are assumed to represent the same publication are grouped together by ORCID.
    • buildMODSCollection

      public Element buildMODSCollection()
      Returns a mods:modsCollection containing all MODS representations of the works. The MODS from multiple works within the same groups is merged together, so for each group of works there will be a single mods within the collection.
    • buildUnmergedMODSCollection

      public Element buildUnmergedMODSCollection()
    • refetchGroupsAndSummaries

      public void refetchGroupsAndSummaries() throws JDOMException, IOException, SAXException
      Fetches the grouping of works and all work summaries from the ORCID profile. Can be called to refresh information on grouping to find out how grouping of works may have changed after adding or deleting works.
      Throws:
      JDOMException
      IOException
      SAXException
    • fetchDetails

      public void fetchDetails() throws IOException, JDOMException, SAXException
      Fetches the work details for all work summaries from the ORCID profile.
      Throws:
      IOException
      JDOMException
      SAXException
    • addWorkFrom

      public MCRWork addWorkFrom(MCRObjectID objectID) throws IOException, JDOMException, SAXException
      Adds a new "work" to the remote ORCID profile. The publication data is taken from the MODS stored in the MyCoRe object with the given ID.
      Throws:
      IOException
      JDOMException
      SAXException
    • findWork

      public Optional<MCRWork> findWork(MCRObjectID oid)
      Returns the work originating from the given local object, if any. This is done by comparing the ID and all mods:identifier elements given in the MyCoRe MODS object with the identifiers given in the ORCID work.
    • findWork

      public Optional<MCRWork> findWork(MCRObject obj)
    • findOwnWork

      public Optional<MCRWork> findOwnWork(MCRObjectID oid)
    • findOwnWork

      public Optional<MCRWork> findOwnWork(MCRObject obj)
    • findWorks

      public Stream<MCRWork> findWorks(MCRObject obj)
    • containsWork

      public boolean containsWork(MCRObjectID oid)
      Returns true, if there is a work in the ORCID profile that's origin is the given MyCoRe object
    • containsOwnWork

      public boolean containsOwnWork(MCRObjectID oid)
    • getWorksFromThisApplication

      public Stream<MCRWork> getWorksFromThisApplication()
      Returns all works in the ORCID profile that have been added by ths MyCoRe application