cancel
Showing results for 
Search instead for 
Did you mean: 

how to Read metadata of content from alfresco using c#

himvj
Champ in-the-making
Champ in-the-making
This query is returning only the file
how to read the meta data of the file
in the second for loop it not displaying the metadata.
please help… code is below         

            query.statement = "@cm\\:name:\"" + filename + "\" PATH:\"/app:company_home\"";
            QueryResult queryResult = repositoryService.query(spacesStore, query, false);
            ResultSet resultSet = queryResult.resultSet;
            ResultSetRow[] results = resultSet.rows;
            //your custom list
            IList<CustomResultVO> customResultList = new List<CustomResultVO>();
           ResultSetRowNode nodeResult;
            List<String> lista = new List<String>();
            foreach (ResultSetRow resultRow in results)
            {   nodeResult = resultRow.node;
                CustomResultVO customResultVo = new CustomResultVO();
                customResultVo.Id = nodeResult.id;
                customResultVo.Type = nodeResult.type;
                foreach (NamedValue namedValue in resultRow.columns)
                {    if (Constants.PROP_NAME.Equals(namedValue.name))
                    { customResultVo.Name = namedValue.value;  }
                    else if (Constants.PROP_DESCRIPTION.Equals(namedValue.name))
                    { customResultVo.Description = namedValue.value; }
                      customResultList.Add(customResultVo);      }
1 REPLY 1

openpj
Elite Collaborator
Elite Collaborator
Try to use the RepositoryService.get() method for each node references returned from the Lucene search.

Hope this helps.