Skip to content

Use Predicates instead of Use Classes? #43

@azaroth42

Description

@azaroth42

Talked through the current postcard model with @jcoyne and @mjgiarlo this morning, and this came from that discussion.

It would be easier to use predicates for the relationship between Object and FileSet, and between FileSet and Files than to look for classes on the child resource.

In particular, the clinching use case was an Object with two FileSets, one for Image depiction and one for TEI transcription. The question came up: How do I know that I can display the TEI file (or likely a pre-processed derivative) as the text of the Object? With Use, the TEI file would need to be both OriginalFile and ExtractedText, and all derivatives would be ExtractedText. So the processing requirement would be:

For each FileSet,
  For each File,
    If the File is a use:ExtractedText,
      Record it
Pick one of the ExtractedTexts to render

It seemed easier to link from the Object to the TEI FileSet with a relationship, rather than filtering like this. Similarly, filtering the Files for the OriginalFile rather than following a "hasOriginalFile" relationship seemed significantly easier.

So, the proposal is to continue with a single container for Files (and FileSets, issue forthcoming) and also add a relationship from the parent to the child.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions