Search in sources :

Example 16 with Source

use of org.openlca.core.model.Source in project olca-modules by GreenDelta.

the class ProcessConverter method literatureReferences.

private void literatureReferences() {
    for (Source source : process.getDocumentation().getSources()) {
        String category = null;
        if (source.getCategory() != null)
            category = source.getCategory().getName();
        else
            category = "Others";
        LiteratureReferenceBlock reference = new LiteratureReferenceBlock(source.getName(), source.getTextReference(), category);
        if (!"".equals(source.getDescription()))
            reference.setContent(source.getDescription());
        referenceData.add(source.getName(), reference);
        spProcess.getDocumentation().getLiteratureReferenceEntries().add(new LiteratureReferenceRow(reference));
    }
}
Also used : LiteratureReferenceBlock(org.openlca.simapro.csv.model.refdata.LiteratureReferenceBlock) Source(org.openlca.core.model.Source) LiteratureReferenceRow(org.openlca.simapro.csv.model.process.LiteratureReferenceRow)

Example 17 with Source

use of org.openlca.core.model.Source in project olca-modules by GreenDelta.

the class DB method findSource.

public Source findSource(ISource eSource, String genKey) {
    Source source = get(Source.class, sources, genKey);
    if (source != null)
        return source;
    source = search.findSource(eSource);
    if (source != null)
        sources.put(genKey, source);
    return source;
}
Also used : ISource(org.openlca.ecospold.ISource) Source(org.openlca.core.model.Source)

Example 18 with Source

use of org.openlca.core.model.Source in project olca-modules by GreenDelta.

the class ProcessReferenceSearchTest method createSocialAspect.

private SocialAspect createSocialAspect() {
    SocialAspect aspect = new SocialAspect();
    aspect.indicator = db.insert(new SocialIndicator());
    aspect.source = db.insert(new Source());
    return aspect;
}
Also used : SocialAspect(org.openlca.core.model.SocialAspect) SocialIndicator(org.openlca.core.model.SocialIndicator) Source(org.openlca.core.model.Source)

Example 19 with Source

use of org.openlca.core.model.Source in project olca-modules by GreenDelta.

the class ProcessReferenceSearchTest method createDocumentation.

private ProcessDocumentation createDocumentation() {
    ProcessDocumentation doc = new ProcessDocumentation();
    doc.dataDocumentor = db.insert(new Actor());
    doc.dataGenerator = db.insert(new Actor());
    doc.dataSetOwner = db.insert(new Actor());
    doc.reviewer = db.insert(new Actor());
    doc.publication = db.insert(new Source());
    doc.sources.add(db.insert(new Source()));
    doc.sources.add(db.insert(new Source()));
    return doc;
}
Also used : Actor(org.openlca.core.model.Actor) ProcessDocumentation(org.openlca.core.model.ProcessDocumentation) Source(org.openlca.core.model.Source)

Example 20 with Source

use of org.openlca.core.model.Source in project olca-modules by GreenDelta.

the class DQSystemReferenceSearchTest method createModel.

@Override
protected DQSystem createModel() {
    DQSystem system = new DQSystem();
    system.source = insertAndAddExpected("source", new Source());
    system = db.insert(system);
    systems.add(system);
    return system;
}
Also used : DQSystem(org.openlca.core.model.DQSystem) Source(org.openlca.core.model.Source)

Aggregations

Source (org.openlca.core.model.Source)31 Process (org.openlca.core.model.Process)5 ProcessDocumentation (org.openlca.core.model.ProcessDocumentation)5 SourceDao (org.openlca.core.database.SourceDao)4 Actor (org.openlca.core.model.Actor)4 ISource (org.openlca.ecospold.ISource)4 DQSystem (org.openlca.core.model.DQSystem)3 Flow (org.openlca.core.model.Flow)3 FlowProperty (org.openlca.core.model.FlowProperty)3 UnitGroup (org.openlca.core.model.UnitGroup)3 File (java.io.File)2 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 Test (org.junit.Test)2 Category (org.openlca.core.model.Category)2 ImpactMethod (org.openlca.core.model.ImpactMethod)2 Location (org.openlca.core.model.Location)2 Parameter (org.openlca.core.model.Parameter)2 ProductSystem (org.openlca.core.model.ProductSystem)2 SocialAspect (org.openlca.core.model.SocialAspect)2