public interface CreativeCommonsService
| Modifier and Type | Field and Description |
|---|---|
static String |
CC_BUNDLE_NAME |
| Modifier and Type | Method and Description |
|---|---|
String |
fetchLicenseRDF(org.jdom.Document license)
Apply same transformation on the document to retrieve only the most
relevant part of the document passed as parameter.
|
LicenseMetadataValue |
getCCField(String fieldId)
Get a few license-specific properties.
|
String |
getLicenseRDF(Context context,
Item item) |
Bitstream |
getLicenseRdfBitstream(Item item)
Get Creative Commons license RDF, returning Bitstream object.
|
Bitstream |
getLicenseTextBitstream(Item item)
Deprecated.
to make uniform JSPUI and XMLUI approach the bitstream with the license in the textual format it is no longer stored (see https://jira.duraspace.org/browse/DS-2604)
|
String |
getLicenseURL(Context context,
Item item) |
boolean |
hasLicense(Context context,
Item item) |
boolean |
isEnabled()
Simple accessor for enabling of CC
|
void |
removeLicense(Context context,
Item item) |
void |
removeLicense(Context context,
LicenseMetadataValue uriField,
LicenseMetadataValue nameField,
Item item)
Remove license information, delete also the bitstream
|
void |
setLicense(Context context,
Item item,
InputStream licenseStm,
String mimeType)
Used by DSpaceMetsIngester
|
void |
setLicenseRDF(Context context,
Item item,
String licenseRdf)
setLicenseRDF
CC Web Service method for setting the RDF bitstream
|
static final String CC_BUNDLE_NAME
boolean isEnabled()
void setLicenseRDF(Context context, Item item, String licenseRdf) throws SQLException, IOException, AuthorizeException
void setLicense(Context context, Item item, InputStream licenseStm, String mimeType) throws SQLException, IOException, AuthorizeException
context - item - licenseStm - mimeType - SQLException - if database errorIOException - if IO errorAuthorizeException - if authorization error
* // PATCHED 12/01 FROM JIRA re: mimetypes for CCLicense and License RDF wjbvoid removeLicense(Context context, Item item) throws SQLException, IOException, AuthorizeException
boolean hasLicense(Context context, Item item) throws SQLException, IOException
SQLExceptionIOExceptionString getLicenseURL(Context context, Item item) throws SQLException, IOException, AuthorizeException
String getLicenseRDF(Context context, Item item) throws SQLException, IOException, AuthorizeException
Bitstream getLicenseRdfBitstream(Item item) throws SQLException, IOException, AuthorizeException
SQLExceptionIOExceptionAuthorizeExceptionBitstream getLicenseTextBitstream(Item item) throws SQLException, IOException, AuthorizeException
SQLExceptionIOExceptionAuthorizeExceptionLicenseMetadataValue getCCField(String fieldId)
String fetchLicenseRDF(org.jdom.Document license)
license - - an element that could be contains as part of your content
the license rdfvoid removeLicense(Context context, LicenseMetadataValue uriField, LicenseMetadataValue nameField, Item item) throws AuthorizeException, IOException, SQLException
context - - DSpace ContexturiField - - the metadata field for license urinameField - - the metadata field for license nameitem - - the itemAuthorizeExceptionIOExceptionSQLExceptionCopyright © 2017 DuraSpace. All rights reserved.