JBoss Community Archive (Read Only)

ModeShape 5

EPUB files

This is available starting with 5.1

A sequencer which supports epub files, 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'>
<epub='http://www.modeshape.org/epub/1.0'>

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

[epub:metadata] > nt:unstructured, mix:mimeType
 + epub:identifier (epub:identifier)
 + epub:title (epub:title)
 + epub:language (epub:language)
 + epub:contributor (epub:contributor)
 + epub:creator (epub:creator)
 + epub:description (epub:description)
 + epub:publisher (epub:publisher)
 + epub:rights (epub:rights)
 + epub:date (epub:date)

[epub:property] > nt:unstructured
 - epub:value (string)
 - epub:titleType (string)
 - epub:identifierType (string)
 - epub:metadataAuthority (string)
 - epub:role (string)
 - epub:displaySeq (long)
 - epub:fileAs (string)
 - epub:groupPosition (long)
 - epub:scheme (string)
 + epub:alternateScript (epub:alternateScript)

[epub:alternateScript] > nt:unstructured
 - epub:languageCode (string)
 - epub:value (string)

[epub:identifier] > epub:property
[epub:title] > epub:property
[epub:language] > epub:property
[epub:contributor] > epub:property
[epub:creator] > epub:property
[epub:description] > epub:property
[epub:publisher] > epub:property
[epub:rights] > epub:property
[epub:date] > epub:property

You can configure it in embedded mode like so:

{
    "name" : "EPUB Format Sequencer Test Repository",
    "sequencing" : {
        "sequencers" : {
            "EPUB Format sequencer" :  {
                "classname" : "epub",
                "pathExpressions" : ["default://(*.(epub))/jcr:content[@jcr:data] => default:/sequenced/epub" ]
            }
        }
    }
}

or in JBoss AS like so:

<sequencer name="epub-sequencer" classname="epub" module="org.modeshape.sequencer.epub">
  <path-expression>/files(//*.epub[*])/jcr:content[@jcr:data] => /derived/epub/$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-23 10:45:46 UTC.