Skip to content

Commit

Permalink
Merge pull request #4 from Georgetown-University-Libraries/DS-3209A
Browse files Browse the repository at this point in the history
use additional prefixes
  • Loading branch information
terrywbrady committed Aug 15, 2016
2 parents 9065591 + f5c4fbc commit c061898
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -67,14 +67,14 @@ public boolean supports(String identifier)
{
return true;
}
// return true if base prefix matches in case of multi-instance deployment with derived prefixes demarcated by a dot "."
if(prefix.contains(".")) {
String[] splitPrefix = prefix.split("\\.");
if(splitPrefix.length > 1 && identifier.startsWith(splitPrefix[0])) {

//Check additional prefixes supported in the config file
String[] additionalPrefixes = DSpaceServicesFactory.getInstance().getConfigurationService().getArrayProperty("handle.additional.prefixes");
for(String additionalPrefix: additionalPrefixes) {
if (identifier.startsWith(additionalPrefix)) {
return true;
}
}
// otherwise, assume invalid handle
return false;
}

Expand Down

0 comments on commit c061898

Please sign in to comment.