JBoss Community Archive (Read Only)

ModeShape 5

MP3 files

This has been deprecated starting with 5.1 and will be removed in the next major version of ModeShape. Users are encouraged to migrate to the new Audio sequencer

Another sequencer that is included in ModeShape is the modeshape-sequencer-mp3 sequencer project. This sequencer processes MP3 audio files added to a repository and extracts the ID3 metadata for the file, including the track's title, author, album name, year, and comment. After extracting this information from the audio files, the sequencer then writes this structure into the repository, where it can be further processed, analyzed, searched, navigated, or referenced.

This sequencer generates a node with the name mp3:metadata below the sequencing target if the sequencing target is an existing node or if the sequencing target is a new node, it will use that as the root of the sequencing output.

<mp3:metadata jcr:primaryType="mp3:metadata"
              mp3:title="Livin' on a Prayer"
              mp3:author="Bon Jovi"
              mp3:album="Slippery When Wet"
              mp3:comment="Rock 'n' roll!" />

The CND used by this sequencer is provided below.

[mp3:metadata] > nt:unstructured, mix:mimeType
  - mp3:title (string)
  - mp3:author (string)
  - mp3:album (string)
  - mp3:year (long)
  - mp3:comment (string)

To use this sequencer, simply include the modeshape-sequencer-mp3 JAR and the JAudioTagger library in your application and configure the repository to use this sequencer using something similar to:

    "name" : "Mp3 Sequencers Test Repository",
    "sequencing" : {
        "removeDerivedContentWithOriginal" : true,
        "sequencers" : {
            "MP3 Sequencer" : {
                "description" : "Mp3s in the same location",
                "classname" : "mp3",
                "pathExpressions" : [ "default://(*.mp3)/jcr:content[@jcr:data]" ]
JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-11 12:12:59 UTC, last content change 2016-05-19 10:34:28 UTC.