/// <summary> /// get document by path and site Name /// </summary> /// <param name="path"></param> /// <param name="siteName"></param> /// <returns></returns> public DocumentList Get(string path, string checkPublishInEvolveFilter) { DocumentList allDocuments = new DocumentList(); CMISQuery query = new CMIS.CMISQuery(); // string pathString = Utilities.CMISUtilities.AddCMISNamespaceToPath(path.ToString()); //get documents by path // DocumentList list = query.GetDocumentsByPath(pathString, onlyEvolveAvailable); List <CMISFolder> list = query.GetFoldersByPath(path, checkPublishInEvolveFilter); foreach (CMISFolder folder in list) { if (folder.ContainedDocuments == null) { continue; } if (allDocuments.DocumentPropertyMetaData == null && folder.ContainedDocuments.DocumentPropertyMetaData != null) { allDocuments.DocumentPropertyMetaData = folder.ContainedDocuments.DocumentPropertyMetaData; } if (folder.ContainedDocuments.Documents.Count != 0) { allDocuments.Documents.AddRange(folder.ContainedDocuments.Documents); } } return(allDocuments); }
/// <summary> /// get document by path and site Name /// </summary> /// <param name="path"></param> /// <param name="siteName"></param> /// <returns></returns> public List <CMISFolder> Get(string path, string checkPublishInEvolveFilter) { CMISQuery query = new CMIS.CMISQuery(); // uri to string //cmis query path // pathString = this.TranformToCMISPath(pathString); //get documents by path List <CMISFolder> list = query.GetFoldersByPath(path, checkPublishInEvolveFilter); return(list); }