final RepositoryCache repositoryCache = repository.repositoryCache();
WorkspaceCache workspace = repositoryCache.getWorkspaceCache(workspaceName);
NodeKey rootKey = workspace.getRootKey();
// Now create a specific reference factories that know about the root node key ...
TextDecoder decoder = context.getDecoder();
ValueFactories factories = context.getValueFactories();
ReferenceFactory rootKeyAwareStrongRefFactory = NodeIdentifierReferenceFactory.newInstance(rootKey, decoder, factories,
false, false);
ReferenceFactory rootKeyAwareWeakRefFactory = NodeIdentifierReferenceFactory.newInstance(rootKey, decoder, factories,
true, false);