public class CCLookup
extends java.lang.Object
| Constructor and Description |
|---|
CCLookup()
Constructs a new instance with the default web services root.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getErrorMessage() |
org.jdom.Document |
getLicenseDocument() |
java.util.Collection<CCLicenseField> |
getLicenseFields(java.lang.String license,
java.lang.String language)
Queries the web service for a set of licenseFields for a particular license class.
|
java.lang.String |
getLicenseId(java.lang.String class_label)
Returns the id for a particular CCLicense label.
|
java.lang.String |
getLicenseName()
Retrieves the human readable name for the license issued.
|
java.util.Collection<CCLicense> |
getLicenses(java.lang.String language)
Queries the web service for the available licenses.
|
java.lang.String |
getLicenseUrl()
Retrieves the URI for the license issued.
|
java.lang.String |
getRdf() |
boolean |
isSuccess() |
void |
issue(java.lang.String licenseURI)
Passes a set of "answers" to the web service and retrieves a license.
|
void |
issue(java.lang.String licenseId,
java.util.Map answers,
java.lang.String lang)
Passes a set of "answers" to the web service and retrieves a license.
|
public CCLookup()
public java.lang.String getLicenseId(java.lang.String class_label)
class_label - The CCLicense label to find.CCLicensepublic java.util.Collection<CCLicense> getLicenses(java.lang.String language)
language - The language to request labels and description strings in.Map,
CCLicensepublic java.util.Collection<CCLicenseField> getLicenseFields(java.lang.String license, java.lang.String language)
license - A String specifying the CCLicense identifier to
retrieve fields for.CCLicensepublic void issue(java.lang.String licenseId,
java.util.Map answers,
java.lang.String lang)
throws java.io.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.java.io.IOExceptionCCLicense,
Mappublic void issue(java.lang.String licenseURI)
throws java.io.IOException
licenseURI - The uri of the license.
Note: does not support localization in 1.5 -- not yetjava.io.IOExceptionCCLicense,
Mappublic java.lang.String getLicenseUrl()
public java.lang.String getLicenseName()
public org.jdom.Document getLicenseDocument()
public java.lang.String getRdf()
throws java.io.IOException
java.io.IOExceptionpublic boolean isSuccess()
public java.lang.String getErrorMessage()
Copyright © 2013 DuraSpace. All Rights Reserved.