public class CreativeCommons
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CreativeCommons.MdField
Helper class for using CC-related Metadata fields
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CC_BUNDLE_NAME
The Bundle Name
|
protected static javax.xml.transform.Templates |
templates |
| Constructor and Description |
|---|
CreativeCommons() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.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.
|
static CreativeCommons.MdField |
getCCField(java.lang.String fieldId)
Returns a metadata field handle for given field Id
|
static java.lang.String |
getLicenseRDF(Item item) |
static Bitstream |
getLicenseRdfBitstream(Item item)
Get Creative Commons license RDF, returning Bitstream object.
|
static java.lang.String |
getLicenseText(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)
|
static 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)
|
static java.lang.String |
getLicenseURL(Item item) |
static boolean |
hasLicense(Context context,
Item item) |
static boolean |
isEnabled()
Simple accessor for enabling of CC
|
static void |
removeLicense(Context context,
CreativeCommons.MdField uriField,
CreativeCommons.MdField nameField,
Item item)
Remove license information, delete also the bitstream
|
static void |
removeLicense(Context context,
Item item) |
static void |
setLicense(Context context,
Item item,
java.io.InputStream licenseStm,
java.lang.String mimeType)
Used by DSpaceMetsIngester
|
static void |
setLicenseRDF(Context context,
Item item,
java.lang.String licenseRdf)
setLicenseRDF
CC Web Service method for setting the RDF bitstream
|
public static final java.lang.String CC_BUNDLE_NAME
protected static final javax.xml.transform.Templates templates
public static boolean isEnabled()
public static void setLicenseRDF(Context context, Item item, java.lang.String licenseRdf) throws java.sql.SQLException, java.io.IOException, AuthorizeException
java.sql.SQLExceptionjava.io.IOExceptionAuthorizeExceptionpublic static void setLicense(Context context, Item item, java.io.InputStream licenseStm, java.lang.String mimeType) throws java.sql.SQLException, java.io.IOException, AuthorizeException
context - item - licenseStm - mimeType - java.sql.SQLExceptionjava.io.IOExceptionAuthorizeException - * // PATCHED 12/01 FROM JIRA re: mimetypes for CCLicense and License RDF wjbpublic static void removeLicense(Context context, Item item) throws java.sql.SQLException, java.io.IOException, AuthorizeException
java.sql.SQLExceptionjava.io.IOExceptionAuthorizeExceptionpublic static boolean hasLicense(Context context, Item item) throws java.sql.SQLException, java.io.IOException
java.sql.SQLExceptionjava.io.IOExceptionpublic static java.lang.String getLicenseRDF(Item item) throws java.sql.SQLException, java.io.IOException, AuthorizeException
java.sql.SQLExceptionjava.io.IOExceptionAuthorizeExceptionpublic static Bitstream getLicenseRdfBitstream(Item item) throws java.sql.SQLException, java.io.IOException, AuthorizeException
java.sql.SQLExceptionjava.io.IOExceptionAuthorizeException@Deprecated public static Bitstream getLicenseTextBitstream(Item item) throws java.sql.SQLException, java.io.IOException, AuthorizeException
java.sql.SQLExceptionjava.io.IOExceptionAuthorizeExceptionpublic static java.lang.String getLicenseText(Item item) throws java.sql.SQLException, java.io.IOException, AuthorizeException
item - - the itemjava.sql.SQLExceptionjava.io.IOExceptionAuthorizeExceptionpublic static java.lang.String getLicenseURL(Item item) throws java.sql.SQLException, java.io.IOException, AuthorizeException
java.sql.SQLExceptionjava.io.IOExceptionAuthorizeExceptionpublic static java.lang.String fetchLicenseRDF(org.jdom.Document license)
license - - an element that could be contains as part of your content the license rdfpublic static CreativeCommons.MdField getCCField(java.lang.String fieldId)
public static void removeLicense(Context context, CreativeCommons.MdField uriField, CreativeCommons.MdField nameField, Item item) throws AuthorizeException, java.io.IOException, java.sql.SQLException
context - - DSpace ContexturiField - - the metadata field for license urinameField - - the metadata field for license nameitem - - the itemAuthorizeExceptionjava.io.IOExceptionjava.sql.SQLExceptionCopyright © 2018 DuraSpace. All Rights Reserved.