Querying selective attributes of item
I need item info structured as per attributes. However, only some attributes need to be selected. When I use IItemQuery, item info is structured as per attributes but pulls up all attributes. So, I tried the following(IDataQuery) but it does not show the data structured around attributes. Instead it shows every thing organized as <rawData>. Can some one suggest what is to be added to the following piece?
IQueryService queryService = getService(IQueryService.class);
ContributorQueryModel queryModel = BaseContributorQueryModel.ContributorQueryModel.ROOT;
IDataQuery query = IDataQuery.FACTORY.newInstance(queryModel);
query.select(queryModel.itemId(), queryModel.name());
IDataQueryPage contributorByNamePage = queryService.queryData(query, IQueryService.EMPTY_PARAMETERS, IQueryService.ITEM_QUERY_MAX_PAGE_SIZE);
return contributorByNamePage;
IQueryService queryService = getService(IQueryService.class);
ContributorQueryModel queryModel = BaseContributorQueryModel.ContributorQueryModel.ROOT;
IDataQuery query = IDataQuery.FACTORY.newInstance(queryModel);
query.select(queryModel.itemId(), queryModel.name());
IDataQueryPage contributorByNamePage = queryService.queryData(query, IQueryService.EMPTY_PARAMETERS, IQueryService.ITEM_QUERY_MAX_PAGE_SIZE);
return contributorByNamePage;