-
1. Re: Started to implement Cloud BinaryStore
hchiorean Nov 7, 2014 2:45 AM (in response to agonist)If you're willing to contribute the binary store, we'd love to review & integrate a PR. It's something that has been on our radar since 3.0 - [MODE-1446] Store binary files in S3 - JBoss Issue Tracker.
The text extraction methods are the way in which binary stores map a binary value to a text value (string) when text extractors are configured (see Query and search - ModeShape 3 - Project Documentation Editor). In short, to enhance full-text-search, Modeshape has the ability to extract & store text from certain formats via Apache Tika (e.g. PDFs, DOCs etc). So a binary store should be able to handle the [binary value, text] mappings.
There is no way to differentiate where each binary is stored i.e. all binaries are treated equal. That being said, we do have a modeshape/CompositeBinaryStore.java at master · ModeShape/modeshape · GitHub which is basically a map of [name, BinaryStore] entries and based on the "name" a binary value is stored in one store or another. Via the API you achieve this by calling the storeValue method with a hint (see modeshape/BinaryStore.java at master · ModeShape/modeshape · GitHub). So in the case of an S3 store, you could implement this method and treat the "hint" as the name of the directory within the bucket. To create binary values from the code you would then have to use the ModeShape extension to the value factory API: modeshape/ValueFactory.java at master · ModeShape/modeshape · GitHub