Package org.gedcomx.conclusion
Class Document
- java.lang.Object
-
- org.gedcomx.common.ExtensibleData
-
- org.gedcomx.links.HypermediaEnabledData
-
- org.gedcomx.conclusion.Conclusion
-
- org.gedcomx.conclusion.Document
-
- All Implemented Interfaces:
Attributable,HasNotes,HasText,HasTransientProperties,SupportsLinks,SupportsExtensionElements,ReferencesSources
public class Document extends Conclusion implements HasText, Attributable
An abstract document that contains derived (conclusionary) text -- for example, a transcription or researcher analysis.
-
-
Field Summary
Fields Modifier and Type Field Description static StringTEXT_TYPE_PLAINstatic StringTEXT_TYPE_XHTML-
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
-
-
Constructor Summary
Constructors Constructor Description Document()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(GedcomxModelVisitor visitor)Accept a visitor.Documentanalysis(ResourceReference analysis)Add a reference to the analysis for this conclusion.Documentanalysis(URI analysis)Add a reference to the analysis for this conclusion.Documentanalysis(Document analysis)Add a reference to the analysis for this conclusion.Documentattribution(Attribution attribution)Build up this conclusion with attribution.Documentconfidence(URI confidence)Build up this conclusion with a confidence level.Documentconfidence(ConfidenceLevel confidence)Build up this conclusion with a confidence level.voidembed(Document document)Embed a document.DocumentextensionElement(Object element)Documentextracted(Boolean extracted)Build up this document with an extracted flag.BooleangetExtracted()Whether this document has been identified as "extracted", meaning it captures information extracted from a single source.DocumentTypegetKnownType()The enum referencing the known type of the document, orDocumentType.OTHERif not known.StringgetText()The document text.StringgetTextType()The text type of the document.URIgetType()The type of the document.Documentid(String id)Build up this object with an id.booleanisPlainText()Whether the text of the document is to be interpreted as plain text (as opposed to XHTML).booleanisXhtmlText()Whether the text of the document is to be interpreted as XHTML text (as opposed to plain text).Documentlang(String lang)Build up this conclusion with a lang.Documentlink(String rel, URI href)Build up this data with a link.Documentlink(Link link)Build up this data with a link.Documentnote(Note note)Build up this conclusion with a note.voidsetExtracted(Boolean extracted)Whether this document has been identified as "extracted", meaning it captures information extracted from a single source.voidsetKnownType(DocumentType knownType)Set the type of this document from a known enumeration of document types.voidsetText(String text)The document text.voidsetTextType(String textType)The text type of the document.voidsetType(URI type)The type of the document.DocumentsortKey(String sortKey)Build up this fact with a sort key.Documentsource(SourceDescription source)Build up this conclusion with a source reference.Documentsource(SourceReference sourceReference)Build up this conclusion with a source reference.Documenttext(String text)Build up this document with some text.DocumenttextType(String textType)Build up this document with a text type.Documenttype(URI type)Build up this document with a type.Documenttype(DocumentType type)Build up this document with a type.-
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
-
-
-
-
Field Detail
-
TEXT_TYPE_PLAIN
public static final String TEXT_TYPE_PLAIN
- See Also:
- Constant Field Values
-
TEXT_TYPE_XHTML
public static final String TEXT_TYPE_XHTML
- See Also:
- Constant Field Values
-
-
Method Detail
-
id
public Document 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 Document extensionElement(Object element)
- Overrides:
extensionElementin classConclusion
-
link
public Document 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 Document 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 Document 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 Document 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 Document 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 Document 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 Document 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 Document 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 Document attribution(Attribution attribution)
Description copied from class:ConclusionBuild up this conclusion with attribution.- Overrides:
attributionin classConclusion- Parameters:
attribution- The attribution.- Returns:
- this.
-
analysis
public Document 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 Document 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.
-
analysis
public Document 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.
-
sortKey
public Document 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 document has been identified as "extracted", meaning it captures information extracted from a single source.- Returns:
- Whether this document has been identified as "extracted".
-
setExtracted
public void setExtracted(Boolean extracted)
Whether this document has been identified as "extracted", meaning it captures information extracted from a single source.- Parameters:
extracted- Whether this document has been identified as "extracted".
-
extracted
public Document extracted(Boolean extracted)
Build up this document with an extracted flag.- Parameters:
extracted- The extracted flag.- Returns:
- this.
-
getType
public URI getType()
The type of the document.- Returns:
- The type of the document.
-
setType
public void setType(URI type)
The type of the document.- Parameters:
type- The type of the document.
-
type
public Document type(URI type)
Build up this document with a type.- Parameters:
type- The type.- Returns:
- this.
-
type
public Document type(DocumentType type)
Build up this document with a type.- Parameters:
type- The type.- Returns:
- this.
-
isPlainText
public boolean isPlainText()
Whether the text of the document is to be interpreted as plain text (as opposed to XHTML).- Returns:
- Whether the text of the document is to be interpreted as plain text (as opposed to XHTML).
-
isXhtmlText
public boolean isXhtmlText()
Whether the text of the document is to be interpreted as XHTML text (as opposed to plain text).- Returns:
- Whether the text of the document is to be interpreted as XHTML text (as opposed to plain text).
-
getTextType
public String getTextType()
The text type of the document.- Returns:
- The text type of the document.
-
setTextType
public void setTextType(String textType)
The text type of the document.- Parameters:
textType- The text type of the document.
-
textType
public Document textType(String textType)
Build up this document with a text type.- Parameters:
textType- The text type.- Returns:
- this.
-
getKnownType
public DocumentType getKnownType()
The enum referencing the known type of the document, orDocumentType.OTHERif not known.- Returns:
- The enum referencing the known type of the document, or
DocumentType.OTHERif not known.
-
setKnownType
public void setKnownType(DocumentType knownType)
Set the type of this document from a known enumeration of document types.- Parameters:
knownType- the document type.
-
getText
public String getText()
The document text.
-
setText
public void setText(String text)
The document text.
-
text
public Document text(String text)
Build up this document with some text.- Parameters:
text- The text.- Returns:
- this.
-
accept
public void accept(GedcomxModelVisitor visitor)
Accept a visitor.- Parameters:
visitor- The visitor.
-
embed
public void embed(Document document)
Embed a document.- Parameters:
document- The document to embed.
-
-