org.gedcomx.conclusion
Class Document

java.lang.Object
  extended by org.gedcomx.common.ExtensibleData
      extended by org.gedcomx.links.HypermediaEnabledData
          extended by org.gedcomx.conclusion.Conclusion
              extended by 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
static String TEXT_TYPE_PLAIN
           
static String TEXT_TYPE_XHTML
           
 
Fields inherited from class org.gedcomx.common.ExtensibleData
extensionElements, transientProperties
 
Constructor Summary
Document()
           
 
Method Summary
 void accept(GedcomxModelVisitor visitor)
          Accept a visitor.
 Document analysis(Document analysis)
          Add a reference to the analysis for this conclusion.
 Document analysis(ResourceReference analysis)
          Add a reference to the analysis for this conclusion.
 Document analysis(URI analysis)
          Add a reference to the analysis for this conclusion.
 Document attribution(Attribution attribution)
          Build up this conclusion with attribution.
 Document confidence(ConfidenceLevel confidence)
          Build up this conclusion with a confidence level.
 Document confidence(URI confidence)
          Build up this conclusion with a confidence level.
 void embed(Document document)
          Embed a document.
 Document extracted(Boolean extracted)
          Build up this document with an extracted flag.
 Boolean getExtracted()
          Whether this document has been identified as "extracted", meaning it captures information extracted from a single source.
 DocumentType getKnownType()
          The enum referencing the known type of the document, or DocumentType.OTHER if not known.
 String getText()
          The document text.
 String getTextType()
          The text type of the document.
 URI getType()
          The type of the document.
 Document id(String id)
          Build up this object with an id.
 boolean isPlainText()
          Whether the text of the document is to be interpreted as plain text (as opposed to XHTML).
 boolean isXhtmlText()
          Whether the text of the document is to be interpreted as XHTML text (as opposed to plain text).
 Document lang(String lang)
          Build up this conclusion with a lang.
 Document link(Link link)
          Build up this data with a link.
 Document link(String rel, URI href)
          Build up this data with a link.
 Document note(Note note)
          Build up this conclusion with a note.
 void setExtracted(Boolean extracted)
          Whether this document has been identified as "extracted", meaning it captures information extracted from a single source.
 void setKnownType(DocumentType knownType)
          Set the type of this document from a known enumeration of document types.
 void setText(String text)
          The document text.
 void setTextType(String textType)
          The text type of the document.
 void setType(URI type)
          The type of the document.
 Document sortKey(String sortKey)
          Build up this fact with a sort key.
 Document source(SourceDescription source)
          Build up this conclusion with a source reference.
 Document source(SourceReference sourceReference)
          Build up this conclusion with a source reference.
 Document text(String text)
          Build up this document with some text.
 Document textType(String textType)
          Build up this document with a text type.
 Document type(DocumentType type)
          Build up this document with a type.
 Document type(URI 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, setAnalysis, setAttribution, setConfidence, setKnownConfidenceLevel, setLang, setNotes, setSortKey, setSources, 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
Constructor Detail

Document

public Document()
Method Detail

id

public Document id(String id)
Description copied from class: ExtensibleData
Build up this object with an id.

Overrides:
id in class Conclusion
Parameters:
id - The id.

link

public Document link(String rel,
                     URI href)
Description copied from class: HypermediaEnabledData
Build up this data with a link.

Overrides:
link in class Conclusion
Parameters:
rel - The rel.
href - The href.
Returns:
this.

link

public Document link(Link link)
Description copied from class: HypermediaEnabledData
Build up this data with a link.

Overrides:
link in class Conclusion
Parameters:
link - The link.
Returns:
this.

lang

public Document lang(String lang)
Description copied from class: Conclusion
Build up this conclusion with a lang.

Overrides:
lang in class Conclusion
Parameters:
lang - The lang.
Returns:
this.

confidence

public Document confidence(URI confidence)
Description copied from class: Conclusion
Build up this conclusion with a confidence level.

Overrides:
confidence in class Conclusion
Parameters:
confidence - The confidence level.
Returns:
this.

confidence

public Document confidence(ConfidenceLevel confidence)
Description copied from class: Conclusion
Build up this conclusion with a confidence level.

Overrides:
confidence in class Conclusion
Parameters:
confidence - The confidence level.
Returns:
this.

source

public Document source(SourceReference sourceReference)
Description copied from class: Conclusion
Build up this conclusion with a source reference.

Overrides:
source in class Conclusion
Parameters:
sourceReference - The source reference.
Returns:
this.

source

public Document source(SourceDescription source)
Description copied from class: Conclusion
Build up this conclusion with a source reference.

Overrides:
source in class Conclusion
Parameters:
source - The source description being referenced.
Returns:
this.

note

public Document note(Note note)
Description copied from class: Conclusion
Build up this conclusion with a note.

Overrides:
note in class Conclusion
Parameters:
note - The note.
Returns:
this.

attribution

public Document attribution(Attribution attribution)
Description copied from class: Conclusion
Build up this conclusion with attribution.

Overrides:
attribution in class Conclusion
Parameters:
attribution - The attribution.
Returns:
this.

analysis

public Document analysis(ResourceReference analysis)
Description copied from class: Conclusion
Add a reference to the analysis for this conclusion.

Overrides:
analysis in class Conclusion
Parameters:
analysis - The analysis.
Returns:
this.

analysis

public Document analysis(Document analysis)
Description copied from class: Conclusion
Add a reference to the analysis for this conclusion.

Overrides:
analysis in class Conclusion
Parameters:
analysis - The analysis.
Returns:
this.

analysis

public Document analysis(URI analysis)
Description copied from class: Conclusion
Add a reference to the analysis for this conclusion.

Overrides:
analysis in class Conclusion
Parameters:
analysis - The analysis.
Returns:
this.

sortKey

public Document sortKey(String sortKey)
Description copied from class: Conclusion
Build up this fact with a sort key.

Overrides:
sortKey in class Conclusion
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, or DocumentType.OTHER if not known.

Returns:
The enum referencing the known type of the document, or DocumentType.OTHER if 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.

Specified by:
getText in interface HasText
Returns:
The document text.

setText

public void setText(String text)
The document text.

Specified by:
setText in interface HasText
Parameters:
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.


Copyright © 2015. All rights reserved.