:py:mod:`cwltool.cwlprov.ro`
============================

.. py:module:: cwltool.cwlprov.ro

.. autoapi-nested-parse::

   Stores class definition of ResearchObject and WritableBagFile.



Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

   cwltool.cwlprov.ro.ResearchObject




.. py:class:: ResearchObject(fsaccess, temp_prefix_ro = 'tmp', orcid = '', full_name = '')


   CWLProv Research Object.

   .. py:method:: initialize_provenance(full_name, host_provenance, user_provenance, orcid, fsaccess, run_uuid = None)

      Provide a provenance profile initialization hook function.

      Allows overriding the default strategy to define the
      provenance profile concepts and associations to extend
      details as needed.


   .. py:method:: self_check()

      Raise ValueError if this RO is closed.


   .. py:method:: __str__()

      Represent this RO as a string.


   .. py:method:: resolve_user()

      Provide a user provenance hook function.

      Allows overriding the default strategy to retrieve user provenance
      in case the calling code can provide a better resolution.
      The function must return a tuple of the (username, fullname)
      that identifies the user. This user will be applied on top
      to any provided ORCID or fullname by agent association.


   .. py:method:: user_provenance(document)

      Add the user provenance.


   .. py:method:: resolve_host()

      Provide a host provenance hook function.

      Allows overriding the default strategy to retrieve host provenance
      in case the calling code can provide a better resolution.
      The function must return a tuple of the (fqdn, uri) that identifies the host.


   .. py:method:: host_provenance(document)

      Record host provenance.


   .. py:method:: add_tagfile(path, timestamp = None)

      Add tag files to our research object.


   .. py:method:: add_uri(uri, timestamp = None)

      Add the given URI to this RO.


   .. py:method:: add_annotation(about, content, motivated_by = 'oa:describing')

      Cheap URI relativize for current directory and /.


   .. py:method:: generate_snapshot(prov_dep)

      Copy all of the CWL files to the snapshot/ directory.


   .. py:method:: has_data_file(sha1hash)

      Confirm the presence of the given file in the RO.


   .. py:method:: add_data_file(from_fp, timestamp = None, content_type = None)

      Copy inputs to data/ folder.


   .. py:method:: add_to_manifest(rel_path, checksums)

      Add files to the research object manifest.



