Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Edwin Shin committed Feb 22, 2013
1 parent 46f1ef4 commit 23fda7c
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions README.md
Expand Up @@ -9,21 +9,19 @@ An example of a fcrepo4 [Sequencer](https://docs.jboss.org/author/display/MODE/S
1. Provide a Ruby sequencer class that extends [Sequencer](http://docs.jboss.org/modeshape/3.1.2.Final/api/org/modeshape/jcr/api/sequencer/Sequencer.html) in `src/main/ruby`, e.g.:

```ruby
require 'java'

java_import 'org.modeshape.jcr.api.sequencer.Sequencer'
java_import 'org.modeshape.jcr.api.JcrTools'
java_package 'org.fcrepo.example'

class ReverseContentSequencer < Sequencer
require 'java'
java_import 'org.modeshape.jcr.api.sequencer.Sequencer'
java_import 'org.modeshape.jcr.api.JcrTools'
java_package 'org.fcrepo.example'
class ReverseContentSequencer < Sequencer
def execute property, outputNode, context

n = outputNode.addNode("reversed-content", "nt:resource")
n.setProperty("jcr:data", property.getString().reverse )

return true
n = outputNode.addNode("reversed-content", "nt:resource")
n.setProperty("jcr:data", property.getString().reverse )
return true
end
end
end
```

2. Provide a Java wrapper/proxy class for your Ruby sequencer, e.g.:
Expand Down

0 comments on commit 23fda7c

Please sign in to comment.