Skip to content

Commit

Permalink
added html splash page generation to dipsLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
aquast committed Feb 19, 2024
1 parent 9a3fc92 commit 962f7f9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/main/java/de/nrw/hbz/edm/impl/ConsoleImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static void main(String[] args) {
ConsoleImpl conImpl = new ConsoleImpl();
OaiPmhImpl impl = new OaiPmhImpl();
SerializeOaiPmh exOaiPmh = (SerializeOaiPmh) conImpl.generateExampleOaiPmh();
// impl.serializeXml(exOaiPmh);
impl.serializeXml(exOaiPmh);

if (args != null && args.length > 0) {
conImpl.filePath = args[0];
Expand All @@ -54,10 +54,10 @@ public static void main(String[] args) {
//impl.serializeXml(resultOaiPmh);

conImpl.filePath = System.getProperty("user.dir") + System.getProperty("file.separator") + "src/test/resources/ExampleSip/EDM.xml";
// EdmImpl edmImpl = new EdmImpl(conImpl.filePath);
EdmImpl edmImpl = new EdmImpl(conImpl.filePath);
Rdf resultEdm = EdmProvider.deserialize(new File(conImpl.filePath));
logger.debug(resultOaiPmh.getOaiMethod().getRecord().get(0).getMetadata().getRdf().getProvidedCho());
// edmImpl.serializeXml(resultEdm);
edmImpl.serializeXml(resultEdm);

ArrayList<String> isShownByReplacement = new ArrayList<>();
isShownByReplacement.add("https://www.q-terra.de/Part-1/000-0002.csv");
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/de/nrw/hbz/edm/impl/EdmProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
package de.nrw.hbz.edm.impl;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;

Expand All @@ -35,13 +33,14 @@ public class EdmProvider {

private Rdf rdf = new DeserializeRdf();
private static InputStream xmlIs = null;
private InputStream conIs = null;

/**
* Constructor takes serialized EDM as File Object
* @param file
*/
public EdmProvider(File file) {
xmlIs = loadXml(file);
conIs = loadXml(file);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/nrw/hbz/edm/impl/HtmlProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public File toTempFile() {
}

public Rdf appendHtmlAggregation(String dsUrl) {
int i = rdf.getAggregation().size();
// int i = rdf.getAggregation().size();
Aggregation aggregation = new DeserializeAggregation();
aggregation.setEdmAggregatedCHO(new DeserializeResourceAttribute("SplashPage"));
aggregation.setEdmIsShownBy(new DeserializeResourceAttribute(dsUrl));
Expand Down

0 comments on commit 962f7f9

Please sign in to comment.