Search in sources :

Example 1 with Publication

use of org.openlca.ilcd.processes.Publication 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)

Example 2 with Publication

use of org.openlca.ilcd.processes.Publication in project olca-modules by GreenDelta.

the class ProcessAdminInfo method createPublication.

private void createPublication() {
    Publication pub = new Publication();
    iAdminInfo.publication = pub;
    if (process.lastChange != 0)
        pub.lastRevision = Xml.calendar(process.lastChange);
    pub.version = Version.asString(process.version);
    pub.copyright = doc.copyright;
    mapDataSetOwner(pub);
    if (!Strings.nullOrEmpty(doc.restrictions)) {
        pub.accessRestrictions.add(LangString.of(doc.restrictions, config.lang));
    }
    mapPublicationSource(pub);
}
Also used : Publication(org.openlca.ilcd.processes.Publication)

Aggregations

Publication (org.openlca.ilcd.processes.Publication)2 Test (org.junit.Test)1 DataEntry (org.openlca.ilcd.processes.DataEntry)1