Package org.dspace.pack.bagit
Class BagItRolesUtil
- java.lang.Object
-
- org.dspace.pack.bagit.BagItRolesUtil
-
public class BagItRolesUtil extends Object
Create aDSpaceRolesfor a BagIt bag UsesRoleDisseminatoras a reference for obtaining groups/epeople- Author:
- mikejritter
-
-
Constructor Summary
Constructors Constructor Description BagItRolesUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DSpaceRolesgetDSpaceRoles(org.dspace.core.Context context, org.dspace.content.Collection collection)Retrieve all roles for aCollection.static DSpaceRolesgetDSpaceRoles(org.dspace.core.Context context, org.dspace.content.Community community)Retrieve all roles for aCommunity.static DSpaceRolesgetDSpaceRoles(org.dspace.core.Context context, org.dspace.content.Site site)Retrieve all roles in a DSpace site.static voidingest(org.dspace.core.Context context, org.dspace.content.DSpaceObject dso, Path xml)Ingest an xml file and search for any DSpaceRoles.
-
-
-
Method Detail
-
getDSpaceRoles
public static DSpaceRoles getDSpaceRoles(org.dspace.core.Context context, org.dspace.content.Site site) throws SQLException, org.dspace.content.packager.PackageException
Retrieve all roles in a DSpace site. Gets allGroups andEPersons.- Parameters:
context- the context to usesite- the Site to get all roles for- Returns:
- the DSpaceRoles
- Throws:
SQLException- if there are any errors querying the databaseorg.dspace.content.packager.PackageException- if there are any errors translating group names
-
getDSpaceRoles
public static DSpaceRoles getDSpaceRoles(org.dspace.core.Context context, org.dspace.content.Community community) throws SQLException, org.dspace.content.packager.PackageException
Retrieve all roles for aCommunity. Only queries forGroups which belong to the givenCommunity.- Parameters:
context- the context to usecommunity- the community to retrieve the roles for- Returns:
- the DSpaceRoles
- Throws:
SQLException- if there is an error querying the databaseorg.dspace.content.packager.PackageException- if there is an error translating group names
-
getDSpaceRoles
public static DSpaceRoles getDSpaceRoles(org.dspace.core.Context context, org.dspace.content.Collection collection) throws SQLException, org.dspace.content.packager.PackageException
Retrieve all roles for aCollection. Only queries forGroups which belong to the givenCollection.- Parameters:
context- the context to usecollection- the collection to get the roles for- Returns:
- the DSpaceRoles
- Throws:
SQLException- if there is an error querying the databaseorg.dspace.content.packager.PackageException- if there is an error translating group names
-
ingest
public static void ingest(org.dspace.core.Context context, org.dspace.content.DSpaceObject dso, Path xml) throws IOException, SQLException, org.dspace.content.packager.PackageException, org.dspace.authorize.AuthorizeExceptionIngest an xml file and search for any DSpaceRoles. This is essentially a pass through toRoleIngester.ingestStream(org.dspace.core.Context, org.dspace.content.DSpaceObject, org.dspace.content.packager.PackageParameters, java.io.InputStream)as the DSpaceRoles schema is well defined.- Parameters:
context- the context to usedso- the DSpaceObject to ingest roles onxml- the path to the xml files containing the DSpaceRoles- Throws:
IOException- if there is an error reading the xml fileSQLException- if there is an error querying the databaseorg.dspace.content.packager.PackageException- if there is an error translating a group nameorg.dspace.authorize.AuthorizeException- if there is an authorization error
-
-