Package org.dspace.rdf.storage
Class DOIURIGenerator
- java.lang.Object
-
- org.dspace.rdf.storage.DOIURIGenerator
-
- All Implemented Interfaces:
URIGenerator
- Direct Known Subclasses:
DOIHandleURIGenerator
public class DOIURIGenerator extends Object implements URIGenerator
- Author:
- pbecker
-
-
Field Summary
Fields Modifier and Type Field Description protected DOIServicedoiServiceprotected static URIGeneratorfallback
-
Constructor Summary
Constructors Constructor Description DOIURIGenerator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgenerateIdentifier(Context context, int type, UUID id, String handle, List<String> identifiers)Generate a URI that can be used to identify the specified DSpaceObject in RDF data.StringgenerateIdentifier(Context context, DSpaceObject dso)Shortcut forgenerateIdentifier(context, dso.getType(), dso.getID(), dso.getHandle()).static voidsetFallback(URIGenerator fallback)
-
-
-
Field Detail
-
fallback
protected static URIGenerator fallback
-
doiService
@Autowired(required=true) protected DOIService doiService
-
-
Method Detail
-
setFallback
public static void setFallback(URIGenerator fallback)
-
generateIdentifier
public String generateIdentifier(Context context, int type, UUID id, String handle, List<String> identifiers) throws SQLException
Description copied from interface:URIGeneratorGenerate a URI that can be used to identify the specified DSpaceObject in RDF data. Please note that URIs can be generated for DSpaceObjects of the type SITE, COMMUNITY, COLLECTION or ITEM only. Currently dspace-rdf doesn't support Bundles or Bitstreams as independent entity. This method should work even if the DSpaceObject does not exist anymore.- Specified by:
generateIdentifierin interfaceURIGenerator- Parameters:
context- DSpace Context.type- Type of the DSpaceObject you want to generate a URI for (e.g.Constants.ITEM.id- UUID of the DSpaceObject you want to generate a URI for.handle- Handle of the DSpaceObject you want to generate a URI for.identifiers- list of identifiers- Returns:
- May return null, if no URI could be generated.
- Throws:
SQLException- An exception that provides information on a database access error or other errors.- See Also:
RDFUtil.generateIdentifier(Context, DSpaceObject)
-
generateIdentifier
public String generateIdentifier(Context context, DSpaceObject dso) throws SQLException
Description copied from interface:URIGeneratorShortcut forgenerateIdentifier(context, dso.getType(), dso.getID(), dso.getHandle()).- Specified by:
generateIdentifierin interfaceURIGenerator- Parameters:
context- The relevant DSpace Context.dso- DSpace object to generate identifier for- Returns:
- May return null, if no URI could be generated.
- Throws:
SQLException- An exception that provides information on a database access error or other errors.
-
-