mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
RDFConfiguration: added a method to load comma separated config values.
This commit is contained in:

committed by
Pascal-Nicolas Becker

parent
be1247719b
commit
fd8626bbac
@@ -110,13 +110,7 @@ public class RDFConfiguration {
|
||||
|
||||
public static String[] getConverterPlugins()
|
||||
{
|
||||
String pluginNames = (new DSpace()).getConfigurationService().getProperty(
|
||||
CONVERTER_PLUGINS_KEY);
|
||||
if (StringUtils.isEmpty(pluginNames))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return pluginNames.split(",\\s*");
|
||||
return RDFConfiguration.loadConfigurationArray(CONVERTER_PLUGINS_KEY);
|
||||
}
|
||||
|
||||
public static String[] getDSOTypesToConvert()
|
||||
@@ -237,6 +231,24 @@ public class RDFConfiguration {
|
||||
return storage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load a comma separated value out of the configuration an split it into a
|
||||
* string array.
|
||||
* @param key Key of the configuration value.
|
||||
* @return Null if the configuration value was not found or empty. A String
|
||||
* array representing the configuration value splitted on commas.
|
||||
*/
|
||||
public static String[] loadConfigurationArray(String key)
|
||||
{
|
||||
String value = (new DSpace()).getConfigurationService().getProperty(key);
|
||||
if (StringUtils.isEmpty(value))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
return value.split(",\\s*");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This method must by static, so we can use it from
|
||||
* RDFizer.generateIdentifier and RDFizer.generateGraphName. Cause this
|
||||
|
Reference in New Issue
Block a user