use of org.openlca.ilcd.processes.DataEntry in project olca-modules by GreenDelta.
the class ProcessAdminInfo method createDataEntry.
private void createDataEntry() {
DataEntry dataEntry = new DataEntry();
iAdminInfo.dataEntry = dataEntry;
dataEntry.timeStamp = Xml.calendar(new Date());
dataEntry.formats.add(Refs.ilcd());
if (doc.dataDocumentor != null) {
Ref ref = Export.of(doc.dataDocumentor, config);
if (ref != null) {
dataEntry.documentor = ref;
}
}
}
use of org.openlca.ilcd.processes.DataEntry in project olca-modules by GreenDelta.
the class ProcessSampleTest method testAdminInfo.
@Test
public void testAdminInfo() {
with(p -> {
Publication pub = p.adminInfo.publication;
Assert.assertNotNull(pub.lastRevision);
assertEquals("00.00", pub.version);
assertEquals(2, pub.precedingVersions.size());
assertEquals("http://www.ilcd-network.org/data/processes/sample_process.xml", pub.uri.trim());
assertEquals(PublicationStatus.WORKING_DRAFT, pub.status);
assertEquals(DataSetType.SOURCE, pub.republication.type);
assertEquals(DataSetType.CONTACT, pub.registrationAuthority.type);
assertEquals(DataSetType.CONTACT, pub.owner.type);
assertEquals(2, pub.accessRestrictions.size());
DataEntry e = p.adminInfo.dataEntry;
Assert.assertNotNull(e.timeStamp);
assertEquals(2, e.formats.size());
assertEquals(DataSetType.SOURCE, e.originalDataSet.type);
assertEquals(DataSetType.CONTACT, e.documentor.type);
assertEquals(2, e.useApprovals.size());
});
}
Aggregations