Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Removed the demos (more are available in the examples repository) and…

… logos and presentations (which are available in ModeShape's Asset repository on GitHub).
  • Loading branch information...
commit ed2d57cd9d72c911bea60a9761e07ac448a74f2d 1 parent d0b3e9f
Randall Hauch authored October 04, 2012

Showing 41 changed files with 0 additions and 935 deletions. Show diff stats Hide diff stats

  1. 58  demos/embedded-repo/pom.xml
  2. 1  demos/embedded-repo/src/main/config/run.cmd
  3. 3  demos/embedded-repo/src/main/config/run.sh
  4. 74  demos/embedded-repo/src/main/java/org/modeshape/demo/embedded/repo/EmbeddedRepositoryDemo.java
  5. 11  demos/embedded-repo/src/main/resources/log4j.properties
  6. 14  demos/embedded-repo/src/main/resources/my-repository-config.json
  7. 37  demos/embedded-repo/src/test/java/org/modeshape/demo/embedded/repo/EmbeddedRepositoryDemoTest.java
  8. 21  demos/pom.xml
  9. 101  demos/sequencers/pom.xml
  10. 1  demos/sequencers/src/main/config/run.cmd
  11. 3  demos/sequencers/src/main/config/run.sh
  12. 142  demos/sequencers/src/main/java/org/modeshape/demo/sequencer/SequencerDemo.java
  13. BIN  demos/sequencers/src/main/resources/JcrRepository.clazz
  14. BIN  demos/sequencers/src/main/resources/caution.gif
  15. BIN  demos/sequencers/src/main/resources/caution.jpg
  16. BIN  demos/sequencers/src/main/resources/caution.pict
  17. BIN  demos/sequencers/src/main/resources/caution.png
  18. 2  demos/sequencers/src/main/resources/fixedWidthFile.txt
  19. 17  demos/sequencers/src/main/resources/logback.xml
  20. 40  demos/sequencers/src/main/resources/my-repository.json
  21. BIN  demos/sequencers/src/main/resources/sample1.mp3
  22. 24  demos/sequencers/src/main/resources/security/jaas.conf.xml
  23. 2  demos/sequencers/src/main/resources/security/roles.properties
  24. 2  demos/sequencers/src/main/resources/security/users.properties
  25. 342  demos/sequencers/src/main/resources/sequencing.cnd
  26. 2  demos/sequencers/src/main/resources/test.csv
  27. BIN  demos/sequencers/src/main/resources/test.jar
  28. 37  demos/sequencers/src/test/java/org/modeshape/demo/sequencer/SequencerDemoTest.java
  29. BIN  docs/logo/modeshape_icon_16px.ico
  30. BIN  docs/logo/modeshape_icon_16px.png
  31. BIN  docs/logo/modeshape_icon_32px.png
  32. BIN  docs/logo/modeshape_icon_64px.png
  33. BIN  docs/logo/modeshape_logo_100px.png
  34. BIN  docs/logo/modeshape_logo_200px.png
  35. BIN  docs/logo/modeshape_logo_450px.png
  36. BIN  docs/logo/modeshape_logo_600px.png
  37. BIN  docs/presentations/2010-09-21 Overview of ModeShape.pdf
  38. BIN  docs/presentations/JBUGM_JBoss_DNA_02_05_2009.pdf
  39. BIN  docs/presentations/JBoss DNA 2008-10.keynote.zip
  40. BIN  docs/presentations/JBoss DNA 2008-10.pdf
  41. 1  pom.xml
58  demos/embedded-repo/pom.xml
... ...
@@ -1,58 +0,0 @@
1  
-<?xml version="1.0"?>
2  
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3  
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4  
-    <parent>
5  
-        <groupId>org.modeshape</groupId>
6  
-        <artifactId>modeshape-parent</artifactId>
7  
-        <version>3.0-SNAPSHOT</version>
8  
-        <relativePath>../../modeshape-parent</relativePath>
9  
-    </parent>
10  
-
11  
-    <modelVersion>4.0.0</modelVersion>
12  
-    <groupId>org.modeshape.demo</groupId>
13  
-    <artifactId>modeshape-embedded-repo-demo</artifactId>
14  
-    <packaging>jar</packaging>
15  
-    <name>ModeShape Demo of Embedding Repository</name>
16  
-    <description>A simple demo application that creates an embedded ModeShape engine.</description>
17  
-
18  
-    <dependencies>
19  
-        <dependency>
20  
-            <groupId>javax.jcr</groupId>
21  
-            <artifactId>jcr</artifactId>
22  
-        </dependency>
23  
-        <dependency>
24  
-            <groupId>org.modeshape</groupId>
25  
-            <artifactId>modeshape-jcr</artifactId>
26  
-        </dependency>
27  
-        <!-- PicketBox (JAAS implementation, configured optionally) -->
28  
-        <dependency>
29  
-            <groupId>org.picketbox</groupId>
30  
-            <artifactId>picketbox-bare</artifactId>
31  
-            <scope>compile</scope>
32  
-        </dependency>
33  
-        <!-- Testing (note the scope) -->
34  
-        <dependency>
35  
-            <groupId>junit</groupId>
36  
-            <artifactId>junit</artifactId>
37  
-        </dependency>
38  
-    </dependencies>
39  
-
40  
-    <profiles>
41  
-        <profile>
42  
-            <id>assembly</id>
43  
-            <build>
44  
-                <plugins>
45  
-                    <plugin>
46  
-                        <artifactId>maven-assembly-plugin</artifactId>
47  
-                        <configuration>
48  
-                            <descriptorRefs>
49  
-                                <descriptorRef>example-with-dependencies</descriptorRef>
50  
-                            </descriptorRefs>
51  
-                        </configuration>
52  
-                    </plugin>
53  
-                </plugins>
54  
-            </build>
55  
-        </profile>
56  
-    </profiles>
57  
-
58  
-</project>
1  demos/embedded-repo/src/main/config/run.cmd
... ...
@@ -1 +0,0 @@
1  
-java -Djava.ext.dirs=./lib -cp modeshape-embedded-repo-demo-${project.version}.jar org.modeshape.demo.embedded.repo.EmbeddedRepositoryDemo
3  demos/embedded-repo/src/main/config/run.sh
... ...
@@ -1,3 +0,0 @@
1  
-#!/bin/sh
2  
-
3  
-java -Djava.ext.dirs=`pwd`/lib -cp modeshape-embedded-repo-demo-${project.version}.jar org.modeshape.demo.embedded.repo.EmbeddedRepositoryDemo
74  demos/embedded-repo/src/main/java/org/modeshape/demo/embedded/repo/EmbeddedRepositoryDemo.java
... ...
@@ -1,74 +0,0 @@
1  
-package org.modeshape.demo.embedded.repo;
2  
-
3  
-import java.net.URL;
4  
-import javax.jcr.Node;
5  
-import javax.jcr.Repository;
6  
-import javax.jcr.RepositoryException;
7  
-import javax.jcr.Session;
8  
-import org.modeshape.common.collection.Problems;
9  
-import org.modeshape.jcr.ModeShapeEngine;
10  
-import org.modeshape.jcr.RepositoryConfiguration;
11  
-
12  
-public class EmbeddedRepositoryDemo {
13  
-
14  
-    public static void main( String[] argv ) {
15  
-
16  
-        // Create and start the engine ...
17  
-        ModeShapeEngine engine = new ModeShapeEngine();
18  
-        engine.start();
19  
-
20  
-        // Load the configuration for a repository via the classloader (can also use path to a file)...
21  
-        Repository repository = null;
22  
-        String repositoryName = null;
23  
-        try {
24  
-            URL url = EmbeddedRepositoryDemo.class.getClassLoader().getResource("my-repository-config.json");
25  
-            RepositoryConfiguration config = RepositoryConfiguration.read(url);
26  
-
27  
-            // We could change the name of the repository programmatically ...
28  
-            // config = config.withName("Some Other Repository");
29  
-
30  
-            // Verify the configuration for the repository ...
31  
-            Problems problems = config.validate();
32  
-            if (problems.hasErrors()) {
33  
-                System.err.println("Problems starting the engine.");
34  
-                System.err.println(problems);
35  
-                System.exit(-1);
36  
-            }
37  
-
38  
-            // Deploy the repository ...
39  
-            repository = engine.deploy(config);
40  
-            repositoryName = config.getName();
41  
-        } catch (Throwable e) {
42  
-            e.printStackTrace();
43  
-            System.exit(-1);
44  
-            return;
45  
-        }
46  
-
47  
-        Session session = null;
48  
-        try {
49  
-            // Get the repository
50  
-            repository = engine.getRepository(repositoryName);
51  
-
52  
-            // Create a session ...
53  
-            session = repository.login("default");
54  
-
55  
-            // Get the root node ...
56  
-            Node root = session.getRootNode();
57  
-            assert root != null;
58  
-
59  
-            System.out.println("Found the root node in the \"" + session.getWorkspace().getName() + "\" workspace");
60  
-        } catch (RepositoryException e) {
61  
-            e.printStackTrace();
62  
-        } finally {
63  
-            if (session != null) session.logout();
64  
-            System.out.println("Shutting down engine ...");
65  
-            try {
66  
-                engine.shutdown().get();
67  
-                System.out.println("Success!");
68  
-            } catch (Exception e) {
69  
-                e.printStackTrace();
70  
-            }
71  
-        }
72  
-
73  
-    }
74  
-}
11  demos/embedded-repo/src/main/resources/log4j.properties
... ...
@@ -1,11 +0,0 @@
1  
-# Direct log messages to stdout
2  
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
3  
-log4j.appender.stdout.Target=System.out
4  
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
5  
-log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %m%n
6  
-
7  
-# Root logger option
8  
-log4j.rootLogger=INFO, stdout
9  
-
10  
-# Set up the default logging to be INFO level, then override specific units
11  
-log4j.logger.org.modeshape=INFO
14  demos/embedded-repo/src/main/resources/my-repository-config.json
... ...
@@ -1,14 +0,0 @@
1  
-{
2  
-    "name" : "My Repository",
3  
-    "workspaces" : {
4  
-        "predefined" : ["otherWorkspace"],
5  
-        "default" : "default",
6  
-        "allowCreation" : true
7  
-    },
8  
-    "security" : {
9  
-        "anonymous" : {
10  
-            "roles" : ["readonly","readwrite","admin"],
11  
-            "useOnFailedLogin" : false
12  
-        }
13  
-    }
14  
-}
37  demos/embedded-repo/src/test/java/org/modeshape/demo/embedded/repo/EmbeddedRepositoryDemoTest.java
... ...
@@ -1,37 +0,0 @@
1  
-/*
2  
- * ModeShape (http://www.modeshape.org)
3  
- * See the COPYRIGHT.txt file distributed with this work for information
4  
- * regarding copyright ownership.  Some portions may be licensed
5  
- * to Red Hat, Inc. under one or more contributor license agreements.
6  
- * See the AUTHORS.txt file in the distribution for a full listing of 
7  
- * individual contributors.
8  
- *
9  
- * ModeShape is free software. Unless otherwise indicated, all code in ModeShape
10  
- * is licensed to you under the terms of the GNU Lesser General Public License as
11  
- * published by the Free Software Foundation; either version 2.1 of
12  
- * the License, or (at your option) any later version.
13  
- * 
14  
- * ModeShape is distributed in the hope that it will be useful,
15  
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  
- * Lesser General Public License for more details.
18  
- *
19  
- * You should have received a copy of the GNU Lesser General Public
20  
- * License along with this software; if not, write to the Free
21  
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22  
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
23  
- */
24  
-
25  
-package org.modeshape.demo.embedded.repo;
26  
-
27  
-import org.junit.Test;
28  
-import org.modeshape.demo.embedded.repo.EmbeddedRepositoryDemo;
29  
-
30  
-public class EmbeddedRepositoryDemoTest {
31  
-	
32  
-    @Test
33  
-    public void shouldRunApplication() throws Exception {
34  
-        String[] argv = new String[]{};
35  
-        EmbeddedRepositoryDemo.main(argv);
36  
-    }
37  
-}
21  demos/pom.xml
... ...
@@ -1,21 +0,0 @@
1  
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2  
-  <modelVersion>4.0.0</modelVersion>
3  
-  <parent>
4  
-    <groupId>org.modeshape</groupId>
5  
-    <artifactId>modeshape-parent</artifactId>
6  
-    <version>3.0-SNAPSHOT</version>
7  
-    <relativePath>../modeshape-parent</relativePath>
8  
-  </parent>
9  
-
10  
-  <groupId>org.modeshape.demo</groupId>
11  
-  <artifactId>demos</artifactId>
12  
-  <packaging>pom</packaging>
13  
-
14  
-  <name>ModeShape Demos</name>
15  
-  <description>Builds the ModeShape demos</description>
16  
-
17  
-  <modules>
18  
-    <module>sequencers</module>
19  
-    <module>embedded-repo</module>
20  
-  </modules>
21  
-</project>
101  demos/sequencers/pom.xml
... ...
@@ -1,101 +0,0 @@
1  
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2  
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3  
-
4  
-    <parent>
5  
-        <groupId>org.modeshape</groupId>
6  
-        <artifactId>modeshape-parent</artifactId>
7  
-        <version>3.0-SNAPSHOT</version>
8  
-        <relativePath>../../modeshape-parent/pom.xml</relativePath>
9  
-    </parent>
10  
-
11  
-    <modelVersion>4.0.0</modelVersion>
12  
-    <groupId>org.modeshape.demo</groupId>
13  
-    <artifactId>modeshape-sequencers-demo</artifactId>
14  
-    <packaging>jar</packaging>
15  
-    <name>ModeShape Demo of Sequencing Files</name>
16  
-    <description>Examples that showcase how to use sequencers with a JCR repository.</description>
17  
-
18  
-    <dependencies>
19  
-        <dependency>
20  
-            <groupId>org.modeshape</groupId>
21  
-            <artifactId>modeshape-common</artifactId>
22  
-        </dependency>
23  
-        <dependency>
24  
-            <groupId>org.modeshape</groupId>
25  
-            <artifactId>modeshape-jcr</artifactId>
26  
-        </dependency>
27  
-        <dependency>
28  
-            <groupId>org.modeshape</groupId>
29  
-            <artifactId>modeshape-sequencer-java</artifactId>
30  
-        </dependency>
31  
-        <dependency>
32  
-            <groupId>org.modeshape</groupId>
33  
-            <artifactId>modeshape-sequencer-images</artifactId>
34  
-        </dependency>
35  
-        <dependency>
36  
-            <groupId>org.modeshape</groupId>
37  
-            <artifactId>modeshape-sequencer-mp3</artifactId>
38  
-        </dependency>
39  
-        <dependency>
40  
-            <groupId>org.modeshape</groupId>
41  
-            <artifactId>modeshape-sequencer-text</artifactId>
42  
-        </dependency>
43  
-        <!--dependency>
44  
-          <groupId>org.modeshape</groupId>
45  
-          <artifactId>modeshape-sequencer-zip</artifactId>
46  
-        </dependency-->
47  
-        <!--
48  
-        Logging (require SLF4J API for compiling, but use Logback binding for running)
49  
-        -->
50  
-        <dependency>
51  
-            <groupId>org.slf4j</groupId>
52  
-            <artifactId>slf4j-api</artifactId>
53  
-            <scope>runtime</scope>
54  
-        </dependency>
55  
-        <dependency>
56  
-            <groupId>ch.qos.logback</groupId>
57  
-            <artifactId>logback-classic</artifactId>
58  
-            <scope>runtime</scope>
59  
-        </dependency>
60  
-        <!--
61  
-          Java Content Repository API
62  
-        -->
63  
-        <dependency>
64  
-            <groupId>javax.jcr</groupId>
65  
-            <artifactId>jcr</artifactId>
66  
-        </dependency>
67  
-        <!--
68  
-          PicketBox (JAAS implementation used in test cases)
69  
-        -->
70  
-        <dependency>
71  
-            <groupId>org.picketbox</groupId>
72  
-            <artifactId>picketbox-bare</artifactId>
73  
-            <scope>compile</scope>
74  
-        </dependency>
75  
-        <!--
76  
-          Test cases use JUnit
77  
-        -->
78  
-        <dependency>
79  
-            <groupId>junit</groupId>
80  
-            <artifactId>junit</artifactId>
81  
-        </dependency>
82  
-    </dependencies>
83  
-
84  
-    <profiles>
85  
-        <profile>
86  
-            <id>assembly</id>
87  
-            <build>
88  
-                <plugins>
89  
-                    <plugin>
90  
-                        <artifactId>maven-assembly-plugin</artifactId>
91  
-                        <configuration>
92  
-                            <descriptorRefs>
93  
-                                <descriptorRef>example-with-dependencies</descriptorRef>
94  
-                            </descriptorRefs>
95  
-                        </configuration>
96  
-                    </plugin>
97  
-                </plugins>
98  
-            </build>
99  
-        </profile>
100  
-    </profiles>
101  
-</project>
1  demos/sequencers/src/main/config/run.cmd
... ...
@@ -1 +0,0 @@
1  
-java -Dlogback.configurationFile=logback.xml -Djava.ext.dirs=./lib -cp modeshape-demo-sequencers-${project.version}.jar org.modeshape.demo.sequencer.SequencerDemo %*
3  demos/sequencers/src/main/config/run.sh
... ...
@@ -1,3 +0,0 @@
1  
-#!/bin/sh
2  
-
3  
-java -Dlogback.configurationFile=logback.xml -Djava.ext.dirs=`pwd`/lib -cp .:modeshape-demo-sequencers-${project.version}.jar org.modeshape.demo.sequencer.SequencerDemo $1
142  demos/sequencers/src/main/java/org/modeshape/demo/sequencer/SequencerDemo.java
... ...
@@ -1,142 +0,0 @@
1  
-package org.modeshape.demo.sequencer;
2  
-
3  
-import java.io.File;
4  
-import java.io.FileInputStream;
5  
-import java.io.FileNotFoundException;
6  
-import java.io.IOException;
7  
-import java.io.InputStream;
8  
-import java.net.URL;
9  
-import java.util.concurrent.TimeUnit;
10  
-import javax.jcr.Node;
11  
-import javax.jcr.PathNotFoundException;
12  
-import javax.jcr.Repository;
13  
-import javax.jcr.RepositoryException;
14  
-import javax.jcr.Session;
15  
-import org.modeshape.common.collection.Problems;
16  
-import org.modeshape.jcr.ModeShapeEngine;
17  
-import org.modeshape.jcr.RepositoryConfiguration;
18  
-import org.modeshape.jcr.api.JcrTools;
19  
-
20  
-public class SequencerDemo {
21  
-
22  
-    protected static boolean print = true;
23  
-
24  
-    public static void main( String[] argv ) {
25  
-
26  
-        // Create and start the engine ...
27  
-        ModeShapeEngine engine = new ModeShapeEngine();
28  
-        engine.start();
29  
-
30  
-        // Load the configuration for a repository via the classloader (can also use path to a file)...
31  
-        Repository repository = null;
32  
-        String repositoryName = null;
33  
-        try {
34  
-            URL url = SequencerDemo.class.getClassLoader().getResource("my-repository.json");
35  
-            RepositoryConfiguration config = RepositoryConfiguration.read(url);
36  
-
37  
-            // Verify the configuration for the repository ...
38  
-            Problems problems = config.validate();
39  
-            if (problems.hasErrors()) {
40  
-                System.err.println("Problems starting the engine.");
41  
-                System.err.println(problems);
42  
-                System.exit(-1);
43  
-            }
44  
-
45  
-            // Deploy the repository ...
46  
-            repository = engine.deploy(config);
47  
-            repositoryName = config.getName();
48  
-        } catch (Throwable e) {
49  
-            e.printStackTrace();
50  
-            System.exit(-1);
51  
-            return;
52  
-        }
53  
-
54  
-        Session session = null;
55  
-        JcrTools tools = new JcrTools();
56  
-        try {
57  
-            // Get the repository
58  
-            repository = engine.getRepository(repositoryName);
59  
-
60  
-            // Create a session ...
61  
-            session = repository.login("default");
62  
-
63  
-            // Create the '/files' node that is an 'nt:folder' ...
64  
-            Node root = session.getRootNode();
65  
-            Node filesNode = root.addNode("files", "nt:folder");
66  
-            assert filesNode != null;
67  
-
68  
-            // Update a couple of files ...
69  
-            tools.uploadFile(session, "/files/caution.png", getFile("caution.png"));
70  
-            tools.uploadFile(session, "/files/sample1.mp3", getFile("sample1.mp3"));
71  
-            tools.uploadFile(session, "/files/fixedWidthFile.txt", getFile("fixedWidthFile.txt"));
72  
-            tools.uploadFile(session, "/files/JcrRepository.class", getFile("JcrRepository.clazz"));
73  
-
74  
-            // Save the session ...
75  
-            session.save();
76  
-
77  
-            // Now look for the output. Note that sequencing may take a bit, so we'll cheat by just trying
78  
-            // to find the node until we can find it, waiting a maximum amount of time before failing.
79  
-            // The proper way is to either use events or not to expect the sequencers have finished.
80  
-            Node png = findNodeAndWait(session, "/images/caution.png", 10, TimeUnit.SECONDS);
81  
-            if (print) tools.printSubgraph(png);
82  
-
83  
-            Node sampleMp3 = findNodeAndWait(session, "/audio/sample1.mp3", 10, TimeUnit.SECONDS);
84  
-            if (print) tools.printSubgraph(sampleMp3);
85  
-
86  
-            Node javaClass = findNodeAndWait(session, "/java/JcrRepository.class", 10, TimeUnit.SECONDS);
87  
-            if (print) tools.printSubgraph(javaClass);
88  
-
89  
-            Node textFile = findNodeAndWait(session, "/text/fixedWidthFile.txt", 10, TimeUnit.SECONDS);
90  
-            if (print) tools.printSubgraph(textFile);
91  
-
92  
-        } catch (IOException e) {
93  
-            e.printStackTrace();
94  
-        } catch (RepositoryException e) {
95  
-            e.printStackTrace();
96  
-        } catch (InterruptedException e) {
97  
-            e.printStackTrace();
98  
-        } finally {
99  
-            if (session != null) session.logout();
100  
-            System.out.println("Shutting down engine ...");
101  
-            try {
102  
-                engine.shutdown().get();
103  
-                System.out.println("Success!");
104  
-            } catch (Exception e) {
105  
-                e.printStackTrace();
106  
-            }
107  
-        }
108  
-    }
109  
-
110  
-    public static InputStream getFile( String path ) {
111  
-        // First try to read from the file system ...
112  
-        File file = new File(path);
113  
-        if (file.exists() && file.canRead()) {
114  
-            try {
115  
-                return new FileInputStream(file);
116  
-            } catch (FileNotFoundException e) {
117  
-                // continue
118  
-            }
119  
-        }
120  
-        // If not found, try to read from the classpath ...
121  
-        return SequencerDemo.class.getClassLoader().getResourceAsStream(path);
122  
-    }
123  
-
124  
-    public static Node findNodeAndWait( Session session,
125  
-                                        String path,
126  
-                                        long maxWaitTime,
127  
-                                        TimeUnit unit ) throws RepositoryException, InterruptedException {
128  
-        long start = System.currentTimeMillis();
129  
-        long maxWaitInMillis = TimeUnit.MILLISECONDS.convert(maxWaitTime, unit);
130  
-
131  
-        do {
132  
-            try {
133  
-                // This method either returns a non-null Node reference, or throws an exception ...
134  
-                return session.getNode(path);
135  
-            } catch (PathNotFoundException e) {
136  
-                // The node wasn't there yet, so try again ...
137  
-            }
138  
-            Thread.sleep(100L);
139  
-        } while ((System.currentTimeMillis() - start) <= maxWaitInMillis);
140  
-        throw new PathNotFoundException("Failed to find node '" + path + "' even after waiting " + maxWaitTime + " " + unit);
141  
-    }
142  
-}
BIN  demos/sequencers/src/main/resources/JcrRepository.clazz
Binary file not shown
BIN  demos/sequencers/src/main/resources/caution.gif
BIN  demos/sequencers/src/main/resources/caution.jpg
BIN  demos/sequencers/src/main/resources/caution.pict
Binary file not shown
BIN  demos/sequencers/src/main/resources/caution.png
2  demos/sequencers/src/main/resources/fixedWidthFile.txt
... ...
@@ -1,2 +0,0 @@
1  
-00000000001111111111222222222233333333334444444444
2  
-This is a flat file that will be parsed into cols.
17  demos/sequencers/src/main/resources/logback.xml
... ...
@@ -1,17 +0,0 @@
1  
-<?xml version="1.0" encoding="UTF-8"?>
2  
-<configuration>
3  
-  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
4  
-    <!-- encoders are assigned the type
5  
-         ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
6  
-    <encoder>
7  
-      <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
8  
-    </encoder>
9  
-  </appender>
10  
-
11  
-  <root level="INFO">
12  
-    <appender-ref ref="STDOUT" />
13  
-  </root>
14  
-  <!-- Set up the default logging to be INFO level, then override specific units -->
15  
-  <logger name="org.modeshape" level="INFO" />
16  
-  <logger name="org.modeshape.demo" level="INFO" />
17  
-</configuration>
40  demos/sequencers/src/main/resources/my-repository.json
... ...
@@ -1,40 +0,0 @@
1  
-{
2  
-    "name":"My Sequencing Example Repository",
3  
-    "sequencing":{
4  
-        "removeDerivedContentWithOriginal":true,
5  
-        "sequencers":{
6  
-            "mp3s":{
7  
-                "name":"MP3s",
8  
-                "classname":"mp3",
9  
-                "pathExpressions":[ "//(*.mp3)/jcr:content[@jcr:data] => /audio" ]
10  
-            },
11  
-            "images":{
12  
-                "name":"Images",
13  
-                "classname":"image",
14  
-                "pathExpressions":[ "//(*.(gif|png|pict|jpg))/jcr:content[@jcr:data] => /images" ]
15  
-            },
16  
-            "fixed_text_files":{
17  
-                "name":"Fixed width text sequencer",
18  
-                "classname":"org.modeshape.sequencer.text.FixedWidthTextSequencer",
19  
-                "pathExpressions":[ "//(*.txt)/jcr:content[@jcr:data] => /text" ],
20  
-                "columnStartPositions":[3, 6],
21  
-                "commentMarker":"#"
22  
-            },
23  
-            "delimited_text_files":{
24  
-                "classname":"delimitedtext",
25  
-                "pathExpressions":[ "//(*.csv)/jcr:content[@jcr:data] => /text" ],
26  
-                "commentMarker":"#"
27  
-            },
28  
-            "java_classes":{
29  
-                "name":"Java Classes",
30  
-                "classname":"class",
31  
-                "pathExpressions":[ "//(*.class)/jcr:content[@jcr:data] => /java" ]
32  
-            },
33  
-            "java_sources":{
34  
-                "name":"Java Source",
35  
-                "classname":"java",
36  
-                "pathExpressions":[ "//(*.java)/jcr:content[@jcr:data] => /java" ]
37  
-            }
38  
-        }
39  
-    }
40  
-}
BIN  demos/sequencers/src/main/resources/sample1.mp3
Binary file not shown
24  demos/sequencers/src/main/resources/security/jaas.conf.xml
... ...
@@ -1,24 +0,0 @@
1  
-<?xml version='1.0'?>
2  
-
3  
-<policy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4  
-	xsi:schemaLocation="urn:jboss:security-config:5.0" xmlns="urn:jboss:security-config:5.0"
5  
-	xmlns:jbxb="urn:jboss:security-config:5.0">
6  
-	<application-policy name="modeshape-jcr">
7  
-		<authentication>
8  
-			<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required">
9  
-                <module-option name="usersProperties">security/users.properties</module-option>
10  
-                <module-option name="rolesProperties">security/roles.properties</module-option>
11  
-				<module-option name="name">1.1</module-option>
12  
-				<module-option name="succeed">true</module-option>
13  
-				<module-option name="throwEx">false</module-option>
14  
-			</login-module>
15  
-		</authentication>
16  
-<!-- 		
17  
-		<authorization>
18  
-			<policy-module code="org.jboss.security.idtrust.impl.plugins.authorization.IDTrustAuthorizationModule">
19  
-				<module-option name="roles">validuser</module-option>
20  
-			</policy-module>
21  
-		</authorization>
22  
--->		
23  
-	</application-policy>
24  
-</policy>
2  demos/sequencers/src/main/resources/security/roles.properties
... ...
@@ -1,2 +0,0 @@
1  
-#<userName>=[readonly[.<workspaceName>] | readwrite[.<workspaceName>]][, [readonly[.<workspaceName>] | readwrite[.<workspaceName>]]]*
2  
-jsmith=readwrite
2  demos/sequencers/src/main/resources/security/users.properties
... ...
@@ -1,2 +0,0 @@
1  
-# <username>=<password>
2  
-jsmith=secret
342  demos/sequencers/src/main/resources/sequencing.cnd
... ...
@@ -1,342 +0,0 @@
1  
-<jcr='http://www.jcp.org/jcr/1.0'>
2  
-<nt='http://www.jcp.org/jcr/nt/1.0'>
3  
-<mix='http://www.jcp.org/jcr/mix/1.0'>
4  
-<image='http://www.modeshape.org/images/1.0'>
5  
-<mp3='http://www.modeshape.org/mp3/1.0'>
6  
-<java='http://www.modeshape.org/java/1.0'>
7  
-<zip='http://www.modeshape.org/zip/1.0'>
8  
-<class='http://www.modeshape.org/sequencer/javaclass/1.0'>
9  
-
10  
-// -------------------
11  
-// ModeShape Image Sequencer
12  
-// -------------------
13  
-
14  
-/**
15  
- * Node type that defines the metadata for an image
16  
- */
17  
-[image:metadata] > nt:unstructured, mix:mimeType
18  
-  - image:formatName (string) mandatory
19  
-    < 'JPEG', 'GIF', 'PNG', 'BMP', 'PCX', 'IFF', 'RAS', 'PBM', 'PGM', 'PPM', 'PSD'
20  
-  - image:width (long)
21  
-  - image:height (long)
22  
-  - image:bitsPerPixel (long)
23  
-  - image:progressive (boolean)
24  
-  - image:numberOfImages (long)
25  
-  - image:physicalWidthDpi (long)
26  
-  - image:physicalHeightDpi (long)
27  
-  - image:physicalWidthInches (long)
28  
-  - image:physicalHeightInches (long)
29  
-
30  
-// -------------------
31  
-// ModeShape MP3 Sequencer
32  
-// -------------------
33  
-
34  
-/**
35  
- * Node type that defines the metadata for an MP3 audio file
36  
- */
37  
-[mp3:metadata] > nt:unstructured, mix:mimeType
38  
-  - mp3:title (string)
39  
-  - mp3:author (string)
40  
-  - mp3:album (string)
41  
-  - mp3:year (long)
42  
-  - mp3:comment (string)
43  
-
44  
-// -------------------
45  
-// ModeShape Java Sequencer
46  
-// -------------------
47  
-
48  
-//------------------------------------------------------------------------------
49  
-// N O D E T Y P E S
50  
-//------------------------------------------------------------------------------
51  
-
52  
-/**
53  
- * Element-value
54  
- */
55  
-[java:elementValue] > nt:unstructured
56  
- + java:kindOfvalues (java:conditionalExpression, java:annotationDeclaration, java:elementValueArrayInitializer) mandatory
57  
- 
58  
-/**
59  
- * Modifiers
60  
- */
61  
-[java:modifierDeclaration] > nt:unstructured
62  
- - java:modifierName (string) mandatory
63  
-
64  
-/**
65  
- * Expression element-value type
66  
- */
67  
-[java:conditionalExpression] > nt:unstructured
68  
- - java:expression (string)
69  
-
70  
-/**
71  
- * Array initializer element-value type
72  
- */
73  
-[java:elementValueArrayInitializer] > nt:unstructured
74  
- + java:elementValue (java:elementValue) = java:elementValue multiple
75  
-
76  
-/**
77  
- * Identifier
78  
- */
79  
-[java:identifier] > nt:unstructured
80  
- - java:identifierName (String) mandatory
81  
- + java:value (java:elementValue) = java:elementValue mandatory
82  
- 
83  
-/**
84  
- * Element-value pair
85  
- */
86  
-[java:elementValuePair] > nt:unstructured
87  
- + java:identifier (java:identifier) mandatory
88  
-
89  
-/**
90  
- * Annotation type
91  
- */
92  
-[java:annotationDeclaration] > nt:unstructured
93  
- + java:annotationType (java:normalAnnotation, java:markerAnnotation,  java:singleElementAnnotation) mandatory
94  
-  
95  
-/**
96  
- * Normal annotation e.g. @Entity(name="Customer")
97  
- */
98  
-[java:normalAnnotation] > nt:unstructured
99  
- - java:normalAnnotationName (string) mandatory
100  
- + java:elementValuePair (java:elementValuePair)
101  
-
102  
-/**
103  
- * Marker annotation e.g. @GET
104  
- */
105  
-[java:markerAnnotation] > nt:unstructured
106  
- - java:markerAnnotationName (string) mandatory
107  
-
108  
-/**
109  
- * Single element annotation  e.g. @Path("/book")
110  
- */
111  
-[java:singleElementAnnotation] > nt:unstructured
112  
- - java:singleElementAnnotationName (string) mandatory
113  
- + java:value (java:elementValue) = java:elementValue mandatory
114  
-
115  
-/** 
116  
- * Formal parameter
117  
- */
118  
-[java:formalParameter] > nt:unstructured
119  
- + java:type (java:primitiveType, java:arrayType, java:simpleType, java:qualifiedType, java:wildcardType, java:parameterizedType)
120  
-
121  
-/**
122  
- * Primitive type:
123  
- * - Integral type ('byte', 'short', 'int', 'long', 'char')
124  
- * - Floating point type ('float', 'double')
125  
- * - Boolean type ('boolean')
126  
- * - No return type ('void')
127  
- */
128  
-[java:primitiveType] > nt:unstructured
129  
- - java:primitiveTypeDescription (string)
130  
- + java:modifier (java:modifierDeclaration) = java:modifierDeclaration
131  
- - java:primitiveTypeName (string) mandatory
132  
- + java:primitiveVariable (java:variable) = java:variable
133  
- 
134  
- [java:variable] > nt:unstructured
135  
- - java:variableName (string) mandatory
136  
- 
137  
-/** 
138  
- * java:arrayType 
139  
- */ 
140  
-[java:arrayType] > nt:unstructured
141  
- - java:arrayTypeDescription (string)
142  
- + java:arrayTypeModifier (java:modifierDeclaration) = java:modifierDeclaration
143  
- - java:arrayTypeName (string) mandatory
144  
- + java:arrayTypeVariable (java:variable) = java:variable
145  
- 
146  
-[java:simpleType] > nt:unstructured
147  
- - java:simpleTypeDescription (string)
148  
- + java:simpleTypeModifier (java:modifierDeclaration) = java:modifierDeclaration
149  
- - java:simpleTypeName (string) mandatory
150  
- + java:simpleTypeVariable (java:variable) = java:variable
151  
-
152  
-[java:qualifiedType] > nt:unstructured
153  
- - java:qualifiedTypeDescription (string)
154  
- + java:qualifiedTypeModifier (java:modifierDeclaration) = java:modifierDeclaration
155  
- - java:qualifiedTypeName (string) mandatory
156  
- + java:qualifiedTypeVariable (java:variable) = java:variable
157  
-    
158  
-[java:wildcardType] > nt:unstructured
159  
- - java:wildcardTypeDescription (string)
160  
- + java:wildcardTypeModifier (java:modifierDeclaration) = java:modifierDeclaration
161  
- - java:wildcardTypeName (string) mandatory
162  
- + java:wildcardTypeVariable (java:variable) = java:variable
163  
-
164  
-[java:parameterizedType] > nt:unstructured
165  
- - java:parameterizedTypeDescription (string)
166  
- + java:parameterizedTypeModifier (java:modifierDeclaration) = java:modifierDeclaration
167  
- - java:parameterizedTypeName (string) mandatory
168  
- + java:parameterizedTypeVariable (java:variable) = java:variable
169  
-
170  
-/** 
171  
- * Field type 
172  
- */
173  
-[java:fieldType] > nt:unstructured
174  
- + java:type (java:primitiveType, java:arrayType, java:simpleType, java:qualifiedType, java:wildcardType, java:parameterizedType) mandatory multiple 
175  
- 
176  
- /** 
177  
-  * Method declaration 
178  
-  */
179  
-[java:methodDeclaration] > nt:unstructured
180  
- - java:methodDescription (string)
181  
- + java:modifier (java:modifierDeclaration) = java:modifierDeclaration
182  
- + java:resultType (java:primitiveType, java:arrayType, java:simpleType, java:qualifiedType, java:wildcardType, java:parameterizedType) mandatory
183  
- - java:methodName (string) mandatory
184  
- + java:parameter (java:formalParameter) multiple
185  
-
186  
-/** 
187  
- * Constructor declarations 
188  
- */
189  
-[java:constructorDeclaration] > nt:unstructured
190  
- - java:constructorDescription (string)
191  
- + java:modifier (java:modifierDeclaration) = java:modifierDeclaration
192  
- - java:constructorName (string) mandatory
193  
- + java:parameter (java:formalParameter)
194  
-
195  
-
196  
-/**
197  
- * Package declarations
198  
- */
199  
-[java:packageDeclaration] > nt:unstructured
200  
- + java:annotation (java:annotationDeclaration) = java:annotationDeclaration
201  
- - java:packageKeyword (string)
202  
-   < 'package' 
203  
- - java:packageName (string) mandatory 
204  
-
205  
-/**
206  
- * Import declarations
207  
- */
208  
-[java:singleTypeImportDeclaration] > nt:unstructured
209  
- - java:singleTypeImportkeyword (string) mandatory
210  
-  < 'import'
211  
- - java:singleImportName (string) mandatory
212  
- 
213  
-[java:typeImportOnDemandDeclaration] > nt:unstructured
214  
- - java:onDemandImportKeyword (string) mandatory
215  
-  < 'import'
216  
- - java:onDemandImportName (string) mandatory
217  
-
218  
- [java:importDeclaration] > nt:unstructured
219  
- + java:singleImport (java:singleTypeImportDeclaration) = java:singleTypeImportDeclaration
220  
- + java:importOnDemand (java:typeImportOnDemandDeclaration) = java:typeImportOnDemandDeclaration
221  
- 
222  
-
223  
-/**
224  
- * Class declaration
225  
- *
226  
- * The body of class declares members (fields and methods and nested classes and interfaces), 
227  
- * instance and static initializers, and constructors
228  
- */
229  
-[java:normalClassDeclaration] > nt:unstructured
230  
- - java:description (string)
231  
- + java:modifier (java:modifierDeclaration) = java:modifierDeclaration
232  
- - java:normalClassName (string) mandatory
233  
- + java:field (java:fieldType)  = java:fieldType multiple
234  
- + java:method (java:methodDeclaration) = java:methodDeclaration multiple
235  
- + java:constructor (java:constructorDeclaration) = java:constructorDeclaration multiple
236  
- 
237  
-[java:enumDeclaration] > nt:unstructured // TODO
238  
- 
239  
-[java:classDeclaration] > nt:unstructured
240  
- + java:normalClass (java:normalClassDeclaration) = java:normalClassDeclaration
241  
- + java:enum (java:enumDeclaration) = java:enumDeclaration
242  
-
243  
-/**
244  
- * Interface declaration 
245  
- *
246  
- * The body of class declares members (fields and methods and nested classes and interfaces), 
247  
- * instance and static initializers, and constructors
248  
- */
249  
-[java:interfaceDeclaration] > nt:unstructured
250  
- 
251  
- 
252  
-/**
253  
- * Compilation unit
254  
- */
255  
-[java:compilationUnit] > nt:unstructured
256  
- + java:package (java:packageDeclaration) = java:packageDeclaration
257  
- + java:import (java:importDeclaration) = java:importDeclaration
258  
- + java:unitType (java:classDeclaration, java:interfaceDeclaration)
259  
- 
260  
-
261  
-// -------------------
262  
-// ModeShape Zip Sequencer
263  
-// -------------------
264  
-
265  
-[zip:file] > nt:folder, mix:mimeType
266  
-
267  
-/* Deprecated */
268  
-[zip:content] > nt:unstructured, mix:mimeType
269  
-  + * (nt:folder)
270  
-  + * (nt:file)
271  
-
272  
-// -------------------
273  
-// ModeShape Java Class Sequencer
274  
-// -------------------
275  
- 
276  
-[class:annotationMember]
277  
-- class:name (string) mandatory
278  
-- class:value (string) 
279  
-
280  
-[class:annotation]
281  
-- class:name (string) mandatory
282  
-+ * (class:annotationMember) = class:annotationMember
283  
-
284  
-[class:annotations]
285  
-+ * (class:annotation) = class:annotation
286  
-
287  
-[class:field]
288  
-- class:name (string) mandatory 
289  
-- class:typeClassName (string) mandatory 
290  
-- class:visibility (string) mandatory < 'public', 'protected', 'package', 'private'
291  
-- class:static (boolean) mandatory
292  
-- class:final (boolean) mandatory
293  
-- class:transient (boolean) mandatory
294  
-- class:volatile (boolean) mandatory
295  
-+ class:annotations (class:annotations) = class:annotations
296  
-
297  
-[class:fields]
298  
-+ * (class:field) = class:field
299  
-
300  
-[class:interfaces]
301  
-- * (string)
302  
-
303  
-[class:parameters]
304  
-- * (string)
305  
-
306  
-[class:method]
307  
-- class:name (string) mandatory 
308  
-- class:returnTypeClassName (string) mandatory 
309  
-- class:visibility (string) mandatory < 'public', 'protected', 'package', 'private'
310  
-- class:static (boolean) mandatory
311  
-- class:final (boolean) mandatory
312  
-- class:abstract (boolean) mandatory
313  
-- class:strictFp (boolean) mandatory
314  
-- class:native (boolean) mandatory
315  
-- class:synchronized (boolean) mandatory
316  
-- class:parameters (string) multiple
317  
-+ class:annotations (class:annotations) = class:annotations
318  
-
319  
-[class:methods]
320  
-+ * (class:method) = class:method
321  
-
322  
-[class:constructors]
323  
-+ * (class:method) = class:method
324  
-
325  
-[class:class]
326  
-- class:name (string) mandatory 
327  
-- class:sequencedDate (date) 
328  
-- class:superClassName (string) 
329  
-- class:visibility (string) mandatory < 'public', 'protected', 'package', 'private'
330  
-- class:abstract (boolean) mandatory
331  
-- class:interface (boolean) mandatory
332  
-- class:final (boolean) mandatory
333  
-- class:strictFp (boolean) mandatory
334  
-- class:interfaces (string) multiple
335  
-+ class:annotations (class:annotations) = class:annotations
336  
-+ class:constructors (class:constructors) = class:constructors
337  
-+ class:methods (class:methods) = class:methods
338  
-+ class:fields (class:fields) = class:fields
339  
-
340  
-[class:enum] > class:class
341  
-- class:enumValues (string) mandatory multiple
342  
- 
2  demos/sequencers/src/main/resources/test.csv
... ...
@@ -1,2 +0,0 @@
1  
-This,is,a,comma-delimited,file
2  
-It,has,two,rows,whee!
BIN  demos/sequencers/src/main/resources/test.jar
Binary file not shown
37  demos/sequencers/src/test/java/org/modeshape/demo/sequencer/SequencerDemoTest.java
... ...
@@ -1,37 +0,0 @@
1  
-/*
2  
- * ModeShape (http://www.modeshape.org)
3  
- * See the COPYRIGHT.txt file distributed with this work for information
4  
- * regarding copyright ownership.  Some portions may be licensed
5  
- * to Red Hat, Inc. under one or more contributor license agreements.
6  
- * See the AUTHORS.txt file in the distribution for a full listing of 
7  
- * individual contributors.
8  
- *
9  
- * ModeShape is free software. Unless otherwise indicated, all code in ModeShape
10  
- * is licensed to you under the terms of the GNU Lesser General Public License as
11  
- * published by the Free Software Foundation; either version 2.1 of
12  
- * the License, or (at your option) any later version.
13  
- * 
14  
- * ModeShape is distributed in the hope that it will be useful,
15  
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  
- * Lesser General Public License for more details.
18  
- *
19  
- * You should have received a copy of the GNU Lesser General Public
20  
- * License along with this software; if not, write to the Free
21  
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
22  
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
23  
- */
24  
-
25  
-package org.modeshape.demo.sequencer;
26  
-
27  
-import org.junit.Test;
28  
-
29  
-public class SequencerDemoTest {
30  
-
31  
-    @Test
32  
-    public void shouldRunApplication() throws Exception {
33  
-        String[] argv = new String[] {};
34  
-        SequencerDemo.print = false;
35  
-        SequencerDemo.main(argv);
36  
-    }
37  
-}
BIN  docs/logo/modeshape_icon_16px.ico
Binary file not shown
BIN  docs/logo/modeshape_icon_16px.png
BIN  docs/logo/modeshape_icon_32px.png
BIN  docs/logo/modeshape_icon_64px.png
BIN  docs/logo/modeshape_logo_100px.png
BIN  docs/logo/modeshape_logo_200px.png
BIN  docs/logo/modeshape_logo_450px.png
BIN  docs/logo/modeshape_logo_600px.png
BIN  docs/presentations/2010-09-21 Overview of ModeShape.pdf
Binary file not shown
BIN  docs/presentations/JBUGM_JBoss_DNA_02_05_2009.pdf
Binary file not shown
BIN  docs/presentations/JBoss DNA 2008-10.keynote.zip
Binary file not shown
BIN  docs/presentations/JBoss DNA 2008-10.pdf
Binary file not shown
1  pom.xml
@@ -98,7 +98,6 @@
98 98
         <profile>
99 99
             <id>assembly</id>
100 100
             <modules>
101  
-                <module>demos</module>
102 101
                 <module>modeshape-distribution</module>
103 102
                 <module>integration</module>
104 103
             </modules>

0 notes on commit ed2d57c

Please sign in to comment.
Something went wrong with that request. Please try again.