ocrd_models.ocrd_file module

API to mets:file

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

Bases: object

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

property ID

Get the ID attribute.

property basename

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

property basename_without_extension

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

property extension
property fileGrp

The USE attribute of the containing mets:fileGrp

property loctype

Get the LOCTYPE.

property mimetype

Get the MIMETYPE.

property otherloctype
property pageId

Get the ID of the physical page this file manifests.

property url

Get the xlink:href of this file.