protected Workspace(Session jcrSession) throws RepositoryException { this.session = jcrSession; this.name = this.session.getWorkspace().getName(); ExecutionContext connectorContext = getExecutionContext(); NamespaceRegistry connectorRegistry = connectorContext.getNamespaceRegistry(); this.context = connectorContext.with( new JcrNamespaceRegistry(getSourceName(), this.session, connectorRegistry)); this.factories = context.getValueFactories(); this.propertyFactory = context.getPropertyFactory(); this.nameFactory = this.factories.getNameFactory(); this.stringFactory = this.factories.getStringFactory(); this.jcrValueFactory = this.session.getValueFactory(); }