JBoss Community Archive (Read Only)

ModeShape 5

Audio files

This is available starting with 5.1

A sequencer which supports the following list of files: audio/mpeg, audio/mp4, video/mp4, video/quicktime, audio/vorbis, audio/x-vorbis, audio/ogg, audio/flac, audio/x-flac, audio/vnd.ms-asf, audio/x-ms-wma, audio/x-ms-asf, audio/x-wav, audio/wav and audio/wave, for which it can extract the following metadata information:

//------------------------------------------------------------------------------
// N A M E S P A C E S
//------------------------------------------------------------------------------
<jcr='http://www.jcp.org/jcr/1.0'>
<nt='http://www.jcp.org/jcr/nt/1.0'>
<mix='http://www.jcp.org/jcr/mix/1.0'>
<audio='http://www.modeshape.org/audio/1.0'>


//------------------------------------------------------------------------------
// N O D E T Y P E S
//------------------------------------------------------------------------------

[audio:metadata] > nt:unstructured, mix:mimeType
  - audio:formatName (string) mandatory
    < 'mp3', 'mp4', 'ogg', 'flac', 'wma', 'real', 'wav'
  - audio:bitrate (long)
  - audio:sampleRate (long)
  - audio:channels (string)
  - audio:duration (double)
  + audio:tag (audio:tag) = audio:tag

[audio:tag] > nt:unstructured
  - audio:title (string)
  - audio:artist (string)
  - audio:album (string)
  - audio:year (string)
  - audio:comment (string)
  - audio:track (string)
  - audio:genre (string)
  + audio:artwork (audio:artwork)

[audio:artwork] > nt:unstructured, mix:mimeType
  - audio:artworkType (long)
  - jcr:data (binary)

You can configure it in embedded mode like so:

{
    "name" : "Audio file Sequencers Test Repository",
    "sequencing" : {
        "sequencers" : {
            "Audio files " : {
                "classname" : "audio",
                "pathExpression" : "default://(*.(mp3|mp4|ogg|flac|wma))/jcr:content[@jcr:data] => default:/sequenced/audio"
            }
        }
    }
}

or in JBoss AS like so:

<sequencer name="audio-sequencer" classname="audio">
   <path-expression>/files(//*.(mp4|ogg|flac|wma)[*])/jcr:content[@jcr:data] => /derived/audio/$1</path-expression>
</sequencer>
JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-11 12:12:58 UTC, last content change 2016-05-20 09:50:34 UTC.