/// <summary> /// This method return all files in a collection. /// </summary> /// <param name="parentID">string</param> /// <returns>ContentObjectList</returns> public static ContentObjectList GetFilesInCollection(string parentID) { ContentObjectList contentObjList = new ContentObjectList(); ResourceIndexClient resIndClient = new ResourceIndexClient(); contentObjList = resIndClient.getSetChildrenObjects(parentID, false); return contentObjList; }
/// <summary> /// This method return files in an Object /// </summary> /// <param name="ObjectPID">string</param> /// <returns></returns> public ContentObjectList GetFiles(string ObjectPID) { string _parentId = ObjectPID; ResourceIndexClient ObjRIC = new ResourceIndexClient(); ContentObjectList ObjCOL = new ContentObjectList(); ObjCOL = ObjRIC.getSetChildrenObjects(_parentId,false); return ObjCOL; }
/// <summary> /// This method returns repository data in XML format. /// </summary> /// <param name="ObjectPID">string</param> /// <returns>XMLDocument</returns> public XmlDocument GetData(string ObjectPID) { string _parentId = ObjectPID; ResourceIndexClient ObjRIC = new ResourceIndexClient(); ContentObjectList ObjCOL = new ContentObjectList(); ObjCOL = ObjRIC.getSetChildrenObjects(_parentId, true); //Converting data to XML format XmlSerializer ObjXmlSerializer = new XmlSerializer(ObjCOL.GetType()); StringWriter ObjStringWriter = new StringWriter(); ObjXmlSerializer.Serialize(ObjStringWriter, ObjCOL); XmlDocument ObjXmldocument = new XmlDocument(); ObjXmldocument.LoadXml(ObjStringWriter.ToString()); return ObjXmldocument; }
public ContentObjectList ListContentObjects(String parentId) { _riClient = new ResourceIndexClient(); _contentObjList = _riClient.getSetChildrenObjects(parentId); return _contentObjList; }