how to Read metadata of content from alfresco using c#
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2011 04:19 AM
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); }
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); }
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2011 06:00 AM
Try to use the RepositoryService.get() method for each node references returned from the Lucene search.
Hope this helps.
Hope this helps.
