Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-resources-widget@115589 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
1cf14f95ad
commit
6f1a439d4f
|
@ -928,12 +928,38 @@ public class ResourcesListViewPanel extends FramedPanel {
|
|||
|
||||
InternalURITD genericFileResourceTD = (InternalURITD) resource;
|
||||
String name = resourceTDDescriptor.getName();
|
||||
|
||||
/*
|
||||
MimeTypeSupport ext=null;
|
||||
String extentionInName=null;
|
||||
if(name!=null){
|
||||
List<String> nameS=null;
|
||||
try{
|
||||
nameS=Arrays.asList(name.split("\\.(?=[^\\.]+$)"));
|
||||
} catch(Throwable e) {
|
||||
Log.error("No valid name for resource: "+name);
|
||||
}
|
||||
|
||||
if(nameS!=null&&nameS.size()>1){
|
||||
extentionInName=nameS.get(nameS.size()-1);
|
||||
ext=MimeTypeSupport.getMimeTypeSupportFromExtension("."+extentionInName);
|
||||
|
||||
}
|
||||
}
|
||||
if(ext==null){
|
||||
|
||||
*/
|
||||
|
||||
MimeTypeSupport mts = MimeTypeSupport
|
||||
.getMimeTypeSupportFromMimeName(genericFileResourceTD
|
||||
.getMimeType());
|
||||
if (mts != null) {
|
||||
name = name + mts.getExtension();
|
||||
}
|
||||
|
||||
/*
|
||||
}
|
||||
*/
|
||||
|
||||
UriResolverSession uriResolverSession = new UriResolverSession(
|
||||
genericFileResourceTD.getId(), ApplicationType.SMP_ID,
|
||||
|
|
Loading…
Reference in New Issue