Search in sources :

Example 1 with DataEntry

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;
        }
    }
}
Also used : DataEntry(org.openlca.ilcd.processes.DataEntry) Ref(org.openlca.ilcd.commons.Ref) Date(java.util.Date)

Example 2 with DataEntry

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());
    });
}
Also used : DataEntry(org.openlca.ilcd.processes.DataEntry) Publication(org.openlca.ilcd.processes.Publication) Test(org.junit.Test)

Aggregations

DataEntry (org.openlca.ilcd.processes.DataEntry)2 Date (java.util.Date)1 Test (org.junit.Test)1 Ref (org.openlca.ilcd.commons.Ref)1 Publication (org.openlca.ilcd.processes.Publication)1