Commit 1d2b268a authored by Gerrit Hübbers's avatar Gerrit Hübbers 🃏
Browse files

Rename package

parent 3fd59ad8
package org.gesis.dda.publishing.domain; package org.gesis.dda.publishing.domain;
import java.util.Optional;
import java.util.Set; import java.util.Set;
import java.util.stream.Stream; import java.util.stream.Stream;
public interface BundlesStreamSource { public interface BundlesStreamSource {
Stream<Bundle> getBundlesStream(); Stream<Bundle> getBundlesStream();
String getReference(); String getReference();
Set<Metadatum> getAllMetadata(String scopedIdentifier);
default Set<Metadatum> getAllMetadata(String scopedIdentifier) {
Set<Metadatum> result;
String bundleIdentifier = getReference() + "@@" + scopedIdentifier;
Optional<Bundle> bundleOptional = getBundlesStream().filter( b -> bundleIdentifier.equals( b.getReference() ) ).findFirst();
if ( bundleOptional.isPresent() ) {
result = bundleOptional.get().getMetadata();
}
else {
result = null;
}
return result;
};
} }
package org.gesis.dda.transformer; package org.gesis.dda.publishing.domain.impl;
import java.util.HashSet; import java.util.HashSet;
import java.util.Set; import java.util.Set;
...@@ -9,8 +9,6 @@ import javax.xml.bind.annotation.XmlRootElement; ...@@ -9,8 +9,6 @@ import javax.xml.bind.annotation.XmlRootElement;
import org.gesis.dda.publishing.domain.Bundle; import org.gesis.dda.publishing.domain.Bundle;
import org.gesis.dda.publishing.domain.BundlesStreamSource; import org.gesis.dda.publishing.domain.BundlesStreamSource;
import org.gesis.dda.publishing.domain.Metadatum;
import org.gesis.dda.publishing.domain.impl.XmlBundle;
@XmlRootElement(name = "bundles") @XmlRootElement(name = "bundles")
public class XmlBundles implements BundlesStreamSource { public class XmlBundles implements BundlesStreamSource {
...@@ -36,10 +34,4 @@ public class XmlBundles implements BundlesStreamSource { ...@@ -36,10 +34,4 @@ public class XmlBundles implements BundlesStreamSource {
return view.stream(); return view.stream();
} }
@Override
public Set<Metadatum> getAllMetadata(String scopedIdentifier) {
// TODO Auto-generated method stub
return null;
}
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment