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
context - The relevant DSpace Context.item - The item to set license on.licenseRdf - license RDF stringIOException - A general class of exceptions produced by failed or interrupted I/O operations.SQLException - An exception that provides information on a database access error or other errors.AuthorizeException - Exception indicating the current user of the context does not have permission
to perform a particular action.void setLicense(Context context, Item item, InputStream licenseStm, String mimeType) throws SQLException, IOException, AuthorizeException
context - The relevant DSpace Context.item - The item to set license on.licenseStm - InputStream with the license text.mimeType - License text file MIME type ("text/xml", "text/rdf" or generic)SQLException - if database error
An exception that provides information on a database access error or other errors.IOException - if IO error
A general class of exceptions produced by failed or interrupted I/O operations.AuthorizeException - if authorization error
Exception indicating the current user of the context does not have permission
to perform a particular action.
* // 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
item - bitstream's parent itemIOException - A general class of exceptions produced by failed or interrupted I/O operations.SQLException - An exception that provides information on a database access error or other errors.AuthorizeException - Exception indicating the current user of the context does not have permission
to perform a particular action.Bitstream getLicenseTextBitstream(Item item) throws SQLException, IOException, AuthorizeException
item - bitstream's parent itemIOException - A general class of exceptions produced by failed or interrupted I/O operations.SQLException - An exception that provides information on a database access error or other errors.AuthorizeException - Exception indicating the current user of the context does not have permission
to perform a particular action.LicenseMetadataValue getCCField(String fieldId)
fieldId - name of the property.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 itemAuthorizeException - Exception indicating the current user of the context does not have permission
to perform a particular action.IOException - A general class of exceptions produced by failed or interrupted I/O operations.SQLException - An exception that provides information on a database access error or other errors.Copyright © 2019 DuraSpace. All rights reserved.