Package org.dspace.license
Interface CCLicenseConnectorService
-
- All Known Implementing Classes:
CCLicenseConnectorServiceImpl
public interface CCLicenseConnectorServiceService 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
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringretrieveLicenseName(org.jdom.Document doc)Retrieve the license Name from the license documentorg.jdom.DocumentretrieveLicenseRDFDoc(String licenseURI)Retrieve the license RDF document based on the license URIMap<String,CCLicense>retrieveLicenses(String language)Retrieves the CC Licenses for the provided language from the CC License APIStringretrieveRightsByQuestion(String licenseId, String language, Map<String,String> answerMap)Retrieve the CC License URI based on the provided license id, language and answers to the field questions from the CC License API
-
-
-
Method Detail
-
retrieveLicenses
Map<String,CCLicense> retrieveLicenses(String language)
Retrieves the CC Licenses for the provided language from the CC License API- Parameters:
language- - the language to retrieve the licenses for- Returns:
- a map of licenses with the id and the license for the provided language
-
retrieveRightsByQuestion
String retrieveRightsByQuestion(String licenseId, String language, Map<String,String> answerMap)
Retrieve the CC License URI based on the provided license id, language and answers to the field questions from the CC License API- Parameters:
licenseId- - the ID of the licenselanguage- - the language for which to retrieve the full answerMapanswerMap- - the answers to the different field questions- Returns:
- the CC License URI
-
retrieveLicenseRDFDoc
org.jdom.Document retrieveLicenseRDFDoc(String licenseURI) throws IOException
Retrieve the license RDF document based on the license URI- Parameters:
licenseURI- - The license URI for which to retrieve the license RDF document- Returns:
- the license RDF document
- Throws:
IOException
-
retrieveLicenseName
String retrieveLicenseName(org.jdom.Document doc)
Retrieve the license Name from the license document- Parameters:
doc- - The license document from which to retrieve the license name- Returns:
- the license name
-
-