licenses are now shown in sorted order and cc-by has been chosen as the default one
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/widgets/ckan-metadata-publisher-widget@129470 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
18deeed31a
commit
ce63c31343
|
@ -1,6 +1,7 @@
|
||||||
package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui;
|
package org.gcube.portlets.widgets.ckandatapublisherwidget.client.ui;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -188,9 +189,17 @@ public class CreateDatasetForm extends Composite{
|
||||||
|
|
||||||
licenseBean = lBean;
|
licenseBean = lBean;
|
||||||
|
|
||||||
|
// sort the list
|
||||||
|
List<String> listOfNames = licenseBean.getLicenses();
|
||||||
|
Collections.sort(listOfNames);
|
||||||
|
|
||||||
|
|
||||||
// fill the listbox
|
// fill the listbox
|
||||||
for(String license: licenseBean.getLicenses()){
|
for(int i = 0; i < listOfNames.size(); i++){
|
||||||
licenseListbox.addItem(license);
|
licenseListbox.addItem(listOfNames.get(i));
|
||||||
|
if(listOfNames.get(i).equals("Creative Commons Attribution"))
|
||||||
|
licenseListbox.setItemSelected(i, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// everything went ok
|
// everything went ok
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class CKANPublisherServicesImpl extends RemoteServiceServlet implements C
|
||||||
// retrieve ckan information
|
// retrieve ckan information
|
||||||
try{
|
try{
|
||||||
String currentScope = getASLSession().getScope();
|
String currentScope = getASLSession().getScope();
|
||||||
logger.debug("Scope is " + currentScope);
|
logger.debug("Scope from asl is " + currentScope);
|
||||||
instance = new CKanUtilsImpl(currentScope);
|
instance = new CKanUtilsImpl(currentScope);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
logger.error("Unable to retrieve ckan information", e);
|
logger.error("Unable to retrieve ckan information", e);
|
||||||
|
|
Loading…
Reference in New Issue