Skip to content

Commit e8b9e53

Browse files
committed
remove lastModifiedTime temporarily until the bug in BagIt-support is fixed
1 parent 3f3b930 commit e8b9e53

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/main/java/org/dspace/pack/bagit/BagItAipWriter.java

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,6 @@ public class BagItAipWriter {
141141
*/
142142
private List<BagBitstream> bitstreams;
143143

144-
/**
145-
* Last modified time of DSpace object
146-
*/
147-
private Long lastModifiedTime;
148-
149144
/**
150145
* Constructor for a {@link BagItAipWriter}. Takes a minimal set of information needed in order to write an AIP as a
151146
* BagIt bag for dspace consumption.
@@ -161,7 +156,6 @@ public BagItAipWriter(final Context context, final File directory, final String
161156
this.logo = null;
162157
this.policies = null;
163158
this.metadata = null;
164-
this.lastModifiedTime = DEFAULT_MODIFIED_DATE;
165159
this.archFmt = checkNotNull(archFmt);
166160
this.directory = checkNotNull(directory);
167161
this.properties = checkNotNull(properties);
@@ -222,15 +216,6 @@ public BagItAipWriter withBitstreams(final List<BagBitstream> bitstreams) {
222216
return this;
223217
}
224218

225-
/**
226-
* @param lastModifiedTime the {@link Item} to use when writing AIP files
227-
* @return the {@link BagItAipWriter} used for creating the aip
228-
*/
229-
public BagItAipWriter withLastModifiedTime(final long lastModifiedTime) {
230-
this.lastModifiedTime = lastModifiedTime;
231-
return this;
232-
}
233-
234219
/**
235220
* Create a serialized BagIt bag using the parameters the BagItAipWriter was instantiated with
236221
*
@@ -372,7 +357,7 @@ public File packageAip() throws IOException, SQLException, AuthorizeException {
372357
bag.write();
373358

374359
final BagSerializer serializer = SerializationSupport.serializerFor(archFmt, profile);
375-
final Path serializedBag = serializer.serializeWithTimestamp(directory.toPath(), lastModifiedTime);
360+
final Path serializedBag = serializer.serialize(directory.toPath());
376361
delete(directory);
377362

378363
return serializedBag.toFile();

0 commit comments

Comments
 (0)