Package org.gedcomx.conclusion
Class Event
-
- All Implemented Interfaces:
Attributable,HasNotes,HasTransientProperties,HasDateAndPlace,SupportsLinks,SupportsExtensionElements,ReferencesSources
public class Event extends Subject implements HasDateAndPlace
A historical event.- Author:
- Ryan Heaton
-
-
Field Summary
-
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(GedcomxModelVisitor visitor)Accept a visitor.voidaddRole(EventRole role)Add a role to the list of roles played in this event.Eventanalysis(ResourceReference analysis)Add a reference to the analysis for this conclusion.Eventanalysis(URI analysis)Add a reference to the analysis for this conclusion.Eventanalysis(Document analysis)Add a reference to the analysis for this conclusion.Eventattribution(Attribution attribution)Build up this conclusion with attribution.Eventconfidence(URI confidence)Build up this conclusion with a confidence level.Eventconfidence(ConfidenceLevel confidence)Build up this conclusion with a confidence level.Eventdate(Date date)Build up this event with a date.voidembed(Event event)Embed another event.Eventevidence(EvidenceReference evidence)Build up this subject with an evidence reference.Eventevidence(Event evidence)EventextensionElement(Object element)Eventextracted(Boolean extracted)Build up this subject with an extracted flag.DategetDate()The date of this event.EventTypegetKnownType()The enum referencing the known type of the event, orEventType.OTHERif not known.PlaceReferencegetPlace()The place of this event.List<EventRole>getRoles()The roles played in this event.URIgetType()The type of the event.Eventid(String id)Build up this object with an id.Eventidentifier(Identifier identifier)Build up this subject with an identifier.Eventlang(String lang)Build up this conclusion with a lang.Eventlink(String rel, URI href)Build up this data with a link.Eventlink(Link link)Build up this data with a link.Eventmedia(SourceDescription media)Build up this subject with a media reference.Eventmedia(SourceReference media)Build up this subject with a media reference.Eventnote(Note note)Build up this conclusion with a note.Eventplace(PlaceReference place)Build up this event with a place.Eventrole(EventRole role)Build up this event with a role.Stream<EventRole>roles()Create a stream for the roles of this event.voidsetDate(Date date)The date of this event.voidsetKnownType(EventType knownType)Set the type of this event from a known enumeration of event types.voidsetPlace(PlaceReference place)The place of this event.voidsetRoles(List<EventRole> roles)The roles played in this event.voidsetType(URI type)The type of the event.EventsortKey(String sortKey)Build up this fact with a sort key.Eventsource(SourceDescription source)Build up this conclusion with a source reference.Eventsource(SourceReference sourceReference)Build up this conclusion with a source reference.Eventtype(URI type)Build up this event with a type.Eventtype(EventType type)Build up this event with a type.-
Methods inherited from class org.gedcomx.conclusion.Subject
addEvidence, addIdentifier, addMedia, embed, evidence, getEvidence, getExtracted, getIdentifiers, getMedia, getPersistentId, identifiers, media, setEvidence, setExtracted, setIdentifiers, setMedia, setPersistentId
-
Methods inherited from class org.gedcomx.conclusion.Conclusion
addNote, addSource, embed, getAnalysis, getAttribution, getConfidence, getKnownConfidenceLevel, getLang, getNotes, getSortKey, getSources, notes, setAnalysis, setAttribution, setConfidence, setKnownConfidenceLevel, setLang, setNotes, setSortKey, setSources, sources, toString
-
Methods inherited from class org.gedcomx.links.HypermediaEnabledData
addLink, addLink, addTemplatedLink, embed, getLink, getLinks, getLinks, setLinks
-
Methods inherited from class org.gedcomx.common.ExtensibleData
addExtensionElement, embed, findExtensionOfType, findExtensionOfType, findExtensionsOfType, findExtensionsOfType, getExtensionElements, getId, getTransientProperties, getTransientProperty, removeExtensionElements, setExtensionElement, setExtensionElements, setId, setTransientProperty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.gedcomx.common.Attributable
getAttribution, setAttribution
-
-
-
-
Constructor Detail
-
Event
public Event()
Create an event.
-
Event
public Event(EventType EventType)
Create an event with the passed in type and values.- Parameters:
EventType- the event type.
-
Event
public Event(EventType EventType, Date date, PlaceReference place)
Create a date/place event with the passed in type and values.- Parameters:
EventType- the event type.date- The date of applicability of this event.place- The place of applicability of this event.
-
-
Method Detail
-
id
public Event id(String id)
Description copied from class:ExtensibleDataBuild up this object with an id.
-
extensionElement
public Event extensionElement(Object element)
- Overrides:
extensionElementin classSubject
-
link
public Event link(String rel, URI href)
Description copied from class:HypermediaEnabledDataBuild up this data with a link.
-
link
public Event link(Link link)
Description copied from class:HypermediaEnabledDataBuild up this data with a link.
-
lang
public Event lang(String lang)
Description copied from class:ConclusionBuild up this conclusion with a lang.
-
confidence
public Event confidence(URI confidence)
Description copied from class:ConclusionBuild up this conclusion with a confidence level.- Overrides:
confidencein classSubject- Parameters:
confidence- The confidence level.- Returns:
- this.
-
confidence
public Event confidence(ConfidenceLevel confidence)
Description copied from class:ConclusionBuild up this conclusion with a confidence level.- Overrides:
confidencein classSubject- Parameters:
confidence- The confidence level.- Returns:
- this.
-
source
public Event source(SourceReference sourceReference)
Description copied from class:ConclusionBuild up this conclusion with a source reference.
-
source
public Event source(SourceDescription source)
Description copied from class:ConclusionBuild up this conclusion with a source reference.
-
note
public Event note(Note note)
Description copied from class:ConclusionBuild up this conclusion with a note.
-
analysis
public Event analysis(ResourceReference analysis)
Description copied from class:ConclusionAdd a reference to the analysis for this conclusion.
-
attribution
public Event attribution(Attribution attribution)
Description copied from class:ConclusionBuild up this conclusion with attribution.- Overrides:
attributionin classSubject- Parameters:
attribution- The attribution.- Returns:
- this.
-
analysis
public Event analysis(Document analysis)
Description copied from class:ConclusionAdd a reference to the analysis for this conclusion.
-
analysis
public Event analysis(URI analysis)
Description copied from class:ConclusionAdd a reference to the analysis for this conclusion.
-
extracted
public Event extracted(Boolean extracted)
Description copied from class:SubjectBuild up this subject with an extracted flag.
-
identifier
public Event identifier(Identifier identifier)
Description copied from class:SubjectBuild up this subject with an identifier.- Overrides:
identifierin classSubject- Parameters:
identifier- The identifier.- Returns:
- this.
-
evidence
public Event evidence(EvidenceReference evidence)
Description copied from class:SubjectBuild up this subject with an evidence reference.
-
sortKey
public Event sortKey(String sortKey)
Description copied from class:ConclusionBuild up this fact with a sort key.
-
media
public Event media(SourceReference media)
Description copied from class:SubjectBuild up this subject with a media reference.
-
media
public Event media(SourceDescription media)
Description copied from class:SubjectBuild up this subject with a media reference.
-
getType
public URI getType()
The type of the event.- Returns:
- The type of the event.
-
setType
public void setType(URI type)
The type of the event.- Parameters:
type- The type of the event.
-
type
public Event type(URI type)
Build up this event with a type.- Parameters:
type- The type of the event.- Returns:
- this.
-
type
public Event type(EventType type)
Build up this event with a type.- Parameters:
type- The type of the event.- Returns:
- this.
-
getKnownType
public EventType getKnownType()
The enum referencing the known type of the event, orEventType.OTHERif not known.- Returns:
- The enum referencing the known type of the event, or
EventType.OTHERif not known.
-
setKnownType
public void setKnownType(EventType knownType)
Set the type of this event from a known enumeration of event types.- Parameters:
knownType- the event type.
-
getDate
public Date getDate()
The date of this event.- Specified by:
getDatein interfaceHasDateAndPlace- Returns:
- The date of this event.
-
setDate
public void setDate(Date date)
The date of this event.- Specified by:
setDatein interfaceHasDateAndPlace- Parameters:
date- The date of this event.
-
date
public Event date(Date date)
Build up this event with a date.- Parameters:
date- The date.- Returns:
- this.
-
getPlace
public PlaceReference getPlace()
The place of this event.- Specified by:
getPlacein interfaceHasDateAndPlace- Returns:
- The place of this event.
-
setPlace
public void setPlace(PlaceReference place)
The place of this event.- Specified by:
setPlacein interfaceHasDateAndPlace- Parameters:
place- The place of this event.
-
place
public Event place(PlaceReference place)
Build up this event with a place.- Parameters:
place- The place.- Returns:
- this.
-
roles
public Stream<EventRole> roles()
Create a stream for the roles of this event.- Returns:
- a stream for the roles of this event.
-
getRoles
public List<EventRole> getRoles()
The roles played in this event.- Returns:
- The roles played in this event.
-
setRoles
public void setRoles(List<EventRole> roles)
The roles played in this event.- Parameters:
roles- The roles played in this event.
-
role
public Event role(EventRole role)
Build up this event with a role.- Parameters:
role- The role.- Returns:
- this.
-
addRole
public void addRole(EventRole role)
Add a role to the list of roles played in this event.- Parameters:
role- The role to be added.
-
accept
public void accept(GedcomxModelVisitor visitor)
Accept a visitor.- Parameters:
visitor- The visitor.
-
embed
public void embed(Event event)
Embed another event.- Parameters:
event- The event to embed.
-
-