-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First successful cycle to processed in outbox.
- Loading branch information
1 parent
7e64de3
commit d877f2e
Showing
17 changed files
with
350 additions
and
324 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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,5 +23,4 @@ | |
public class IngestConfig { | ||
private Path inbox; | ||
private Path outbox; | ||
private Path tempDir; | ||
} |
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,54 @@ | ||
/* | ||
* Copyright (C) 2024 DANS - Data Archiving and Networked Services ([email protected]) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package nl.knaw.dans.dvingest.core; | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import lombok.Getter; | ||
import lombok.NonNull; | ||
import lombok.RequiredArgsConstructor; | ||
import nl.knaw.dans.lib.dataverse.model.dataset.Dataset; | ||
import nl.knaw.dans.lib.dataverse.model.dataset.DatasetVersion; | ||
import org.apache.commons.io.FileUtils; | ||
|
||
import java.io.IOException; | ||
import java.nio.file.Files; | ||
import java.nio.file.Path; | ||
import java.util.UUID; | ||
|
||
@Getter | ||
@RequiredArgsConstructor | ||
public class Deposit { | ||
private static final ObjectMapper MAPPER = new ObjectMapper(); | ||
@NonNull | ||
private Path location; | ||
|
||
public UUID getId() { | ||
return UUID.fromString(location.getFileName().toString()); | ||
} | ||
|
||
public String getDatasetMetadata() throws IOException { | ||
return FileUtils.readFileToString(location.resolve("dataset.json").toFile(), "UTF-8"); | ||
} | ||
|
||
public Path getFilesDir() { | ||
return location.resolve("files"); | ||
} | ||
|
||
public void moveTo(Path targetDir) throws IOException { | ||
Files.move(location, targetDir.resolve(location.getFileName())); | ||
location = targetDir.resolve(location.getFileName()); | ||
} | ||
} |
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 was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
src/main/java/nl/knaw/dans/dvingest/core/ImportTaskFactory.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.