Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into rest-demo
- Loading branch information
Showing
80 changed files
with
6,032 additions
and
778 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# LGTM Settings (https://lgtm.com/) | ||
# For reference, see https://lgtm.com/help/lgtm/lgtm.yml-configuration-file | ||
# or template at https://lgtm.com/static/downloads/lgtm.template.yml | ||
|
||
extraction: | ||
java: | ||
index: | ||
# Specify the Java version required to build the project | ||
java_version: 11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
dspace-api/src/main/java/org/dspace/license/CCLicenseConnectorService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/** | ||
* The contents of this file are subject to the license and copyright | ||
* detailed in the LICENSE and NOTICE files at the root of the source | ||
* tree and available online at | ||
* | ||
* http://www.dspace.org/license/ | ||
*/ | ||
package org.dspace.license; | ||
|
||
import java.io.IOException; | ||
import java.util.Map; | ||
|
||
import org.jdom.Document; | ||
|
||
/** | ||
* Service interface class for the Creative commons license connector service. | ||
* The implementation of this class is responsible for all the calls to the CC license API and parsing the response | ||
* The service is autowired by spring | ||
*/ | ||
public interface CCLicenseConnectorService { | ||
|
||
/** | ||
* Retrieves the CC Licenses for the provided language from the CC License API | ||
* | ||
* @param language - the language to retrieve the licenses for | ||
* @return a map of licenses with the id and the license for the provided language | ||
*/ | ||
public Map<String, CCLicense> retrieveLicenses(String language); | ||
|
||
/** | ||
* Retrieve the CC License URI based on the provided license id, language and answers to the field questions from | ||
* the CC License API | ||
* | ||
* @param licenseId - the ID of the license | ||
* @param language - the language for which to retrieve the full answerMap | ||
* @param answerMap - the answers to the different field questions | ||
* @return the CC License URI | ||
*/ | ||
public String retrieveRightsByQuestion(String licenseId, | ||
String language, | ||
Map<String, String> answerMap); | ||
|
||
/** | ||
* Retrieve the license RDF document based on the license URI | ||
* | ||
* @param licenseURI - The license URI for which to retrieve the license RDF document | ||
* @return the license RDF document | ||
* @throws IOException | ||
*/ | ||
public Document retrieveLicenseRDFDoc(String licenseURI) throws IOException; | ||
|
||
/** | ||
* Retrieve the license Name from the license document | ||
* | ||
* @param doc - The license document from which to retrieve the license name | ||
* @return the license name | ||
*/ | ||
public String retrieveLicenseName(final Document doc); | ||
|
||
} |
Oops, something went wrong.