Search in sources :

Example 1 with ActivityIndexEntry

use of spold2.ActivityIndexEntry in project olca-modules by GreenDelta.

the class MasterData method writeIndexEntry.

public static void writeIndexEntry(DataSet ds) {
    if (ds == null || ds.masterData == null)
        return;
    ActivityIndexEntry indexEntry = new ActivityIndexEntry();
    ds.masterData.activityIndexEntries.add(indexEntry);
    indexEntry.systemModelId = "8b738ea0-f89e-4627-8679-433616064e82";
    ActivityDescription d = ds.description;
    if (d == null)
        return;
    Activity activity = d.activity;
    if (activity != null) {
        indexEntry.activityNameId = activity.activityNameId;
        indexEntry.id = activity.id;
    }
    Time timePeriod = d.timePeriod;
    if (timePeriod != null) {
        indexEntry.endDate = timePeriod.end;
        indexEntry.startDate = timePeriod.start;
    }
    Geography geography = d.geography;
    if (geography != null)
        indexEntry.geographyId = geography.id;
}
Also used : Geography(spold2.Geography) ActivityIndexEntry(spold2.ActivityIndexEntry) ActivityDescription(spold2.ActivityDescription) Activity(spold2.Activity) Time(spold2.Time)

Aggregations

Activity (spold2.Activity)1 ActivityDescription (spold2.ActivityDescription)1 ActivityIndexEntry (spold2.ActivityIndexEntry)1 Geography (spold2.Geography)1 Time (spold2.Time)1