ocrd_models.ocrd_file module

API to mets:file

class ocrd_models.ocrd_file.OcrdFile(el, mimetype=None, loctype='OTHER', instance=None, local_filename=None, mets=None, url=None)[source]

Bases: object

Represents a <mets:file>/<mets:FLocat>

ID

Get the ID attribute.

basename

Get the os.path.basename of the local file, if any.

basename_without_extension

Get the os.path.basename of the local file, if any, with extension removed.

extension
fileGrp

The USE attribute of the containing mets -- fileGrp

loctype

Get the LOCTYPE.

mimetype

Get the MIMETYPE.

otherloctype
pageId

Get the ID of the physical page this file manifests.

url

Get the xlink -- href of this file.