Index: extensions/modeshape-connector-filesystem/src/main/java/org/modeshape/connector/filesystem/FileSystemRepository.java =================================================================== --- extensions/modeshape-connector-filesystem/src/main/java/org/modeshape/connector/filesystem/FileSystemRepository.java (revision 2415) +++ extensions/modeshape-connector-filesystem/src/main/java/org/modeshape/connector/filesystem/FileSystemRepository.java (working copy) @@ -29,7 +29,6 @@ import java.util.UUID; import org.modeshape.common.i18n.I18n; import org.modeshape.graph.ExecutionContext; import org.modeshape.graph.JcrNtLexicon; -import org.modeshape.graph.ModeShapeLexicon; import org.modeshape.graph.connector.RepositoryContext; import org.modeshape.graph.connector.base.PathNode; import org.modeshape.graph.connector.base.PathTransaction; @@ -49,7 +48,7 @@ import org.modeshape.graph.request.processor.RequestProcessor; /** * Implementation of {@code Repository} that provides access to an underlying file system. This repository only natively supports * nodes of primary types {@link JcrNtLexicon#FOLDER nt:folder}, {@link JcrNtLexicon#FILE nt:file}, and - * {@link ModeShapeLexicon#RESOURCE mode:resource}, although the {@link CustomPropertiesFactory} allows for the addition of mixin + * {@link JcrNtLexicon#RESOURCE mode:resource}, although the {@link CustomPropertiesFactory} allows for the addition of mixin * types to any and all primary types. */ public class FileSystemRepository extends Repository { Index: extensions/modeshape-connector-filesystem/src/main/java/org/modeshape/connector/filesystem/FileSystemWorkspace.java =================================================================== --- extensions/modeshape-connector-filesystem/src/main/java/org/modeshape/connector/filesystem/FileSystemWorkspace.java (revision 2415) +++ extensions/modeshape-connector-filesystem/src/main/java/org/modeshape/connector/filesystem/FileSystemWorkspace.java (working copy) @@ -463,7 +463,7 @@ class FileSystemWorkspace extends PathWorkspace { Property primaryType = properties.get(JcrLexicon.PRIMARY_TYPE); if (primaryType == null) { nodeType = JcrNtLexicon.RESOURCE; - properties.put(JcrLexicon.PRIMARY_TYPE, factory.create(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE)); + properties.put(JcrLexicon.PRIMARY_TYPE, factory.create(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE)); } else { nodeType = nameValueFor(primaryType); } Index: extensions/modeshape-connector-filesystem/src/test/java/org/modeshape/connector/filesystem/FileSystemConnectorWritableTest.java =================================================================== --- extensions/modeshape-connector-filesystem/src/test/java/org/modeshape/connector/filesystem/FileSystemConnectorWritableTest.java (revision 2415) +++ extensions/modeshape-connector-filesystem/src/test/java/org/modeshape/connector/filesystem/FileSystemConnectorWritableTest.java (working copy) @@ -38,7 +38,6 @@ import org.modeshape.common.util.StringUtil; import org.modeshape.graph.Graph; import org.modeshape.graph.JcrLexicon; import org.modeshape.graph.JcrNtLexicon; -import org.modeshape.graph.ModeShapeLexicon; import org.modeshape.graph.Graph.Batch; import org.modeshape.graph.connector.RepositorySource; import org.modeshape.graph.connector.RepositorySourceException; @@ -106,7 +105,7 @@ public class FileSystemConnectorWritableTest extends AbstractConnectorTest { public void shouldBeAbleToCreateFileWithContentAndNotRequiringOrReplace() { graph.create("/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).and(); graph.create("/testFile/jcr:content") - .with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE) + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .and(); @@ -118,7 +117,7 @@ public class FileSystemConnectorWritableTest extends AbstractConnectorTest { public void shouldBeAbleToCreateFileWithContent() { graph.create("/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFile/jcr:content") - .with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE) + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); @@ -131,13 +130,13 @@ public class FileSystemConnectorWritableTest extends AbstractConnectorTest { public void shouldRespectConflictBehaviorOnCreate() { graph.create("/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFile/jcr:content") - .with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE) + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); graph.create("/testFile/jcr:content") - .with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE) + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, "Should not overwrite".getBytes()) .ifAbsent() .and(); @@ -174,7 +173,7 @@ public class FileSystemConnectorWritableTest extends AbstractConnectorTest { graph.create("/testFolder/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFolder/testFile/jcr:content") - .with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE) + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); @@ -193,7 +192,7 @@ public class FileSystemConnectorWritableTest extends AbstractConnectorTest { public void shouldBeAbleToCopyFile() { graph.create("/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFile/jcr:content") - .with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE) + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); @@ -211,7 +210,7 @@ public class FileSystemConnectorWritableTest extends AbstractConnectorTest { graph.create("/testFolder").orReplace().and(); graph.create("/testFolder/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFolder/testFile/jcr:content") - .with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE) + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); @@ -232,7 +231,7 @@ public class FileSystemConnectorWritableTest extends AbstractConnectorTest { public void shouldBeAbleToMoveFile() { graph.create("/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFile/jcr:content") - .with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE) + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); @@ -254,7 +253,7 @@ public class FileSystemConnectorWritableTest extends AbstractConnectorTest { graph.create("/testFolder").orReplace().and(); graph.create("/testFolder/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFolder/testFile/jcr:content") - .with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE) + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); @@ -280,7 +279,7 @@ public class FileSystemConnectorWritableTest extends AbstractConnectorTest { graph.create("/testFolder").orReplace().and(); graph.create("/testFolder/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFolder/testFile/jcr:content") - .with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE) + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); @@ -302,7 +301,7 @@ public class FileSystemConnectorWritableTest extends AbstractConnectorTest { graph.create("/testFolder").orReplace().and(); graph.create("/testFolder/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFolder/testFile/jcr:content") - .with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE) + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); @@ -330,7 +329,7 @@ public class FileSystemConnectorWritableTest extends AbstractConnectorTest { graph.create("/testFolder").orReplace().and(); graph.create("/testFolder/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFolder/testFile/jcr:content") - .with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE) + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); @@ -357,7 +356,7 @@ public class FileSystemConnectorWritableTest extends AbstractConnectorTest { graph.useWorkspace("otherWorkspace"); graph.create("/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFile/jcr:content") - .with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE) + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); @@ -392,13 +391,13 @@ public class FileSystemConnectorWritableTest extends AbstractConnectorTest { graph.create("/testFolder").orReplace().and(); graph.create("/testFolder/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFolder/testFile/jcr:content") - .with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE) + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); graph.create("/testFolder/testFile2").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFolder/testFile2/jcr:content") - .with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE) + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); @@ -420,7 +419,7 @@ public class FileSystemConnectorWritableTest extends AbstractConnectorTest { graph.create("/testFolder").orReplace().and(); graph.create("/testFolder/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFolder/testFile/jcr:content") - .with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE) + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); @@ -443,7 +442,7 @@ public class FileSystemConnectorWritableTest extends AbstractConnectorTest { public void shouldBeAbleToRenameFile() { graph.create("/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFile/jcr:content") - .with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE) + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); @@ -466,7 +465,7 @@ public class FileSystemConnectorWritableTest extends AbstractConnectorTest { graph.create("/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFile/jcr:content") - .with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE) + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); @@ -479,7 +478,7 @@ public class FileSystemConnectorWritableTest extends AbstractConnectorTest { public void shouldBeAbleToCloneWorkspace() { graph.create("/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); graph.create("/testFile/jcr:content") - .with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE) + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); @@ -522,7 +521,7 @@ public class FileSystemConnectorWritableTest extends AbstractConnectorTest { batch.create("/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); batch.create("/testFile/jcr:content") - .with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE) + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) .orReplace() .and(); Index: extensions/modeshape-connector-svn/src/main/java/org/modeshape/connector/svn/SvnWorkspace.java =================================================================== --- extensions/modeshape-connector-svn/src/main/java/org/modeshape/connector/svn/SvnWorkspace.java (revision 2415) +++ extensions/modeshape-connector-svn/src/main/java/org/modeshape/connector/svn/SvnWorkspace.java (working copy) @@ -242,11 +242,7 @@ public class SvnWorkspace extends PathWorkspace { SVNDirEntry entry = workspaceRoot.info(contentPath, -1); if (entry != null) { // The request is to get properties of the "jcr:content" child node ... - // Do NOT use "nt:resource", since it extends "mix:referenceable". The JCR spec - // does not require that "jcr:content" is of type "nt:resource", but rather just - // suggests it. Therefore, we can use "dna:resource", which is identical to - // "nt:resource" except it does not extend "mix:referenceable" - properties.add(factory.create(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE)); + properties.add(factory.create(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE)); properties.add(factory.create(JcrLexicon.LAST_MODIFIED, dateFactory.create(entry.getDate()))); } Index: extensions/modeshape-connector-svn/src/test/java/org/modeshape/connector/svn/SvnRepositoryConnectorWritableTest.java =================================================================== --- extensions/modeshape-connector-svn/src/test/java/org/modeshape/connector/svn/SvnRepositoryConnectorWritableTest.java (revision 2415) +++ extensions/modeshape-connector-svn/src/test/java/org/modeshape/connector/svn/SvnRepositoryConnectorWritableTest.java (working copy) @@ -33,7 +33,6 @@ import org.modeshape.graph.Graph; import org.modeshape.graph.JcrLexicon; import org.modeshape.graph.JcrMixLexicon; import org.modeshape.graph.JcrNtLexicon; -import org.modeshape.graph.ModeShapeLexicon; import org.modeshape.graph.Graph.Batch; import org.modeshape.graph.connector.RepositorySource; import org.modeshape.graph.connector.RepositorySourceException; @@ -115,8 +114,11 @@ public class SvnRepositoryConnectorWritableTest extends AbstractConnectorTest { // LEVEL 0 graph.create("/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); - graph.create("/testFile/jcr:content").with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE).and(JcrLexicon.DATA, - TEST_CONTENT.getBytes()).orReplace().and(); + graph.create("/testFile/jcr:content") + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) + .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) + .orReplace() + .and(); kind = remoteRepos.checkPath("testFile", -1); assertThat(kind == SVNNodeKind.FILE, is(Boolean.TRUE)); fileProperties = new SVNProperties(); @@ -125,8 +127,11 @@ public class SvnRepositoryConnectorWritableTest extends AbstractConnectorTest { assertContents(baos, TEST_CONTENT); graph.create("/testFile1").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); - graph.create("/testFile1/jcr:content").with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE).and(JcrLexicon.DATA, - TEST_CONTENT.getBytes()).orReplace().and(); + graph.create("/testFile1/jcr:content") + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) + .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) + .orReplace() + .and(); kind = remoteRepos.checkPath("testFile1", -1); assertThat(kind == SVNNodeKind.FILE, is(Boolean.TRUE)); fileProperties = new SVNProperties(); @@ -136,8 +141,11 @@ public class SvnRepositoryConnectorWritableTest extends AbstractConnectorTest { // LEVEL 1 graph.create("/root/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); - graph.create("/root/testFile/jcr:content").with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE).and(JcrLexicon.DATA, - TEST_CONTENT.getBytes()).orReplace().and(); + graph.create("/root/testFile/jcr:content") + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) + .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) + .orReplace() + .and(); kind = remoteRepos.checkPath("root/testFile", -1); assertThat(kind == SVNNodeKind.FILE, is(Boolean.TRUE)); fileProperties = new SVNProperties(); @@ -147,8 +155,11 @@ public class SvnRepositoryConnectorWritableTest extends AbstractConnectorTest { // LEVEL 2 graph.create("/root/a/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); - graph.create("/root/a/testFile/jcr:content").with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE).and(JcrLexicon.DATA, - TEST_CONTENT.getBytes()).orReplace().and(); + graph.create("/root/a/testFile/jcr:content") + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) + .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) + .orReplace() + .and(); kind = remoteRepos.checkPath("root/a/testFile", -1); assertThat(kind == SVNNodeKind.FILE, is(Boolean.TRUE)); fileProperties = new SVNProperties(); @@ -160,11 +171,17 @@ public class SvnRepositoryConnectorWritableTest extends AbstractConnectorTest { @Test public void shouldRespectConflictBehaviorOnCreate() throws Exception { graph.create("/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); - graph.create("/testFile/jcr:content").with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE).and(JcrLexicon.DATA, - TEST_CONTENT.getBytes()).orReplace().and(); - - graph.create("/testFile/jcr:content").with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE).and(JcrLexicon.DATA, - "Should not overwrite".getBytes()).ifAbsent().and(); + graph.create("/testFile/jcr:content") + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) + .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) + .orReplace() + .and(); + + graph.create("/testFile/jcr:content") + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) + .and(JcrLexicon.DATA, "Should not overwrite".getBytes()) + .ifAbsent() + .and(); kind = remoteRepos.checkPath("testFile", -1); assertThat(kind == SVNNodeKind.FILE, is(Boolean.TRUE)); @@ -212,8 +229,11 @@ public class SvnRepositoryConnectorWritableTest extends AbstractConnectorTest { assertThat(kind == SVNNodeKind.DIR, is(Boolean.TRUE)); graph.create("/testFolder/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); - graph.create("/testFolder/testFile/jcr:content").with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE).and(JcrLexicon.DATA, - TEST_CONTENT.getBytes()).orReplace().and(); + graph.create("/testFolder/testFile/jcr:content") + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) + .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) + .orReplace() + .and(); kind = remoteRepos.checkPath("testFolder/testFile", -1); assertThat(kind == SVNNodeKind.FILE, is(Boolean.TRUE)); @@ -228,8 +248,11 @@ public class SvnRepositoryConnectorWritableTest extends AbstractConnectorTest { assertThat(kind == SVNNodeKind.DIR, is(Boolean.TRUE)); graph.create("/root/testFolder/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); - graph.create("/root/testFolder/testFile/jcr:content").with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE).and(JcrLexicon.DATA, - TEST_CONTENT.getBytes()).orReplace().and(); + graph.create("/root/testFolder/testFile/jcr:content") + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) + .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) + .orReplace() + .and(); kind = remoteRepos.checkPath("root/testFolder/testFile", -1); assertThat(kind == SVNNodeKind.FILE, is(Boolean.TRUE)); @@ -242,8 +265,11 @@ public class SvnRepositoryConnectorWritableTest extends AbstractConnectorTest { @Test public void shouldBeAbleToCopyFile() throws Exception { graph.create("/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); - graph.create("/testFile/jcr:content").with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE).and(JcrLexicon.DATA, - TEST_CONTENT.getBytes()).orReplace().and(); + graph.create("/testFile/jcr:content") + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) + .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) + .orReplace() + .and(); kind = remoteRepos.checkPath("testFile", -1); assertThat(kind == SVNNodeKind.FILE, is(Boolean.TRUE)); @@ -265,8 +291,11 @@ public class SvnRepositoryConnectorWritableTest extends AbstractConnectorTest { public void shouldBeAbleToCopyFolder() throws Exception { graph.create("/testFolder").orReplace().and(); graph.create("/testFolder/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); - graph.create("/testFolder/testFile/jcr:content").with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE).and(JcrLexicon.DATA, - TEST_CONTENT.getBytes()).orReplace().and(); + graph.create("/testFolder/testFile/jcr:content") + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) + .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) + .orReplace() + .and(); kind = remoteRepos.checkPath("testFolder/testFile", -1); assertThat(kind == SVNNodeKind.FILE, is(Boolean.TRUE)); @@ -287,8 +316,11 @@ public class SvnRepositoryConnectorWritableTest extends AbstractConnectorTest { @Test public void shouldBeAbleToMoveFile() throws Exception { graph.create("/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); - graph.create("/testFile/jcr:content").with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE).and(JcrLexicon.DATA, - TEST_CONTENT.getBytes()).orReplace().and(); + graph.create("/testFile/jcr:content") + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) + .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) + .orReplace() + .and(); kind = remoteRepos.checkPath("testFile", -1); assertThat(kind == SVNNodeKind.FILE, is(Boolean.TRUE)); @@ -317,8 +349,11 @@ public class SvnRepositoryConnectorWritableTest extends AbstractConnectorTest { public void shouldBeAbleToMoveFolder() throws Exception { graph.create("/testFolder").orReplace().and(); graph.create("/testFolder/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); - graph.create("/testFolder/testFile/jcr:content").with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE).and(JcrLexicon.DATA, - TEST_CONTENT.getBytes()).orReplace().and(); + graph.create("/testFolder/testFile/jcr:content") + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) + .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) + .orReplace() + .and(); kind = remoteRepos.checkPath("testFolder/testFile", -1); assertThat(kind == SVNNodeKind.FILE, is(Boolean.TRUE)); @@ -347,8 +382,11 @@ public class SvnRepositoryConnectorWritableTest extends AbstractConnectorTest { public void shouldBeAbleToDeleteFolder() throws Exception { graph.create("/testFolder").orReplace().and(); graph.create("/testFolder/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); - graph.create("/testFolder/testFile/jcr:content").with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE).and(JcrLexicon.DATA, - TEST_CONTENT.getBytes()).orReplace().and(); + graph.create("/testFolder/testFile/jcr:content") + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) + .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) + .orReplace() + .and(); kind = remoteRepos.checkPath("testFolder/testFile", -1); assertThat(kind, is(SVNNodeKind.FILE)); fileProperties = new SVNProperties(); @@ -371,8 +409,11 @@ public class SvnRepositoryConnectorWritableTest extends AbstractConnectorTest { public void shouldBeAbleToDeleteFile() throws Exception { graph.create("/testFolder").orReplace().and(); graph.create("/testFolder/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); - graph.create("/testFolder/testFile/jcr:content").with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE).and(JcrLexicon.DATA, - TEST_CONTENT.getBytes()).orReplace().and(); + graph.create("/testFolder/testFile/jcr:content") + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) + .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) + .orReplace() + .and(); kind = remoteRepos.checkPath("testFolder/testFile", -1); assertThat(kind, is(SVNNodeKind.FILE)); fileProperties = new SVNProperties(); @@ -394,8 +435,11 @@ public class SvnRepositoryConnectorWritableTest extends AbstractConnectorTest { @Test public void shouldBeAbleToClearFileByRemovingDataProperty() throws Exception { graph.create("/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); - graph.create("/testFile/jcr:content").with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE).and(JcrLexicon.DATA, - TEST_CONTENT.getBytes()).orReplace().and(); + graph.create("/testFile/jcr:content") + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) + .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) + .orReplace() + .and(); kind = remoteRepos.checkPath("testFile", -1); assertThat(kind, is(SVNNodeKind.FILE)); fileProperties = new SVNProperties(); @@ -420,8 +464,11 @@ public class SvnRepositoryConnectorWritableTest extends AbstractConnectorTest { Batch batch = graph.batch(); batch.create("/testFile").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and(); - batch.create("/testFile/jcr:content").with(JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE).and(JcrLexicon.DATA, - TEST_CONTENT.getBytes()).orReplace().and(); + batch.create("/testFile/jcr:content") + .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE) + .and(JcrLexicon.DATA, TEST_CONTENT.getBytes()) + .orReplace() + .and(); batch.create(badTestFileName).and(); try { Index: extensions/modeshape-sequencer-zip/src/main/java/org/modeshape/sequencer/zip/ZipSequencer.java =================================================================== --- extensions/modeshape-sequencer-zip/src/main/java/org/modeshape/sequencer/zip/ZipSequencer.java (revision 2415) +++ extensions/modeshape-sequencer-zip/src/main/java/org/modeshape/sequencer/zip/ZipSequencer.java (working copy) @@ -31,7 +31,6 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import org.modeshape.graph.JcrLexicon; import org.modeshape.graph.JcrNtLexicon; -import org.modeshape.graph.ModeShapeLexicon; import org.modeshape.graph.property.BinaryFactory; import org.modeshape.graph.property.DateTimeFactory; import org.modeshape.graph.property.Name; @@ -95,7 +94,7 @@ public class ZipSequencer implements StreamSequencer { output.setProperty(entryPath, JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE); Path contentPath = pathFactory.create(entryPath, JcrLexicon.CONTENT); - output.setProperty(contentPath, JcrLexicon.PRIMARY_TYPE, ModeShapeLexicon.RESOURCE); + output.setProperty(contentPath, JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE); int n; ByteArrayOutputStream baout = new ByteArrayOutputStream(); while ((n = in.read(buf, 0, 1024)) > -1) { Index: modeshape-integration-tests/src/test/java/org/modeshape/test/integration/filesystem/FileSystemRepositoryScalabilityTest.java =================================================================== --- modeshape-integration-tests/src/test/java/org/modeshape/test/integration/filesystem/FileSystemRepositoryScalabilityTest.java (revision 2415) +++ modeshape-integration-tests/src/test/java/org/modeshape/test/integration/filesystem/FileSystemRepositoryScalabilityTest.java (working copy) @@ -40,7 +40,7 @@ import org.junit.Test; import org.modeshape.common.collection.Problem; import org.modeshape.common.statistic.Stopwatch; import org.modeshape.graph.JcrLexicon; -import org.modeshape.graph.ModeShapeLexicon; +import org.modeshape.graph.JcrNtLexicon; import org.modeshape.graph.property.basic.FileSystemBinary; import org.modeshape.jcr.JcrConfiguration; import org.modeshape.jcr.JcrEngine; @@ -112,7 +112,7 @@ public class FileSystemRepositoryScalabilityTest { assertThat(node1.getPrimaryNodeType().getName(), is("nt:file")); Node node1Content = node1.getNode(stringFrom(JcrLexicon.CONTENT)); assertThat(node1Content, is(notNullValue())); - assertThat(node1Content.getPrimaryNodeType().getName(), is(stringFrom(ModeShapeLexicon.RESOURCE))); + assertThat(node1Content.getPrimaryNodeType().getName(), is(stringFrom(JcrNtLexicon.RESOURCE))); } @Test Index: modeshape-integration-tests/src/test/java/org/modeshape/test/integration/filesystem/FileSystemRepositoryTest.java =================================================================== --- modeshape-integration-tests/src/test/java/org/modeshape/test/integration/filesystem/FileSystemRepositoryTest.java (revision 2415) +++ modeshape-integration-tests/src/test/java/org/modeshape/test/integration/filesystem/FileSystemRepositoryTest.java (working copy) @@ -43,9 +43,9 @@ import org.junit.Test; import org.modeshape.common.collection.Problem; import org.modeshape.common.statistic.Stopwatch; import org.modeshape.graph.JcrLexicon; -import org.modeshape.graph.ModeShapeLexicon; import org.modeshape.jcr.JcrConfiguration; import org.modeshape.jcr.JcrEngine; +import org.modeshape.jcr.JcrNtLexicon; public class FileSystemRepositoryTest { @@ -113,7 +113,7 @@ public class FileSystemRepositoryTest { assertThat(node1.getPrimaryNodeType().getName(), is("nt:file")); Node node1Content = node1.getNode(stringFrom(JcrLexicon.CONTENT)); assertThat(node1Content, is(notNullValue())); - assertThat(node1Content.getPrimaryNodeType().getName(), is(stringFrom(ModeShapeLexicon.RESOURCE))); + assertThat(node1Content.getPrimaryNodeType().getName(), is(stringFrom(JcrNtLexicon.RESOURCE))); } @Test Index: modeshape-jcr/src/main/resources/org/modeshape/jcr/modeshape_builtins.cnd =================================================================== --- modeshape-jcr/src/main/resources/org/modeshape/jcr/modeshape_builtins.cnd (revision 2415) +++ modeshape-jcr/src/main/resources/org/modeshape/jcr/modeshape_builtins.cnd (working copy) @@ -71,8 +71,8 @@ + jcr:system (mode:system) = mode:system autocreated mandatory protected ignore + * (nt:base) = nt:unstructured sns version -// This is the same as 'nt:resource' but is not 'mix:referenceable'... -[mode:resource] > nt:base, mix:mimeType, mix:lastModified +// This is the same as 'nt:resource' (which should generally be used instead)... +[mode:resource] > nt:base, mix:mimeType, mix:lastModified - jcr:data (binary) primary mandatory [mode:share] > mix:referenceable // Used for non-original shared nodes, but never really exposed to JCR clients