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 single mets:file/mets:FLocat (METS file entry).

property ID

file`.

Type

Get the @ID of the `mets

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

fileGrp`

Type

The @USE of the containing `mets

property loctype

file`.

Type

Get the @LOCTYPE of the `mets

property mimetype

file`.

Type

Get the @MIMETYPE of the `mets

property otherloctype
property pageId

file` (physical page manifestation).

Type

Get the @ID of the physical `mets

Type

structMap` entry corresponding to this `mets

property url

file`.

Type

Get the `@xlink

Type

href` of this `mets