Class ZenodoExporter

java.lang.Object
org.gcube.common.software.processor.SoftwareArtifactProcessor
org.gcube.common.software.processor.zenodo.ZenodoExporter

public class ZenodoExporter extends SoftwareArtifactProcessor
Author:
Luca Frosini (ISTI - CNR)
  • Field Details

  • Constructor Details

    • ZenodoExporter

      public ZenodoExporter()
  • Method Details

    • getZenodoIDFromDOIURL

      protected String getZenodoIDFromDOIURL(URL doiURL)
    • getZenodoIDFromDOIURL

      protected String getZenodoIDFromDOIURL(String doiURL)
    • addFilesToDeposition

      protected void addFilesToDeposition(List<File> files) throws Exception
      Throws:
      Exception
    • getJerseyClientWithAutoHeaders

      protected jakarta.ws.rs.client.Client getJerseyClientWithAutoHeaders(String baseUrl)
      Creates a Jersey Client with automatic header injection and rate limiting
      Parameters:
      baseUrl - the base URL for the API
      Returns:
      configured Jersey Client instance with automatic headers and rate limiting
    • getZenodoRequestBuilderWithClient

      protected ZenodoExporter.ClientAndBuilder getZenodoRequestBuilderWithClient(String path)
      Alternative method that returns both client and builder for manual resource management
      Parameters:
      path - the API endpoint path
      Returns:
      ClientAndBuilder wrapper containing both client and builder
    • updateMetadata

      protected void updateMetadata() throws Exception
      Throws:
      Exception
    • commitVersion

      protected void commitVersion() throws Exception
      Throws:
      Exception
    • finalizeProcessing

      protected void finalizeProcessing() throws Exception
      Throws:
      Exception
    • createZenodoDOIURLFromID

      protected String createZenodoDOIURLFromID(String id) throws MalformedURLException
      Throws:
      MalformedURLException
    • create

      public void create() throws Exception
      Throws:
      Exception
    • update

      public void update() throws Exception
      Throws:
      Exception
    • deletePreviousFiles

      protected void deletePreviousFiles(com.fasterxml.jackson.databind.JsonNode jsonNode) throws Exception
      Remove previous depositionFiles
      Throws:
      Exception
    • newVersion

      public void newVersion() throws Exception
      Throws:
      Exception
    • getConfig

      protected String getConfig(String propertyName) throws Exception
      Throws:
      Exception
    • getZenodoConnectionConfig

      protected void getZenodoConnectionConfig() throws Exception
      Throws:
      Exception
    • export

      public void export() throws Exception
      Specified by:
      export in class SoftwareArtifactProcessor
      Throws:
      Exception
    • getObjectNode

      protected com.fasterxml.jackson.databind.node.ObjectNode getObjectNode() throws Exception
      Throws:
      Exception
    • writeObjectNodeToFile

      protected void writeObjectNodeToFile(com.fasterxml.jackson.databind.node.ObjectNode toBeExported, File file) throws Exception
      Throws:
      Exception
    • getOutputFile

      public File getOutputFile() throws Exception
      Overrides:
      getOutputFile in class SoftwareArtifactProcessor
      Throws:
      Exception