Search in sources :

Example 1 with EnhancedTimelineEvent

use of com.tyndalehouse.step.core.models.EnhancedTimelineEvent in project step by STEPBible.

the class TimelineServiceImpl method getTimelineEvent.

@Override
public EnhancedTimelineEvent getTimelineEvent(final String id, final String version) {
    final EntityDoc[] results = this.timelineEvents.searchExactTermBySingleField("id", 1, id);
    if (results.length == 0) {
        return null;
    }
    final EnhancedTimelineEvent ete = new EnhancedTimelineEvent(results[0]);
    final String references = ete.getEvent().get("storedReferences");
    final String[] refs = StringUtils.split(references);
    for (final String r : refs) {
    // final OsisWrapper osisText = this.jsword.peakOsisText(version, KEYED_REFERENCE_VERSION, r);
    // ete.add(osisText);
    }
    return ete;
}
Also used : EnhancedTimelineEvent(com.tyndalehouse.step.core.models.EnhancedTimelineEvent) EntityDoc(com.tyndalehouse.step.core.data.EntityDoc)

Example 2 with EnhancedTimelineEvent

use of com.tyndalehouse.step.core.models.EnhancedTimelineEvent in project step by STEPBible.

the class TimelineController method getEventInformation.

/**
 * Retrieves all the information available for a particular timeline event
 *
 * @param eventId the event id identifying a particular timeline event in the database
 * @param version the version that is currently being looked at by the user so that we can lookup verses in the
 *                correct version
 * @return all the information available for a particular timeline
 */
public EnhancedSimileEvent getEventInformation(final String eventId, final String version) {
    final EnhancedTimelineEvent timelineEvent = this.timelineService.getTimelineEvent(eventId, version);
    final SimileEvent se = this.translator.translateEvent(timelineEvent.getEvent());
    final EnhancedSimileEvent ese = new EnhancedSimileEvent();
    ese.setEvent(se);
    ese.setVerses(timelineEvent.getVerses());
    return ese;
}
Also used : EnhancedTimelineEvent(com.tyndalehouse.step.core.models.EnhancedTimelineEvent) EnhancedSimileEvent(com.tyndalehouse.step.models.timeline.simile.EnhancedSimileEvent) SimileEvent(com.tyndalehouse.step.models.timeline.simile.SimileEvent) EnhancedSimileEvent(com.tyndalehouse.step.models.timeline.simile.EnhancedSimileEvent)

Aggregations

EnhancedTimelineEvent (com.tyndalehouse.step.core.models.EnhancedTimelineEvent)2 EntityDoc (com.tyndalehouse.step.core.data.EntityDoc)1 EnhancedSimileEvent (com.tyndalehouse.step.models.timeline.simile.EnhancedSimileEvent)1 SimileEvent (com.tyndalehouse.step.models.timeline.simile.SimileEvent)1