|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.license.CCLookup
public class CCLookup
A wrapper around Creative Commons REST web services.
| Constructor Summary | |
|---|---|
CCLookup()
Constructs a new instance with the default web services root. |
|
| Method Summary | |
|---|---|
protected boolean |
contains(String token)
contains is the token in the licenses vector |
String |
getErrorMessage()
|
org.jdom.Document |
getLicenseDocument()
|
Collection<CCLicenseField> |
getLicenseFields(String license)
Queries the web service for a set of licenseFields for a particular license class. |
String |
getLicenseId(String class_label)
Returns the id for a particular CCLicense label. |
String |
getLicenseName()
Retrieves the human readable name for the license issued. |
Collection<CCLicense> |
getLicenses(String language)
Queries the web service for the available licenses. |
protected StringTokenizer |
getLicenseTokens()
getLicenseTokens |
String |
getLicenseUrl()
Retrieves the URI for the license issued. |
String |
getRdf()
|
boolean |
isSuccess()
|
void |
issue(String licenseURI)
Passes a set of "answers" to the web service and retrieves a license. |
void |
issue(String licenseId,
Map answers,
String lang)
Passes a set of "answers" to the web service and retrieves a license. |
protected void |
sort()
sort sort the licenses according to the configuration file |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CCLookup()
| Method Detail |
|---|
public String getLicenseId(String class_label)
class_label - The CCLicense label to find.
CCLicensepublic Collection<CCLicense> getLicenses(String language)
language - The language to request labels and description strings in.
Map,
CCLicenseprotected boolean contains(String token)
token -
protected void sort()
protected StringTokenizer getLicenseTokens()
public Collection<CCLicenseField> getLicenseFields(String license)
license - A String specifying the CCLicense identifier to
retrieve fields for.
CCLicense,
LicenseField
public void issue(String licenseId,
Map answers,
String lang)
throws IOException
licenseId - The identifier of the license class being requested.answers - A Map containing the answers to the license fields;
each key is the identifier of a LicenseField, with the value
containing the user-supplied answer.lang - The language to request localized elements in.
IOExceptionCCLicense,
Map
public void issue(String licenseURI)
throws IOException
licenseURI - The uri of the license.
Note: does not support localization in 1.5 -- not yet
IOExceptionCCLicense,
Mappublic String getLicenseUrl()
public String getLicenseName()
public org.jdom.Document getLicenseDocument()
public String getRdf()
throws IOException
IOExceptionpublic boolean isSuccess()
public String getErrorMessage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||