3 Replies Latest reply on Nov 19, 2015 2:54 AM by hchiorean

    Use sequencer for content transformation

    rvermeire

      Would it be best practice in Modeshape to use a sequencer for creating a content rendition for example pdf rendition of a docx/odf file?

        • 1. Re: Use sequencer for content transformation
          hchiorean

          ModeShape's sequencers do no convert one data format into another. They read a particular format (e.g. docx), take out the metadata and store it in the repository under a predefined structure, sequencer-specific.

          You can read more about sequencers here: Sequencing - ModeShape 4 - Project Documentation Editor and here: Built-in sequencers - ModeShape 4 - Project Documentation Editor

          • 2. Re: Use sequencer for content transformation
            rvermeire

            Hello Horia,

             

            I know and understand the above. My question maybe was a little bit vague. What i really wanted to know is if it is right (best practice) to create a custom sequencer for transforming content. Or is there another extension point i can use?

             

            Thnanx.

            • 3. Re: Use sequencer for content transformation
              hchiorean

              Conceptually, ModeShape does not have the equivalent of a "content transformer". That being said, sequencers do take as an input a binary property from which they derive some output. So yes, it's probably the closest thing you can use to transform content if you want to plug

              something into the repository configuration.

               

              In general, I think you have a couple of options:

              1. perform the content transformation in your own app (outside of the repository) and simply store the transformed data into the repository as regular data

              2. implement a custom sequencer and add it to the repository configuration

               

              Both are perfectly fine IMO, with the mention that in the 2nd case you'll have to depend/use the ModeShape API (JCR does not have the "sequencer" concept)