org.dspace.license
Class CreativeCommons

java.lang.Object
  extended by org.dspace.license.CreativeCommons

public class CreativeCommons
extends Object


Field Summary
static String CC_BUNDLE_NAME
          The Bundle Name
protected static Templates templates
           
 
Constructor Summary
CreativeCommons()
           
 
Method Summary
static String fetchLicenseRDF(String license_url)
           
static String fetchLicenseText(String license_url)
          Get a few license-specific properties.
static String getLicenseRDF(Item item)
           
static Bitstream getLicenseRdfBitstream(Item item)
          Get Creative Commons license RDF, returning Bitstream object.
static String getLicenseText(Item item)
           
static Bitstream getLicenseTextBitstream(Item item)
          Get Creative Commons license Text, returning Bitstream object.
static 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, Item item)
           
static void setLicense(Context context, Item item, InputStream licenseStm, String mimeType)
           
static void setLicense(Context context, Item item, String cc_license_url)
          This is a bit of the "do-the-right-thing" method for CC stuff in an item
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CC_BUNDLE_NAME

public static final String CC_BUNDLE_NAME
The Bundle Name

See Also:
Constant Field Values

templates

protected static Templates templates
Constructor Detail

CreativeCommons

public CreativeCommons()
Method Detail

isEnabled

public static boolean isEnabled()
Simple accessor for enabling of CC


setLicense

public static void setLicense(Context context,
                              Item item,
                              String cc_license_url)
                       throws SQLException,
                              IOException,
                              AuthorizeException
This is a bit of the "do-the-right-thing" method for CC stuff in an item

Throws:
SQLException
IOException
AuthorizeException

setLicense

public static void setLicense(Context context,
                              Item item,
                              InputStream licenseStm,
                              String mimeType)
                       throws SQLException,
                              IOException,
                              AuthorizeException
Throws:
SQLException
IOException
AuthorizeException

removeLicense

public static void removeLicense(Context context,
                                 Item item)
                          throws SQLException,
                                 IOException,
                                 AuthorizeException
Throws:
SQLException
IOException
AuthorizeException

hasLicense

public static boolean hasLicense(Context context,
                                 Item item)
                          throws SQLException,
                                 IOException
Throws:
SQLException
IOException

getLicenseURL

public static String getLicenseURL(Item item)
                            throws SQLException,
                                   IOException,
                                   AuthorizeException
Throws:
SQLException
IOException
AuthorizeException

getLicenseText

public static String getLicenseText(Item item)
                             throws SQLException,
                                    IOException,
                                    AuthorizeException
Throws:
SQLException
IOException
AuthorizeException

getLicenseRDF

public static String getLicenseRDF(Item item)
                            throws SQLException,
                                   IOException,
                                   AuthorizeException
Throws:
SQLException
IOException
AuthorizeException

getLicenseRdfBitstream

public static Bitstream getLicenseRdfBitstream(Item item)
                                        throws SQLException,
                                               IOException,
                                               AuthorizeException
Get Creative Commons license RDF, returning Bitstream object.

Returns:
bitstream or null.
Throws:
SQLException
IOException
AuthorizeException

getLicenseTextBitstream

public static Bitstream getLicenseTextBitstream(Item item)
                                         throws SQLException,
                                                IOException,
                                                AuthorizeException
Get Creative Commons license Text, returning Bitstream object.

Returns:
bitstream or null.
Throws:
SQLException
IOException
AuthorizeException

fetchLicenseText

public static String fetchLicenseText(String license_url)
Get a few license-specific properties. We expect these to be cached at least per server run.


fetchLicenseRDF

public static String fetchLicenseRDF(String license_url)


Copyright © 2010 DuraSpace. All Rights Reserved.