Skip to content

Commit eef989c

Browse files
committed
deprecate: announce deprecation of unsafe addFromCollection method
We still use it internally, but I plan to replace it at some point in future. We should be able to generate at least basically valid entities from external providers. And if not we can still work around this with a custom, private subclass of RoCrate.
1 parent dc4f477 commit eef989c

File tree

1 file changed

+9
-0
lines changed
  • src/main/java/edu/kit/datamanager/ro_crate

1 file changed

+9
-0
lines changed

src/main/java/edu/kit/datamanager/ro_crate/Crate.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,15 @@ public interface Crate {
151151

152152
void setUntrackedFiles(Collection<File> files);
153153

154+
/**
155+
* Unsafely adds a collection of entities to the crate.
156+
* <p>
157+
* WARNING: This method does not perform any checks and may lead to an inconsistent crate state.
158+
*
159+
* @param entities the collection of entities to add
160+
* @deprecated use individual add methods to ensure crate consistency. If you really need an unchecked method, consider creating a subclass or contact us at our issue tracker so we can discuss replacements before removal.
161+
*/
162+
@Deprecated(forRemoval = true)
154163
void addFromCollection(Collection<? extends AbstractEntity> entities);
155164

156165
void addItemFromDataCite(String locationUrl);

0 commit comments

Comments
 (0)