Package org.dspace.rdf.conversion
Class MetadataConverterPlugin
- java.lang.Object
-
- org.dspace.rdf.conversion.MetadataConverterPlugin
-
- All Implemented Interfaces:
ConverterPlugin
public class MetadataConverterPlugin extends Object implements ConverterPlugin
- Author:
- Pascal-Nicolas Becker (dspace -at- pascal -hyphen- becker -dot- de)
-
-
Field Summary
Fields Modifier and Type Field Description protected ConfigurationServiceconfigurationServicestatic StringMETADATA_MAPPING_PATH_KEYstatic StringMETADATA_PREFIXES_KEYstatic StringMETADATA_SCHEMA_URL_KEY
-
Constructor Summary
Constructors Constructor Description MetadataConverterPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.hp.hpl.jena.rdf.model.Modelconvert(Context context, DSpaceObject dso)Convert the specified DSpaceObject or a part of it into RDF.protected com.hp.hpl.jena.rdf.model.ModelloadConfiguration()voidsetConfigurationService(ConfigurationService configurationService)booleansupports(int type)Returns all type of DSpaceObjects that are supported by this plugin.
-
-
-
Field Detail
-
METADATA_MAPPING_PATH_KEY
public static final String METADATA_MAPPING_PATH_KEY
- See Also:
- Constant Field Values
-
METADATA_SCHEMA_URL_KEY
public static final String METADATA_SCHEMA_URL_KEY
- See Also:
- Constant Field Values
-
METADATA_PREFIXES_KEY
public static final String METADATA_PREFIXES_KEY
- See Also:
- Constant Field Values
-
configurationService
@Autowired(required=true) protected ConfigurationService configurationService
-
-
Method Detail
-
setConfigurationService
public void setConfigurationService(ConfigurationService configurationService)
- Specified by:
setConfigurationServicein interfaceConverterPlugin
-
convert
public com.hp.hpl.jena.rdf.model.Model convert(Context context, DSpaceObject dso) throws SQLException, AuthorizeException
Description copied from interface:ConverterPluginConvert the specified DSpaceObject or a part of it into RDF.- Specified by:
convertin interfaceConverterPlugin- Parameters:
context- Please check the READ permission for the provided context before converting any data!dso- The DSpaceObject that should be converted.- Returns:
- A Jena Model containing the generated RDF.
- Throws:
SQLException- An exception that provides information on a database access error or other errors.AuthorizeException- Exception indicating the current user of the context does not have permission to perform a particular action.
-
supports
public boolean supports(int type)
Description copied from interface:ConverterPluginReturns all type of DSpaceObjects that are supported by this plugin.- Specified by:
supportsin interfaceConverterPlugin- Parameters:
type- Resource type as defined in org.dspace.core.Constants.- Returns:
- A boolean whether the requested type is supported by this plugin.
- See Also:
Constants
-
loadConfiguration
protected com.hp.hpl.jena.rdf.model.Model loadConfiguration()
-
-