}
}
if (properties != null) {
// Load the properties for this directory ......
addProperty(properties, factory, JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FOLDER);
SVNDirEntry entry = getEntryInfo(workspaceRoot, directoryPath);
if (entry != null) {
addProperty(properties, factory, JcrLexicon.LAST_MODIFIED, dateFactory.create(entry.getDate()));
}
}
} else {
// It's not a directory, so must be a file; the only child of an nt:file is the "jcr:content" node
// ...
if (requestedPath.endsWith(JcrLexicon.CONTENT)) {
// There are never any children of these nodes, just properties ...
if (properties != null) {
String contentPath = getPathAsString(requestedPath.getParent());
if (!accessData.getRepositoryRootUrl().equals(workspaceName)) {
contentPath = contentPath.substring(1);
}
SVNDirEntry entry = getEntryInfo(workspaceRoot, contentPath);
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"
addProperty(properties, factory, JcrLexicon.PRIMARY_TYPE, DnaLexicon.RESOURCE);
addProperty(properties, factory, JcrLexicon.LAST_MODIFIED, dateFactory.create(entry.getDate()));
}
ByteArrayOutputStream os = new ByteArrayOutputStream();
SVNProperties fileProperties = new SVNProperties();
getData(contentPath, fileProperties, os);