/** * Build up this event with a role. * * @param role The role. * @return this. */ public Event role(EventRole role) { addRole(role); return this; }
/** * Create a date/place event with the passed in type and values. * * @param EventType the event type. * @param date The date of applicability of this event. * @param place The place of applicability of this event. */ public Event(EventType EventType, Date date, PlaceReference place) { setKnownType(EventType); setDate(date); setPlace(place); }
@Override public void visitEvent(Event event) { this.contextStack.push(event); visitSubject(event); Date date = event.getDate(); if (date != null) { date.accept(this); } PlaceReference place = event.getPlace(); if (place != null) { place.accept(this); } List<EventRole> roles = event.getRoles(); if (roles != null) { for (EventRole role : roles) { if (role != null) { role.accept(this); } } } this.contextStack.pop(); }
/** * Build up this event with a type. * * @param type The type of the event. * @return this. */ public Event type(org.gedcomx.types.EventType type) { setKnownType(type); return this; }
/** * Build up this event with a date. * * @param date The date. * @return this. */ public Event date(Date date) { setDate(date); return this; }
/** * The enum referencing the known type of the event, or {@link org.gedcomx.types.EventType#OTHER} if not known. * * @return The enum referencing the known type of the event, or {@link org.gedcomx.types.EventType#OTHER} if not known. */ @XmlTransient @JsonIgnore @org.codehaus.jackson.annotate.JsonIgnore public org.gedcomx.types.EventType getKnownType() { return getType() == null ? null : EventType.fromQNameURI(getType()); }
for (Event event : events) { if (event != null) { event.accept(this);
/** * Create an event with the passed in type and values. * * @param EventType the event type. */ public Event(EventType EventType) { setKnownType(EventType); }