new Person( [json])
A person.
Parameters:
| Name | Type | Argument | Description |
|---|---|---|---|
json |
Object |
<optional> |
- See:
Extends
Methods
-
addEvidence(evidence)
-
Add evidence
Parameters:
Name Type Description evidenceObject | EvidenceReference - Inherited From:
Returns:
This instance.- Type
- Subject
-
addFact(fact)
-
Add a fact
Parameters:
Name Type Description factFact | Object Returns:
This instance- Type
- Person
-
addField(field)
-
Add a field
Parameters:
Name Type Description fieldField - Inherited From:
Returns:
this- Type
- ExtensibleData
-
addLink(link)
-
Add a link
Parameters:
Name Type Description linkLink - Inherited From:
Returns:
this- Type
- ExtensibleData
-
addMedia(media)
-
Add media
Parameters:
Name Type Description mediaObject | SourceReference - Inherited From:
Returns:
This instance.- Type
- Subject
-
addName(name)
-
Add a name
Parameters:
Name Type Description nameNameForm | Object Returns:
This instance- Type
- Person
-
addNote(note)
-
Add a note
Parameters:
Name Type Description noteObject | Note - Inherited From:
Returns:
This instance- Type
- Conclusion
-
addSource(source)
-
Add a source
Parameters:
Name Type Description sourceSourceReference - Inherited From:
Returns:
This instance- Type
- Conclusion
-
getAnalysis()
-
Get analysis.
- Inherited From:
Returns:
analysis- Type
- ResourceReference
-
getAttribution()
-
Get the attribution.
- Inherited From:
Returns:
- Type
- Attribution
-
getConfidence()
-
Get the confidence.
- Inherited From:
Returns:
confidence- Type
- String
-
getDisplay()
-
Get the display properties
Returns:
- Type
- DisplayProperties
-
getEvidence()
-
Get the evidence.
- Inherited From:
Returns:
- Type
- Array.<EvidenceReference>
-
getFacts()
-
Get the facts
Returns:
- Type
- Array.<Fact>
-
getFactsByType(type)
-
Get facts matching the given type
Parameters:
Name Type Description typeString Fact type Returns:
- Type
- Array.<Fact>
-
getFields()
-
Get the fields
- Inherited From:
Returns:
- Type
- Array.<Field>
-
getGender()
-
Get the person's gender
Returns:
gender- Type
- Gender
-
getId()
-
Get the object's id.
- Inherited From:
Returns:
Id- Type
- String
-
getIdentifiers()
-
Get the identifiers
- Inherited From:
Returns:
- Type
- Identifiers
-
getLang()
-
Get the language identifier.
- Inherited From:
Returns:
lang- Type
- String
-
getLink(rel)
-
Get a link
Parameters:
Name Type Description relString - Inherited From:
Returns:
- Type
- Link
-
getLinks()
-
Get the links
- Inherited From:
Returns:
- Type
- Array.<Link>
-
getLiving()
-
Get the living flag
Returns:
living- Type
- Boolean
-
getMedia()
-
Get the media references
- Inherited From:
Returns:
- Type
- Array.<SourceReference>
-
getNames()
-
Get the names
Returns:
- Type
- Array.<Name>
-
getNotes()
-
Get the notes
- Inherited From:
Returns:
notes- Type
- Array.<Note>
-
getPreferredName()
-
Get a person's preferred name, if one exists.
Returns:
- Type
- Name
-
getPrincipal()
-
Get the principal flag
Returns:
- Type
- Boolean
-
getPrivate()
-
Get the private flag
Returns:
private- Type
- Boolean
-
getSortKey()
-
Get the sortKey
- Inherited From:
Returns:
sortKey- Type
- Boolean
-
getSources()
-
Get the sources
- Inherited From:
Returns:
- Type
- Array.<SourceReference>
-
init(json)
-
Initialize from JSON
Parameters:
Name Type Description jsonObject - Overrides:
Returns:
this- Type
- Person
-
isExtracted()
-
Is this an extracted conclusion?
- Inherited From:
Returns:
extracted- Type
- Boolean
-
isFemale()
-
Check if the person's gender is female.
Returns:
- Type
- Boolean
-
<static> isInstance(obj)
-
Check whether the given object is an instance of this class.
Parameters:
Name Type Description objObject Returns:
- Type
- Boolean
-
isMale()
-
Check if the person's gender is male.
Returns:
- Type
- Boolean
-
setAnalysis(analysis)
-
Set the analysis
Parameters:
Name Type Description analysisObject | ResourceReference - Inherited From:
Returns:
This instance- Type
- Conclusion
-
setAttribution(attribution)
-
Set the attribution
Parameters:
Name Type Description attributionObject | Attribution - Inherited From:
Returns:
This instance- Type
- Conclusion
-
setConfidence(confidence)
-
Set the confidence.
Parameters:
Name Type Description confidenceString - Inherited From:
Returns:
This instance- Type
- Conclusion
-
setDisplay(display)
-
Set the display properties
Parameters:
Name Type Description displayDisplayProperties Returns:
this- Type
- Person
-
setEvidence(evidence)
-
Set the evidence. This method will replace existing evidence entries with new entries.
Parameters:
Name Type Description evidenceArray.<Object> | Array.<EvidenceReference> - Inherited From:
Returns:
This instance.- Type
- Subject
-
setExtracted(extracted)
-
Set the extracted property
Parameters:
Name Type Description extractedBoolean - Inherited From:
Returns:
This instance.- Type
- Subject
-
setFacts(facts)
-
Set the facts
Parameters:
Name Type Description factsArray.<Fact> | Array.<Object> Returns:
This instance- Type
- Person
-
setFields(fields)
-
Set the fields
Parameters:
Name Type Description fieldsArray.<Field> - Inherited From:
Returns:
this- Type
- ExtensibleData
-
setGender(gender)
-
Set the person's gender
Parameters:
Name Type Description genderGender Returns:
This instance- Type
- Person
-
setId(id)
-
Set the object's id.
Parameters:
Name Type Description idString - Inherited From:
Returns:
This object, for chaining.- Type
- ExtensibleData
-
setIdentifiers(identifiers)
-
Set the identifiers
Parameters:
Name Type Description identifiersObject | Identifiers - Inherited From:
Returns:
This instance- Type
- Subject
-
setLang(lang)
-
Set the language identifier.
Parameters:
Name Type Description langString - Inherited From:
Returns:
This instance.- Type
- Conclusion
-
setLinks(links)
-
Set the links
Parameters:
Name Type Description linksLinks - Inherited From:
Returns:
this- Type
- ExtensibleData
-
setLiving(living)
-
Set the living flag
Parameters:
Name Type Description livingBoolean Returns:
this- Type
- Person
-
setMedia(media)
-
Set the media references
Parameters:
Name Type Description mediaArray.<Object> | Array.<SourceReference> - Inherited From:
-
setNames(names)
-
Set the names
Parameters:
Name Type Description namesArray.<Name> | Array.<Object> Returns:
This instance- Type
- Person
-
setNotes(notes)
-
Set the notes
Parameters:
Name Type Description notesArray.<Object> | Array.<Note> - Inherited From:
Returns:
This instance- Type
- Conclusion
-
setPrincipal(principal)
-
Set the principal flag
Parameters:
Name Type Description principalBoolean Returns:
this- Type
- Person
-
setPrivate(isPrivate)
-
Set the private flag
Parameters:
Name Type Description isPrivateBoolean Returns:
This instance- Type
- Person
-
setSortKey(sortKey)
-
Set the sortKey
Parameters:
Name Type Description sortKeyBoolean - Inherited From:
Returns:
this- Type
- Conclusion
-
setSources(sources)
-
Set the sources
Parameters:
Name Type Description sourcesArray.<Object> | Array.<SourceReference> - Inherited From:
Returns:
This instance- Type
- Conclusion
-
toJSON()
-
Export the object as JSON
- Overrides:
Returns:
JSON object- Type
- Object