Excluded jurisdiction from CC API request. Now fetches 4.0 international...

... license. Improved iteration over keys. Also, acknowledges original work from Creative Commons.
Tim Donohue,

Sorry, for the misunderstanding. We have been reconsidering the pull request. It would be more appropriate to add additional options during item submission to select either 4.0 international license or 3.0 license with jurisdiction. The CC API for the 4.0 license is currently only international and if the answers provided to the API include a jurisdiction it fetches a license that has a jurisdiction, which currently is 3.0.

If Creative Commons has no future plans for allowing jurisdiction, than DSpace would not have much use for the configuration and the code that utilizes it.

We were under the assumption that DSpace is only concerned with ensuring the 4.0 license would be fetched. Commenting out cc.licence.jurisdiction does this, as would the pull request. Both making the jurisdiction obsolete.

Thank You,
William Welling

From: Tim Donohue [mailto:notifications@github.com]
Sent: Tuesday, December 9, 2014 9:21 AM
To: DSpace/DSpace
Cc: William Welling
Subject: Re: [DSpace] Excluded jurisdiction from CC API request. Now fetches 4.0 international... (#784)


In dspace-api/src/main/java/org/dspace/license/CCLookup.java<https://github.com/DSpace/DSpace/pull/784#discussion-diff-21534881>:

> -

> -                    while (true) {

> -                            answer_doc += "<" + current + ">" + (String)answers.get(current) + "</" + current + ">\n";

> -                            current = (String)keys.next();

> -                    }

> -

> -

> -            } catch (NoSuchElementException e) {

> -                    // exception indicates we've iterated through the

> -                    // entire collection; just swallow and continue

> -            }

> -            // answer_doc +=       "<jurisdiction></jurisidiction>\n";  FAILS with jurisdiction argument

> -            answer_doc +=                                         "</license-" + licenseId + ">\n</answers>\n";

> +            // To force CC 4.0 without these changes, comment out 'cc.license.jurisdiction = us' from dspace.cfg

> +             // CC 4.0 is currently for international license only, no jurisdictions

> +            // The following removes any jurisdictions while composing answers to submit request to CC API

This set of comments seems slightly odd to me. If we accept this PR as-is, it seems like "cc.license.jurisdiction" becomes obsolete (i.e. ignored). Or am I misunderstanding this?

If I understand correctly, it seems like there are really two possible fixes here:

  1.  Either comment out cc.license.jurisdiction = us in dspace.cfg by default, and add a comment saying "Only use this setting if you want CC 3.0 jurisdiction licenses"
  2.  OR, we accept completely remove the cc.license.jurisdiction setting, in which case we'll use CC 4.0 by default anyways.

I guess I'm just trying to understand why we should change the code to ignore the 'cc.license.jurisdiction' setting, as suggested in this PR?

—
Reply to this email directly or view it on GitHub<https://github.com/DSpace/DSpace/pull/784/files#r21534881>.