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());
});
}
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);
}
Aggregations