Giter Site home page Giter Site logo

Comments (10)

escowles avatar escowles commented on August 11, 2024

For other storage adapters, we could store them in a sidecar file. The other option would be to store them in the metadata store instead. I don't have a strong preference for one over the other, but it seems like the sidecar file would make the storage adapters more self-contained.

from valkyrie.

tpendragon avatar tpendragon commented on August 11, 2024

Right now the mime_type/filename are stored in the metadata store. It basically goes "Book -> FileSet -> FileNode -> FileInStorageAdapter"

from valkyrie.

jcoyne avatar jcoyne commented on August 11, 2024

@tpendragon it seems like we should be able to upload a file with no metadata. Does that imply that the model would have only id/mime_type/filename ?

from valkyrie.

tpendragon avatar tpendragon commented on August 11, 2024

@jcoyne Which model?

from valkyrie.

jcoyne avatar jcoyne commented on August 11, 2024

I guess that would be FileSet

from valkyrie.

tpendragon avatar tpendragon commented on August 11, 2024

So, I see a couple options.

  1. Postcard -> FileSet -> FileNode('mime_type', 'filename', 'width', 'height') -> (via file_identifiers) FileInStorageAdapter('content')

  2. Postcard -> FileSet -> FileInStorageAdapter('filename', 'mime_type', 'width', 'height') (Problem is disk-based here, how do we store that info? And we won't be able to query for properties of the file)

  3. Postcard -> FileSet -> FileNode('width', 'height', 'filename', 'mime_type') -> FileInStorageAdapter('filename', 'mime_type')

Which do you see as best?

from valkyrie.

jcoyne avatar jcoyne commented on August 11, 2024

Could we have

Postcard -> FileSet -> FileNode -> AbstractMetadataNode

Where AbstractMetadataNode could be part of the StorageAdapter or part of the Persistence?

So the StorageAdapter::Disk could take a metadata_store as an argument (file based store or database)
So the StorageAdapter::Memory could take a metadata_store as an argument (memory based store or database)
and the StorageAdapter::Fedora would have a default metadata store of (fcr:metadata/HTTP headers)?

from valkyrie.

tpendragon avatar tpendragon commented on August 11, 2024

@jcoyne That could work! I'm not sure how to implement it though - if you have any ideas I'd like to see it

from valkyrie.

tpendragon avatar tpendragon commented on August 11, 2024

I mentioned this in another ticket:

I think the easy way to solve this is to:

  1. Get rid of FileNode.
  2. Add a metadata property to our File class
  3. Require a metadata adapter as an initialization argument for our Disk storage adapter, so it knows where to store metadata.

from valkyrie.

escowles avatar escowles commented on August 11, 2024

Requiring a metadata adapter for storage adapters that don't support metadata natively sounds like a good solution to me. If we really wanted to store tech metadata in a sidecar file, we could make a metadata adapter to do that.

from valkyrie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.