Skip to content

Commit 0fb0a8e

Browse files
committed
added Incubating annotation for showing which parts are specific to .bagit
1 parent 474d511 commit 0fb0a8e

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package gov.loc.repository.bagit.annotation;
2+
3+
import java.lang.annotation.Documented;
4+
import java.lang.annotation.Retention;
5+
import java.lang.annotation.RetentionPolicy;
6+
7+
/**
8+
* The annotation conveys following information:
9+
* <ul>
10+
* <li>The API is fairly new and we would appreciate your feedback. For example, what are you missing from the API
11+
* to solve your use case.</li>
12+
* <li>The API might change.
13+
* The chance for that is small because we care great deal for the initial design.
14+
* The incubating API might change based on the feedback from the community in order to make the API most useful for the users.
15+
* </li>
16+
* <li>
17+
* For types or methods that are not yet released it means the API is <strong>work in progress</strong>
18+
* and can change before release.
19+
* </li>
20+
* </ul>
21+
*/
22+
@Retention(RetentionPolicy.RUNTIME)
23+
@Documented
24+
public @interface Incubating {
25+
}

src/main/java/gov/loc/repository/bagit/creator/BagCreator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import org.slf4j.Logger;
1212
import org.slf4j.LoggerFactory;
1313

14+
import gov.loc.repository.bagit.annotation.Incubating;
1415
import gov.loc.repository.bagit.domain.Bag;
1516
import gov.loc.repository.bagit.domain.Manifest;
1617
import gov.loc.repository.bagit.domain.Version;
@@ -85,6 +86,7 @@ protected static void moveFilesToDataDir(File[] files, File dataDir) throws IOEx
8586
* @throws NoSuchAlgorithmException if {@link MessageDigest} can't find the algorithm
8687
* @throws IOException if there is a problem writing files or .bagit directory
8788
*/
89+
@Incubating
8890
public static Bag createDotBagit(File root, SupportedAlgorithm algorithm, boolean includeHidden) throws NoSuchAlgorithmException, IOException{
8991
Bag bag = new Bag(new Version(0, 98));
9092
bag.setRootDir(root);

0 commit comments

Comments
 (0)