SoftwareHeritageOriginsImporter implements eu.dnetlib.iis.common.java.Process { protected static SoftwareHeritageOrigin convertEntry(SoftwareHeritageOriginEntry source) { SoftwareHeritageOrigin.Builder resultBuilder = SoftwareHeritageOrigin.newBuilder(); resultBuilder.setUrl(source.getUrl()); return resultBuilder.build(); } SoftwareHeritageOriginsImporter(); @Override Map<String, PortType> getInputPorts(); @Override Map<String, PortType> getOutputPorts(); @Override void run(PortBindings portBindings, Configuration conf, Map<String, String> parameters); static final String DEFAULT_METAFILE_NAME; }
@Test public void testConvertEntry() throws Exception { SoftwareHeritageOriginEntry source = buildSoftwareHeritageOriginEntry("someUrl"); SoftwareHeritageOrigin result = SoftwareHeritageOriginsImporter.convertEntry(source); assertNotNull(result); assertEquals(source.getUrl(), result.getUrl()); }