Package org.gedcomx.conclusion
Class Subject
- java.lang.Object
-
- org.gedcomx.common.ExtensibleData
-
- org.gedcomx.links.HypermediaEnabledData
-
- org.gedcomx.conclusion.Conclusion
-
- org.gedcomx.conclusion.Subject
-
- All Implemented Interfaces:
Attributable,HasNotes,HasTransientProperties,SupportsLinks,SupportsExtensionElements,ReferencesSources
- Direct Known Subclasses:
Event,Person,PlaceDescription,Relationship
public abstract class Subject extends Conclusion implements Attributable
TheSubjectdata type defines the abstract concept of a genealogical subject. A subject is something with a unique and intrinsic identity, e.g., a person, a location on the surface of the earth. We identify that subject in time and space using various supporting conclusions, e.g. for a person: things like name, birth date, age, address, etc. We aggregate these supporting conclusions to form an apparently-unique identity by which we can distinguish our subject from all other possible subjects.- Author:
- Ryan Heaton
-
-
Field Summary
-
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
-
-
Constructor Summary
Constructors Constructor Description Subject()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEvidence(EvidenceReference evidenceRef)Add an evidence reference for this subject.voidaddIdentifier(Identifier identifier)Add an identifier of the subject.voidaddMedia(SourceReference mediaRef)Add an media reference associated with this subject.Subjectanalysis(ResourceReference analysis)Add a reference to the analysis for this conclusion.Subjectanalysis(URI analysis)Add a reference to the analysis for this conclusion.Subjectanalysis(Document analysis)Add a reference to the analysis for this conclusion.Subjectattribution(Attribution attribution)Build up this conclusion with attribution.Subjectconfidence(URI confidence)Build up this conclusion with a confidence level.Subjectconfidence(ConfidenceLevel confidence)Build up this conclusion with a confidence level.protected voidembed(Subject subject)Stream<EvidenceReference>evidence()Create a stream for the evidences.Subjectevidence(EvidenceReference evidence)Build up this subject with an evidence reference.SubjectextensionElement(Object element)Subjectextracted(Boolean extracted)Build up this subject with an extracted flag.List<EvidenceReference>getEvidence()References to the evidence being referenced for this subject.BooleangetExtracted()Whether this subject has been identified as "extracted", meaning it captures information extracted from a single source.List<Identifier>getIdentifiers()The list of identifiers for the subject.List<SourceReference>getMedia()References to multimedia resources associated with this subject.URIgetPersistentId()Find the long-term, persistent identifier for this subject from the list of identifiers.Subjectid(String id)Build up this object with an id.Subjectidentifier(Identifier identifier)Build up this subject with an identifier.Stream<Identifier>identifiers()Create a stream for the identifiers.Subjectlang(String lang)Build up this conclusion with a lang.Subjectlink(String rel, URI href)Build up this data with a link.Subjectlink(Link link)Build up this data with a link.Stream<SourceReference>media()Create a stream for the media.Subjectmedia(SourceDescription media)Build up this subject with a media reference.Subjectmedia(SourceReference media)Build up this subject with a media reference.Subjectnote(Note note)Build up this conclusion with a note.voidsetEvidence(List<EvidenceReference> evidence)References to the evidence being referenced for this subject.voidsetExtracted(Boolean extracted)Whether this subject has been identified as "extracted", meaning it captures information extracted from a single source.voidsetIdentifiers(List<Identifier> identifiers)The list of identifiers of the subject.voidsetMedia(List<SourceReference> media)References to multimedia resources associated with this subject.voidsetPersistentId(URI persistentId)A long-term, persistent, globally unique identifier for this subject.SubjectsortKey(String sortKey)Build up this fact with a sort key.Subjectsource(SourceDescription source)Build up this conclusion with a source reference.Subjectsource(SourceReference sourceReference)Build up this conclusion with a source reference.-
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
-
-
-
-
Method Detail
-
id
public Subject id(String id)
Description copied from class:ExtensibleDataBuild up this object with an id.- Overrides:
idin classConclusion- Parameters:
id- The id.- Returns:
- this.
-
extensionElement
public Subject extensionElement(Object element)
- Overrides:
extensionElementin classConclusion
-
link
public Subject link(String rel, URI href)
Description copied from class:HypermediaEnabledDataBuild up this data with a link.- Overrides:
linkin classConclusion- Parameters:
rel- The rel.href- The href.- Returns:
- this.
-
link
public Subject link(Link link)
Description copied from class:HypermediaEnabledDataBuild up this data with a link.- Overrides:
linkin classConclusion- Parameters:
link- The link.- Returns:
- this.
-
lang
public Subject lang(String lang)
Description copied from class:ConclusionBuild up this conclusion with a lang.- Overrides:
langin classConclusion- Parameters:
lang- The lang.- Returns:
- this.
-
confidence
public Subject confidence(URI confidence)
Description copied from class:ConclusionBuild up this conclusion with a confidence level.- Overrides:
confidencein classConclusion- Parameters:
confidence- The confidence level.- Returns:
- this.
-
confidence
public Subject confidence(ConfidenceLevel confidence)
Description copied from class:ConclusionBuild up this conclusion with a confidence level.- Overrides:
confidencein classConclusion- Parameters:
confidence- The confidence level.- Returns:
- this.
-
source
public Subject source(SourceReference sourceReference)
Description copied from class:ConclusionBuild up this conclusion with a source reference.- Overrides:
sourcein classConclusion- Parameters:
sourceReference- The source reference.- Returns:
- this.
-
source
public Subject source(SourceDescription source)
Description copied from class:ConclusionBuild up this conclusion with a source reference.- Overrides:
sourcein classConclusion- Parameters:
source- The source description being referenced.- Returns:
- this.
-
note
public Subject note(Note note)
Description copied from class:ConclusionBuild up this conclusion with a note.- Overrides:
notein classConclusion- Parameters:
note- The note.- Returns:
- this.
-
attribution
public Subject attribution(Attribution attribution)
Description copied from class:ConclusionBuild up this conclusion with attribution.- Overrides:
attributionin classConclusion- Parameters:
attribution- The attribution.- Returns:
- this.
-
analysis
public Subject analysis(ResourceReference analysis)
Description copied from class:ConclusionAdd a reference to the analysis for this conclusion.- Overrides:
analysisin classConclusion- Parameters:
analysis- The analysis.- Returns:
- this.
-
analysis
public Subject analysis(URI analysis)
Description copied from class:ConclusionAdd a reference to the analysis for this conclusion.- Overrides:
analysisin classConclusion- Parameters:
analysis- The analysis.- Returns:
- this.
-
analysis
public Subject analysis(Document analysis)
Description copied from class:ConclusionAdd a reference to the analysis for this conclusion.- Overrides:
analysisin classConclusion- Parameters:
analysis- The analysis.- Returns:
- this.
-
sortKey
public Subject sortKey(String sortKey)
Description copied from class:ConclusionBuild up this fact with a sort key.- Overrides:
sortKeyin classConclusion- Parameters:
sortKey- The sort key.- Returns:
- this.
-
getExtracted
public Boolean getExtracted()
Whether this subject has been identified as "extracted", meaning it captures information extracted from a single source.- Returns:
- Whether this subject has been identified as "extracted".
-
setExtracted
public void setExtracted(Boolean extracted)
Whether this subject has been identified as "extracted", meaning it captures information extracted from a single source.- Parameters:
extracted- Whether this subject has been identified as "extracted".
-
extracted
public Subject extracted(Boolean extracted)
Build up this subject with an extracted flag.- Parameters:
extracted- The extracted flag.- Returns:
- this.
-
getPersistentId
public URI getPersistentId()
Find the long-term, persistent identifier for this subject from the list of identifiers.- Returns:
- The long-term, persistent identifier for this subject.
-
setPersistentId
public void setPersistentId(URI persistentId)
A long-term, persistent, globally unique identifier for this subject.- Parameters:
persistentId- A long-term, persistent, globally unique identifier for this subject.
-
identifiers
public Stream<Identifier> identifiers()
Create a stream for the identifiers.- Returns:
- a stream for the identifiers.
-
getIdentifiers
public List<Identifier> getIdentifiers()
The list of identifiers for the subject.- Returns:
- The list of identifiers for the subject.
-
setIdentifiers
public void setIdentifiers(List<Identifier> identifiers)
The list of identifiers of the subject.- Parameters:
identifiers- The list of identifiers of the subject.
-
identifier
public Subject identifier(Identifier identifier)
Build up this subject with an identifier.- Parameters:
identifier- The identifier.- Returns:
- this.
-
addIdentifier
public void addIdentifier(Identifier identifier)
Add an identifier of the subject.- Parameters:
identifier- The identifier to be added.
-
evidence
public Stream<EvidenceReference> evidence()
Create a stream for the evidences.- Returns:
- a stream for the evidences.
-
getEvidence
public List<EvidenceReference> getEvidence()
References to the evidence being referenced for this subject.- Returns:
- References to the evidence being referenced.
-
setEvidence
public void setEvidence(List<EvidenceReference> evidence)
References to the evidence being referenced for this subject.- Parameters:
evidence- References to the evidence being referenced.
-
evidence
public Subject evidence(EvidenceReference evidence)
Build up this subject with an evidence reference.- Parameters:
evidence- The evidence reference.- Returns:
- this.
-
addEvidence
public void addEvidence(EvidenceReference evidenceRef)
Add an evidence reference for this subject.- Parameters:
evidenceRef- The evidence to be added.
-
media
public Stream<SourceReference> media()
Create a stream for the media.- Returns:
- a stream for the media.
-
getMedia
public List<SourceReference> getMedia()
References to multimedia resources associated with this subject.- Returns:
- References to multimedia resources associated with this subject.
-
setMedia
public void setMedia(List<SourceReference> media)
References to multimedia resources associated with this subject.- Parameters:
media- References to multimedia resources associated with this subject.
-
media
public Subject media(SourceReference media)
Build up this subject with a media reference.- Parameters:
media- The media reference.- Returns:
- this.
-
media
public Subject media(SourceDescription media)
Build up this subject with a media reference.- Parameters:
media- The media reference.- Returns:
- this.
-
addMedia
public void addMedia(SourceReference mediaRef)
Add an media reference associated with this subject.- Parameters:
mediaRef- The reference to the media to be added.
-
embed
protected void embed(Subject subject)
-
-