public class CCLookup extends Object
| Modifier and Type | Field and Description |
|---|---|
protected CreativeCommonsService |
creativeCommonsService |
| Constructor and Description |
|---|
CCLookup()
Constructs a new instance with the default web services root.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getErrorMessage() |
org.jdom.Document |
getLicenseDocument() |
Collection<CCLicenseField> |
getLicenseFields(String license,
String language)
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.
|
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 CreativeCommonsService creativeCommonsService
public CCLookup()
public String getLicenseId(String class_label)
class_label - The CCLicense label to find.CCLicensepublic Collection<CCLicense> getLicenses(String language)
public Collection<CCLicenseField> getLicenseFields(String license, String language)
license - A String specifying the CCLicense identifier to
retrieve fields for.CCLicensepublic 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.IOException - if IO errorCCLicense,
Mappublic void issue(String licenseURI) throws IOException
licenseURI - The uri of the license.
Note: does not support localization in 1.5 -- not yetIOException - if IO errorCCLicense,
Mappublic String getLicenseUrl()
public String getLicenseName()
public org.jdom.Document getLicenseDocument()
public String getRdf() throws IOException
IOExceptionpublic boolean isSuccess()
public String getErrorMessage()
Copyright © 2022 LYRASIS. All rights reserved.