Package org.dspace.license
Class LicenseCleanup
java.lang.Object
org.dspace.license.LicenseCleanup
Cleanup class for CC Licenses, corrects XML formatting errors by replacing
the license_rdf bitstream.
- Author:
- mdiggory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final BitstreamServiceprotected static final BundleServiceprotected static final ItemServiceprotected static final Templates -
Method Summary
-
Field Details
-
templates
-
bitstreamService
-
bundleService
-
itemService
-
-
Method Details
-
main
- Parameters:
args- the command line arguments given- Throws:
SQLException- if database errorIOException- if IO errorAuthorizeException- if authorization error
-
handleItem
protected static void handleItem(Context context, Item item) throws SQLException, AuthorizeException, IOException Process Item, correcting CC-License if encountered.- Parameters:
context- The relevant DSpace Context.item- The item to process- Throws:
SQLException- if database errorAuthorizeException- if authorization errorIOException- if IO error
-
copy
public static byte[] copy(Context context, Bitstream b) throws IOException, SQLException, AuthorizeException Fast stream copy routine- Parameters:
context- The relevant DSpace Context.b- the Bitstream to be copied.- Returns:
- copy of the content of
b. - Throws:
IOException- if IO errorSQLException- if database errorAuthorizeException- if authorization error
-