Skip to content

Commit

Permalink
Added two more Open Data-like licenses, and an option to not set a li…
Browse files Browse the repository at this point in the history
…cense
  • Loading branch information
egonw committed Oct 3, 2011
1 parent 4b4ee9c commit 99bad9f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Expand Up @@ -127,6 +127,9 @@ public void modifyText(ModifyEvent e) {

cboLicense.add( "Creative Commons Zero" ); // http://creativecommons.org/publicdomain/zero/1.0/
cboLicense.add( "ODC Public Domain Dedication and Licence" ); // http://www.opendatacommons.org/licenses/pddl/1-0/
cboLicense.add( "Open Database License" ); // http://opendatacommons.org/licenses/odbl/1.0/
cboLicense.add( "Open Data Commons Attribution License" ); // http://opendatacommons.org/licenses/by/1.0/
cboLicense.add( "None specified" );

cboLicense.addSelectionListener( new SelectionListener(){

Expand All @@ -139,7 +142,16 @@ public void widgetSelected( SelectionEvent e ) {
((CreateDatasetWizard)getWizard()).setLicense("http://creativecommons.org/publicdomain/zero/1.0/");
}
else if (cbo.getSelectionIndex()==1){
((CreateDatasetWizard)getWizard()).setLicense("http://www.opendatacommons.org/licenses/pddl/1-0/");
((CreateDatasetWizard)getWizard()).setLicense("http://www.opendatacommons.org/licenses/pddl/1.0/");
}
else if (cbo.getSelectionIndex()==2){
((CreateDatasetWizard)getWizard()).setLicense("http://opendatacommons.org/licenses/odbl/1.0/");
}
else if (cbo.getSelectionIndex()==3){
((CreateDatasetWizard)getWizard()).setLicense("http://opendatacommons.org/licenses/by/1.0/");
}
else if (cbo.getSelectionIndex()==4){
((CreateDatasetWizard)getWizard()).setLicense(null);
}
else{
System.out.println("license combo OUT OF BOUNDS");
Expand Down
Expand Up @@ -138,7 +138,9 @@ public void run(IProgressMonitor monitor) {

monitor.subTask("Setting license");
monitor.worked(1);
opentox.setDatasetLicense(datasetURI, license);
if (license != null) {
opentox.setDatasetLicense(datasetURI, license);
}

monitor.subTask("Opening browser");
Display.getDefault().syncExec(new Runnable() {
Expand Down

0 comments on commit 99bad9f

Please sign in to comment.