C# 클래스 SIL.FieldWorks.TE.TeImporter

This class handles importing of Scripture, back translations, and notes.
Note: this class runs on a background thread. It can't call any UI methods directly!
상속: IFWDisposable
파일 보기 프로젝트 열기: sillsdev/FieldWorks 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
m_BTStrBldrs ITsStrBldr>.Dictionary
m_CurrFootnote IScrFootnote
m_DefaultIntroParaProxy SIL.FieldWorks.TE.ImportStyleProxy
m_DefaultIntroSectionHeadParaProxy SIL.FieldWorks.TE.ImportStyleProxy
m_DefaultScrParaProxy SIL.FieldWorks.TE.ImportStyleProxy
m_ParaBldr SIL.FieldWorks.FDO.Cellar.StTxtParaBldr
m_SavedParaBldr SIL.FieldWorks.FDO.Cellar.StTxtParaBldr
m_ScrSectionHeadParaProxy SIL.FieldWorks.TE.ImportStyleProxy
m_Title IStText
m_cache SIL.FieldWorks.FDO.FdoCache
m_currBtPictureInfo BTPictureInfo
m_currPictureInfo ToolboxPictureInfo
m_currSection IScrSection
m_currentRef SILUBS.SharedScrUtils.BCVRef
m_existingAnnotations IScrScriptureNote>.Dictionary
m_fCurrentSectionIsIntro bool
m_fFoundABook bool
m_fInBookTitle bool
m_fInFootnote bool
m_fInScriptureText bool
m_fInSectionHeading bool
m_fInVerseTextParagraph bool
m_firstImportedRef ScrReference
m_iCurrFootnote int
m_iCurrSection int
m_importCallbacks TeImportUi
m_isDisposed bool
m_nBookNumber int
m_prevRef SILUBS.SharedScrUtils.BCVRef
m_sPrevBook string
m_savedVersionDescription string
m_scr IScripture
m_scrBook IScrBook
m_sectionContent IStText
m_sectionHeading IStText
m_styleSheet FwStyleSheet
m_ttpChapterNumber ITsTextProps
m_undoManager SIL.FieldWorks.TE.UndoImportManager
m_wsAnal int
m_wsVern int

Private Properties

프로퍼티 타입 설명
Pause void
Resume void

공개 메소드들

메소드 설명
CheckDisposed ( ) : void

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.

Dispose ( ) : void

Must not be virtual.

보호된 메소드들

메소드 설명
CheckPause ( ) : void

Checks to see if a pause has been requested.

Dispose ( bool disposing ) : void

Executes in two distinct scenarios. 1. If disposing is true, the method has been called directly or indirectly by a user's code via the Dispose method. Both managed and unmanaged resources can be disposed. 2. If disposing is false, the method has been called by the runtime from inside the finalizer and you should not reference (access) other managed objects, as they already have been garbage collected. Only unmanaged resources can be disposed.

If any exceptions are thrown, that is fine. If the method is being done in a finalizer, it will be ignored. If it is thrown by client code calling Dispose, it needs to be handled by fixing the bug. If subclasses override this method, they should call the base implementation.

EndFootnote ( ) : void

TeSfmImporter needs to do something for this, but TeXmlImporter doesn't.

FinalizePrevSection ( ) : void

Finalizes section references and checks if the current section has any heading text and content. If not, a single blank paragraph is written for whatever is missing.

FindOrCreateAnnotation ( ScrAnnotationInfo info, ICmObject annotatedObj ) : IScrScriptureNote

Finds or creates an annotation.

GetAnnotDiscussionParaBldr ( ScrAnnotationInfo info ) : SIL.FieldWorks.FDO.Cellar.StTxtParaBldr

Gets a paragraph builder for a simple, single-paragraph Scripture annotation discussion field. The base implementation just returns null, but this is virtual to allow subclasses to return something useful if they don't handle complex annotations.

MakeSection ( ) : void

Add a section, with empty heading and contents. Sets the following members: m_currSection, m_hvoSectionHeading, m_hvoSectionContent

PrepareToImportNewBook ( ) : void

Creates a new book having the "canonical" book number m_nBookNumber. The new book is stored in the saved version. It also creates a title object for the book and puts he hvo of the title in m_hvoTitle.

ResetStateVariablesForNewBook ( ) : void

Resets importer state variables for the new book

SetBookAnnotations ( ) : void

Store the set of annotations that exist for the given book before importing.

StartBookTitle ( ) : void

Set everything up for processing a book title.

StartingNewBook ( ) : void

Updates the previous book name.

UpdateProgressDlgForBook ( string stid ) : void

Update the message in the progress dialog box to reflect the book being imported

비공개 메소드들

메소드 설명
Pause ( ) : void

Pauses the import.

Resume ( ) : void

Resumes the import.

메소드 상세

CheckDisposed() 공개 메소드

Check to see if the object has been disposed. All public Properties and Methods should call this before doing anything else.
public CheckDisposed ( ) : void
리턴 void

CheckPause() 보호된 메소드

Checks to see if a pause has been requested.
protected CheckPause ( ) : void
리턴 void

Dispose() 공개 메소드

Must not be virtual.
public Dispose ( ) : void
리턴 void

Dispose() 보호된 메소드

Executes in two distinct scenarios. 1. If disposing is true, the method has been called directly or indirectly by a user's code via the Dispose method. Both managed and unmanaged resources can be disposed. 2. If disposing is false, the method has been called by the runtime from inside the finalizer and you should not reference (access) other managed objects, as they already have been garbage collected. Only unmanaged resources can be disposed.
If any exceptions are thrown, that is fine. If the method is being done in a finalizer, it will be ignored. If it is thrown by client code calling Dispose, it needs to be handled by fixing the bug. If subclasses override this method, they should call the base implementation.
protected Dispose ( bool disposing ) : void
disposing bool
리턴 void

EndFootnote() 보호된 메소드

TeSfmImporter needs to do something for this, but TeXmlImporter doesn't.
protected EndFootnote ( ) : void
리턴 void

FinalizePrevSection() 보호된 메소드

Finalizes section references and checks if the current section has any heading text and content. If not, a single blank paragraph is written for whatever is missing.
protected FinalizePrevSection ( ) : void
리턴 void

FindOrCreateAnnotation() 보호된 메소드

Finds or creates an annotation.
protected FindOrCreateAnnotation ( ScrAnnotationInfo info, ICmObject annotatedObj ) : IScrScriptureNote
info ScrAnnotationInfo The information about a annotation being imported.
annotatedObj ICmObject The annotated object (a book or paragraph).
리턴 IScrScriptureNote

GetAnnotDiscussionParaBldr() 보호된 메소드

Gets a paragraph builder for a simple, single-paragraph Scripture annotation discussion field. The base implementation just returns null, but this is virtual to allow subclasses to return something useful if they don't handle complex annotations.
protected GetAnnotDiscussionParaBldr ( ScrAnnotationInfo info ) : SIL.FieldWorks.FDO.Cellar.StTxtParaBldr
info ScrAnnotationInfo The information about a annotation being imported.
리턴 SIL.FieldWorks.FDO.Cellar.StTxtParaBldr

MakeSection() 보호된 메소드

Add a section, with empty heading and contents. Sets the following members: m_currSection, m_hvoSectionHeading, m_hvoSectionContent
protected MakeSection ( ) : void
리턴 void

PrepareToImportNewBook() 보호된 메소드

Creates a new book having the "canonical" book number m_nBookNumber. The new book is stored in the saved version. It also creates a title object for the book and puts he hvo of the title in m_hvoTitle.
protected PrepareToImportNewBook ( ) : void
리턴 void

ResetStateVariablesForNewBook() 보호된 메소드

Resets importer state variables for the new book
protected ResetStateVariablesForNewBook ( ) : void
리턴 void

SetBookAnnotations() 보호된 메소드

Store the set of annotations that exist for the given book before importing.
protected SetBookAnnotations ( ) : void
리턴 void

StartBookTitle() 보호된 메소드

Set everything up for processing a book title.
protected StartBookTitle ( ) : void
리턴 void

StartingNewBook() 보호된 메소드

Updates the previous book name.
protected StartingNewBook ( ) : void
리턴 void

UpdateProgressDlgForBook() 보호된 메소드

Update the message in the progress dialog box to reflect the book being imported
protected UpdateProgressDlgForBook ( string stid ) : void
stid string The resource id for the format string to use
리턴 void

프로퍼티 상세

m_BTStrBldrs 보호되어 있는 프로퍼티

String builders to construct back-trans paragraph strings.
protected Dictionary m_BTStrBldrs
리턴 ITsStrBldr>.Dictionary

m_CurrFootnote 보호되어 있는 프로퍼티

The current footnote; null if m_fInFootnote is both false.
protected IScrFootnote m_CurrFootnote
리턴 IScrFootnote

m_DefaultIntroParaProxy 보호되어 있는 프로퍼티

Default Background paragraph style proxy
protected ImportStyleProxy,SIL.FieldWorks.TE m_DefaultIntroParaProxy
리턴 SIL.FieldWorks.TE.ImportStyleProxy

m_DefaultIntroSectionHeadParaProxy 보호되어 있는 프로퍼티

Background Section Head paragraph style proxy
protected ImportStyleProxy,SIL.FieldWorks.TE m_DefaultIntroSectionHeadParaProxy
리턴 SIL.FieldWorks.TE.ImportStyleProxy

m_DefaultScrParaProxy 보호되어 있는 프로퍼티

Default Scripture paragraph style proxy
protected ImportStyleProxy,SIL.FieldWorks.TE m_DefaultScrParaProxy
리턴 SIL.FieldWorks.TE.ImportStyleProxy

m_ParaBldr 보호되어 있는 프로퍼티

String builder to construct paragraph strings.
protected StTxtParaBldr,SIL.FieldWorks.FDO.Cellar m_ParaBldr
리턴 SIL.FieldWorks.FDO.Cellar.StTxtParaBldr

m_SavedParaBldr 보호되어 있는 프로퍼티

Used to save and restore an "outer" string builder when creating "nested" paragraphs, such as footnotes.
protected StTxtParaBldr,SIL.FieldWorks.FDO.Cellar m_SavedParaBldr
리턴 SIL.FieldWorks.FDO.Cellar.StTxtParaBldr

m_ScrSectionHeadParaProxy 보호되어 있는 프로퍼티

Scripture Section Head paragraph style proxy
protected ImportStyleProxy,SIL.FieldWorks.TE m_ScrSectionHeadParaProxy
리턴 SIL.FieldWorks.TE.ImportStyleProxy

m_Title 보호되어 있는 프로퍼티

ID of title
protected IStText m_Title
리턴 IStText

m_cache 보호되어 있는 프로퍼티

The cache
protected FdoCache,SIL.FieldWorks.FDO m_cache
리턴 SIL.FieldWorks.FDO.FdoCache

m_currBtPictureInfo 보호되어 있는 프로퍼티

Information about the current BT picture being processed (for Toolbox-style markup)
protected BTPictureInfo,SIL.FieldWorks.TE m_currBtPictureInfo
리턴 BTPictureInfo

m_currPictureInfo 보호되어 있는 프로퍼티

Information about the current picture being processed (for Toolbox-style markup)
protected ToolboxPictureInfo m_currPictureInfo
리턴 ToolboxPictureInfo

m_currSection 보호되어 있는 프로퍼티

Current section we are adding to
protected IScrSection m_currSection
리턴 IScrSection

m_currentRef 보호되어 있는 프로퍼티

Reference of current segment
protected BCVRef,SILUBS.SharedScrUtils m_currentRef
리턴 SILUBS.SharedScrUtils.BCVRef

m_existingAnnotations 보호되어 있는 프로퍼티

the set of annotations for the current book existing before import
protected Dictionary m_existingAnnotations
리턴 IScrScriptureNote>.Dictionary

m_fCurrentSectionIsIntro 보호되어 있는 프로퍼티

Indicates whether the current section being worked on is an intro section
protected bool m_fCurrentSectionIsIntro
리턴 bool

m_fFoundABook 보호되어 있는 프로퍼티

Gets set to true if a book is found during the import
protected bool m_fFoundABook
리턴 bool

m_fInBookTitle 보호되어 있는 프로퍼티

Currently processing a book title
protected bool m_fInBookTitle
리턴 bool

m_fInFootnote 보호되어 있는 프로퍼티

Currently processing a footnote
protected bool m_fInFootnote
리턴 bool

m_fInScriptureText 보호되어 있는 프로퍼티

We have begun processing actual Scripture text for the current book (as opposed to background materials, etc.) If true, the current section is a scripture text section. One implication of this distinction is that for Scripture sections, the caption bar will display the range of references.
protected bool m_fInScriptureText
리턴 bool

m_fInSectionHeading 보호되어 있는 프로퍼티

Currently processing a section heading
protected bool m_fInSectionHeading
리턴 bool

m_fInVerseTextParagraph 보호되어 있는 프로퍼티

Currently processing a paragraph whose context is ContextValues.Text and structure is StructureValues.Body.
protected bool m_fInVerseTextParagraph
리턴 bool

m_firstImportedRef 보호되어 있는 프로퍼티

the first imported reference
protected ScrReference m_firstImportedRef
리턴 ScrReference

m_iCurrFootnote 보호되어 있는 프로퍼티

The index of the next footnote to insert (for the current book)
protected int m_iCurrFootnote
리턴 int

m_iCurrSection 보호되어 있는 프로퍼티

Index of current section (0-based).
protected int m_iCurrSection
리턴 int

m_importCallbacks 보호되어 있는 프로퍼티

UI Callbacks
protected TeImportUi,SIL.FieldWorks.TE m_importCallbacks
리턴 TeImportUi

m_isDisposed 보호되어 있는 프로퍼티

True, if the object has been disposed.
protected bool m_isDisposed
리턴 bool

m_nBookNumber 보호되어 있는 프로퍼티

Current book number, based on cannonical order (e.g., Gen = 1)
protected int m_nBookNumber
리턴 int

m_prevRef 보호되어 있는 프로퍼티

Last (previous) reference found (typically equal to m_currentRef only at the start of the import process)
protected BCVRef,SILUBS.SharedScrUtils m_prevRef
리턴 SILUBS.SharedScrUtils.BCVRef

m_sPrevBook 보호되어 있는 프로퍼티

Previous book number (in a string)
protected string m_sPrevBook
리턴 string

m_savedVersionDescription 보호되어 있는 프로퍼티

The description to use if the user wants to make a saved version.
protected string m_savedVersionDescription
리턴 string

m_scr 보호되어 있는 프로퍼티

The data model Scripture object
protected IScripture m_scr
리턴 IScripture

m_scrBook 보호되어 있는 프로퍼티

Book we are currently adding to
protected IScrBook m_scrBook
리턴 IScrBook

m_sectionContent 보호되어 있는 프로퍼티

StText that is the section content
protected IStText m_sectionContent
리턴 IStText

m_sectionHeading 보호되어 있는 프로퍼티

StText that is the section heading
protected IStText m_sectionHeading
리턴 IStText

m_styleSheet 보호되어 있는 프로퍼티

Stylesheet used for importing
protected FwStyleSheet m_styleSheet
리턴 FwStyleSheet

m_ttpChapterNumber 보호되어 있는 프로퍼티

Text props for chapter number character style
protected ITsTextProps m_ttpChapterNumber
리턴 ITsTextProps

m_undoManager 보호되어 있는 프로퍼티

Info needed to undo, including the archived draft where we save existing books
protected UndoImportManager,SIL.FieldWorks.TE m_undoManager
리턴 SIL.FieldWorks.TE.UndoImportManager

m_wsAnal 보호되어 있는 프로퍼티

The writing system we use for all non-vernacular text.
protected int m_wsAnal
리턴 int

m_wsVern 보호되어 있는 프로퍼티

The writing system we use for all vernacular text.
protected int m_wsVern
리턴 int