DataDesc

class graf.DataDesc(primaryData)[source]

Class that represents the annotations to the document associated with the primary data document this header describes.

__init__(primaryData)[source]

Class’s constructor.

primaryData : dict
Provides the location of the primary data document. The keys are ‘loc’ - relative path or PID of the primary data document, ‘loctype’ - Indicates whether the primary data path is a fully specified path (PID) or a path relative to the location of this header file, the default is ‘relative’, the other option is ‘URL’. The other key is ‘f.id’ - File type via reference to definition in the resource header. All keys are mandatory.
add_annotation(loc, fid, loctype='relative')[source]

This method is responsible to add the annotations to the list of annotations.

The annotations list in this class will represents the documents associated with the primary data document that this header will describe.

loc : str
Relative path or PID of the annotation document.
fid : str
File type via reference to definition in the resource header.
loctype : str
Indicates whether the path is a fully specified path or a path relative to the header file.