docs: private Document cmisFolder( CmisObject cmisObject ) {
          Folder folder = (Folder)cmisObject;
          DocumentWriter writer = newDocument(ObjectId.toString(ObjectId.Type.OBJECT, folder.getId()));
  
          ObjectType objectType = cmisObject.getType();
          if (objectType.isBaseType()) {
              writer.setPrimaryType(NodeType.NT_FOLDER);
          } else {
              writer.setPrimaryType(objectType.getId());
          }
  
          writer.setParent(folder.getParentId());
          writer.addMixinType(NodeType.MIX_REFERENCEABLE);
          writer.addMixinType(NodeType.MIX_LAST_MODIFIED);
  
          cmisProperties(folder, writer);
          cmisChildren(folder, writer);
  
          writer.addMixinType("mode:accessControllable");
          writer.addChild(ObjectId.toString(ObjectId.Type.ACL, folder.getId()), "mode:acl");
          
          // append repository information to the root node
          if (folder.isRootFolder()) {
              writer.addChild(ObjectId.toString(ObjectId.Type.REPOSITORY_INFO, ""), REPOSITORY_INFO_NODE_NAME);
          }
          return writer.document();
      }