new Fact( [json])
A fact for a person or relationship.
Parameters:
| Name | Type | Argument | Description |
|---|---|---|---|
json |
Object |
<optional> |
- See:
Extends
Methods
-
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
-
addNote(note)
-
Add a note
Parameters:
Name Type Description noteObject | Note - Inherited From:
Returns:
This instance- Type
- Conclusion
-
addQualifier(qualifier)
-
Add a qualifier
Parameters:
Name Type Description qualifierQualifier | Object Returns:
This instance- Type
- Fact
-
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
-
getDate()
-
Get the date
Returns:
date- Type
- Date
-
getFields()
-
Get the fields
- Inherited From:
Returns:
- Type
- Array.<Field>
-
getId()
-
Get the object's id.
- Inherited From:
Returns:
Id- Type
- String
-
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>
-
getNotes()
-
Get the notes
- Inherited From:
Returns:
notes- Type
- Array.<Note>
-
getPlace()
-
Get the place reference
Returns:
- Type
- PlaceReference
-
getPrimary()
-
Get the primary flag
Returns:
- Type
- Boolean
-
getQualifiers()
-
Get qualifiers
Returns:
- Type
- Array.<Qualifer>
-
getSortKey()
-
Get the sortKey
- Inherited From:
Returns:
sortKey- Type
- Boolean
-
getSources()
-
Get the sources
- Inherited From:
Returns:
- Type
- Array.<SourceReference>
-
getType()
-
Get the fact type
Returns:
type- Type
- String
-
getValue()
-
Get the value
Returns:
- Type
- String
-
init(json)
-
Initialize from JSON
Parameters:
Name Type Description jsonObject - Overrides:
Returns:
this- Type
- Fact
-
<static> isInstance(obj)
-
Check whether the given object is an instance of this class.
Parameters:
Name Type Description objObject 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
-
setDate(date)
-
Set the date
Parameters:
Name Type Description dateDate | Object Returns:
This instance- Type
- Fact
-
setFields(fields)
-
Set the fields
Parameters:
Name Type Description fieldsArray.<Field> - Inherited From:
Returns:
this- Type
- ExtensibleData
-
setId(id)
-
Set the object's id.
Parameters:
Name Type Description idString - Inherited From:
Returns:
This object, for chaining.- Type
- ExtensibleData
-
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
-
setNotes(notes)
-
Set the notes
Parameters:
Name Type Description notesArray.<Object> | Array.<Note> - Inherited From:
Returns:
This instance- Type
- Conclusion
-
setPlace(place)
-
Set the place reference
Parameters:
Name Type Description placePlaceReference | Object Returns:
This instance- Type
- Fact
-
setPrimary(primary)
-
Set the primary flag
Parameters:
Name Type Description primaryBoolean Returns:
this- Type
- Fact
-
setQualifiers(qualifiers)
-
Set the qualifiers
Parameters:
Name Type Description qualifiersArray.<Qualifer> | Array.<Object> Returns:
This instance- Type
- Fact
-
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
-
setType(type)
-
Set the fact type
Parameters:
Name Type Description typeString Returns:
This instance- Type
- Fact
-
setValue(value)
-
Set the value
Parameters:
Name Type Description valueString Returns:
This instance- Type
- Fact
-
toJSON()
-
Export the object as JSON
- Overrides:
Returns:
JSON object- Type
- Object