-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from LibraryOfCongress/rewrite_extension
merge Rewrite extension
- Loading branch information
Showing
23 changed files
with
463 additions
and
329 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...ain/java/gov/loc/repository/bagit/hash/BagitAlgorithmNameToSupportedAlgorithmMapping.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package gov.loc.repository.bagit.hash; | ||
|
||
/** | ||
* Implement this interface if you need to be able to use other algorithms than the {@link StandardSupportedAlgorithms} | ||
*/ | ||
public interface BagitAlgorithmNameToSupportedAlgorithmMapping { | ||
public SupportedAlgorithm getMessageDigestName(String bagitAlgorithmName); | ||
} |
14 changes: 14 additions & 0 deletions
14
.../gov/loc/repository/bagit/hash/StandardBagitAlgorithmNameToSupportedAlgorithmMapping.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package gov.loc.repository.bagit.hash; | ||
|
||
/** | ||
* Provides a mapping between bagit algorithm names and {@link SupportedAlgorithm} | ||
*/ | ||
public class StandardBagitAlgorithmNameToSupportedAlgorithmMapping | ||
implements BagitAlgorithmNameToSupportedAlgorithmMapping { | ||
|
||
@Override | ||
public SupportedAlgorithm getMessageDigestName(String bagitAlgorithmName) { | ||
return StandardSupportedAlgorithms.valueOf(bagitAlgorithmName.toUpperCase()); | ||
} | ||
|
||
} |
Oops, something went wrong.