Minor updated

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-gwt-service@86377 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2013-11-29 18:43:24 +00:00
parent 97952d1741
commit 3f3174ff10
1 changed files with 22 additions and 0 deletions

View File

@ -216,6 +216,28 @@ public class TDGWTServiceImpl extends RemoteServiceServlet implements
cData.setName(c.getName());
cData.setTypeCode(c.getColumnType().getCode());
cData.setTypeName(c.getColumnType().getName());
NamesMetadata labelsMetadata = null;
try {
labelsMetadata = c.getMetadata(NamesMetadata.class);
} catch (NoSuchMetadataException e) {
logger.debug("labelMetadata: NoSuchMetadataException "
+ e.getLocalizedMessage());
}
if (labelsMetadata == null) {
cData.setLabel("nolabel");
logger.debug("LabelsMetadata no labels");
} else {
LocalizedText cl = null;
cl = labelsMetadata.getTextWithLocale("en");
if (cl == null) {
cData.setLabel("nolabel");
logger.debug("ColumnLabel no label in en");
} else {
cData.setLabel(cl.getValue());
logger.debug("Column Set Label: "+cl.getValue());
}
}
cData.setTrId(trId);
columns.add(cData);
i++;