Skip navigation links
EDB/Java
jp.ac.tokushima_u.edb

Class EdbDocSpi<C extends EdbDocSpi.ContentPrinterContext>

  • Direct Known Subclasses:
    CSV, DOCX, EdbDocUSS, HTML, PLAIN, POISS, TeX, XML


    public abstract class EdbDocSpi<C extends EdbDocSpi.ContentPrinterContext>
    extends Object
    特定のデータ形式の情報を出力するドキュメント生成エンジンのインターフェースを定義します.
    Version:
    $Id: EdbDocSpi.java,v 1.41 2022/10/19 05:57:58 alex Exp $
    • Constructor Detail

      • EdbDocSpi

        public EdbDocSpi()
    • Method Detail

      • engineInitialize

        void engineInitialize(EDB ec,
                              EdbDoc doc)
      • append

        protected final int append(byte[] b)
      • append

        protected final int append(int cp)
      • isMath

        protected final boolean isMath()
      • isMathImplicit

        protected final boolean isMathImplicit()
      • isMathExplicit

        protected final boolean isMathExplicit()
      • mathLeave

        protected final void mathLeave()
      • engineGetDML

        public abstract String engineGetDML()
        DML を取得します.
        Returns:
        DML を返します.
        See Also:
        EdbDoc.getDML()
      • engineGetDMLSet

        public Set<String> engineGetDMLSet()
        DMLの階層化セットを取得します.
        Returns:
        DMLの階層化セット.
        See Also:
        engineGetDML()
      • engineGetDefaultFileExtension

        public abstract String engineGetDefaultFileExtension()
        デフォルトのファイル拡張子を取得します.
        Returns:
        デフォルトのファイル拡張子を返します.
      • engineMathEnter

        protected void engineMathEnter()
        数式モードに入ります.
      • engineMathLeave

        protected void engineMathLeave()
        数式から出ます.
      • enginePutc

        protected abstract void enginePutc(int c)
        エンジンが扱う形式で指定された文字をプットします.
        Parameters:
        c - 文字
      • enginePuts

        protected final void enginePuts(CharSequence s)
        エンジンが扱う形式で指定された文字列をプットします.
        Parameters:
        s - 文字
        See Also:
        EdbDoc.puts(CharSequence)
      • engineTextPutc

        protected abstract void engineTextPutc(int cp)
        エンジンが扱う形式で指定されたテキスト文字をプットします.
        Parameters:
        cp - テキスト文字
      • engineTextParse

        protected abstract void engineTextParse(int cp,
                                                CharSequence s)
        テキスト文字列のプット中にエスケープシーケンスが見つかったときに呼び出されます.
        Parameters:
        cp - エスケープシーケンスの意味を表す文字
        s - エスケープシーケンスに繋げられた引数
      • engineTextPuts

        protected final void engineTextPuts(CharSequence s)
        エンジンが扱う形式で指定されたテキスト文字をプットします.
        Parameters:
        s - テキスト文字列
        See Also:
        EdbDoc.textPuts(CharSequence)
      • engineTextPuts3

        protected final void engineTextPuts3(CharSequence l,
                                             CharSequence s,
                                             CharSequence t)
        エンジンが扱う形式で指定されたテキスト文字をプットします.
        Parameters:
        l - 前置文字列
        s - テキスト文字列
        t - 後置文字列
      • enginePutComment

        protected abstract void enginePutComment(CharSequence s)
        エンジンが扱う形式で指定されたコメントをプットします.
        Parameters:
        s - コメント
      • engineCreateSMGBegin

        protected EdbDoc.Content engineCreateSMGBegin()
        エンジンが扱う形式で SMG ( 姓・ミドルネーム・名 ) の区間開始のコンテンツを作成します.
        Returns:
        Content
        See Also:
        EdbDoc.NameSMG
      • engineCreateSMGDelimiter

        protected EdbDoc.Content engineCreateSMGDelimiter(boolean v)
        エンジンが扱う形式で SMG ( 姓・ミドルネーム・名 ) の区切りのコンテンツを作成します.
        Parameters:
        v - 表示するかどうか
        Returns:
        Content
        See Also:
        EdbDoc.NameSMG
      • engineCreateSMGEnd

        protected EdbDoc.Content engineCreateSMGEnd()
        エンジンが扱う形式で SMG ( 姓・ミドルネーム・名 ) の区間終了のコンテンツを作成します.
        Returns:
        Content
        See Also:
        EdbDoc.NameSMG
      • engineCreateGMSBegin

        protected EdbDoc.Content engineCreateGMSBegin()
        エンジンが扱う形式で GMS ( 名・ミドルネーム・姓 ) の区間開始のコンテンツを作成します.
        Returns:
        Content
        See Also:
        EdbDoc.NameGMS
      • engineCreateGMSDelimiter

        protected EdbDoc.Content engineCreateGMSDelimiter(boolean v)
        エンジンが扱う形式で GMS ( 名・ミドルネーム・姓 ) の区切りのコンテンツを作成します.
        Parameters:
        v - 表示するかどうか
        Returns:
        Content
        See Also:
        EdbDoc.NameGMS
      • engineCreateGMSEnd

        protected EdbDoc.Content engineCreateGMSEnd()
        エンジンが扱う形式で GMS ( 名・ミドルネーム・姓 ) の区間終了のコンテンツを作成します.
        Returns:
        Content
        See Also:
        EdbDoc.NameGMS
      • engineCreateAND

        protected EdbDoc.Content engineCreateAND()
        AND 文字列のコンテンツを返します.
        Returns:
        Content
        See Also:
        EdbDoc.ANDText
      • engineNewPage

        protected void engineNewPage()
        改ページ.
      • enginePutDocumentHeader

        protected abstract void enginePutDocumentHeader(CharSequence s)
        エンジンが扱う形式でドキュメントヘッダのコンテンツを作成します.
        Parameters:
        s - タイトル
        See Also:
        EdbDoc.putDocumentHeader(CharSequence)
      • enginePutDocumentTrailer

        protected abstract void enginePutDocumentTrailer()
        エンジンが扱う形式でドキュメントトレイラのコンテンツを作成します.
        See Also:
        EdbDoc.putDocumentTrailer()
      • engineListingBegin

        protected abstract void engineListingBegin(boolean o)
        リスティングの区間を開始します.
        Parameters:
        o - 番号付かどうか
      • engineListingEnd

        protected abstract void engineListingEnd(boolean o)
        リスティングの区間を終了します.
        Parameters:
        o - 番号付かどうか.開始時のものと同じ値を指定
      • engineListingTitle

        protected void engineListingTitle(CharSequence name)
        リスティングのタイトルをセットします.
        Parameters:
        name - タイトル.
      • engineListingItemBegin

        protected abstract void engineListingItemBegin(CharSequence s)
        リスティング項目の区間を開始します.
        Parameters:
        s - リスティング番号
      • engineListingItemEnd

        protected abstract void engineListingItemEnd(CharSequence s)
        リスティング項目の区間を終了します.
        Parameters:
        s - リスティング番号
      • engineParagraphBegin

        protected void engineParagraphBegin()
      • engineParagraphEnd

        protected void engineParagraphEnd()
      • engineTableBegin

        protected void engineTableBegin(int cols)
        Begin Table.
        Parameters:
        cols - カラム数
      • engineTableBegin

        protected void engineTableBegin()
      • engineTableEnd

        protected void engineTableEnd()
        End Table.
      • engineTableHeaderBegin

        protected void engineTableHeaderBegin()
        Begin Table Header.
      • engineTableHeaderEnd

        protected void engineTableHeaderEnd()
        End Table Header.
      • engineTableBodyBegin

        protected void engineTableBodyBegin()
        Begin Table Body.
      • engineTableBodyEnd

        protected void engineTableBodyEnd()
        End Table Body.
      • engineTableRowBegin

        protected void engineTableRowBegin()
        Begin Table Row.
      • engineTableRowEnd

        protected void engineTableRowEnd()
        End Table Row.
      • engineTableCellBegin

        protected void engineTableCellBegin()
        Begin Table Cell.
      • engineTableCellEnd

        protected void engineTableCellEnd()
        End Table Cell.
      • engineTableTitle

        protected void engineTableTitle(CharSequence title)
        set Table Title
        Parameters:
        title - タイトル
      • engineColorBegin

        protected void engineColorBegin(int fgc)
        色付き文字の区間を開始します.
        Parameters:
        fgc - 文字色.24bit RGB
      • engineColorEnd

        protected void engineColorEnd()
        色付き文字の区間を終了します.
      • engineUnderlineBegin

        protected void engineUnderlineBegin()
        下線付き文字の区間を開始します.
      • engineUnderlineEnd

        protected void engineUnderlineEnd()
        下線付き文字の区間を終了します.
      • engineLineThroughBegin

        protected void engineLineThroughBegin()
        LineThough文字の区間を開始します.
      • engineLineThroughEnd

        protected void engineLineThroughEnd()
        LineThough文字の区間を終了します.
      • engineBoldBegin

        protected void engineBoldBegin()
        太字の区間を開始します.
      • engineBoldEnd

        protected void engineBoldEnd()
        太字の区間を終了します.
      • engineItalicBegin

        protected void engineItalicBegin()
        イタリック体文字の区間を開始します.
      • engineItalicEnd

        protected void engineItalicEnd()
        イタリック体文字の区間を終了します.
      • engineCreateEMAIL

        protected EdbDoc.Content engineCreateEMAIL(CharSequence s)
        エンジンが扱う形式で指定されたメールアドレスのコンテキストを返します.
        Parameters:
        s - メールアドレス
        Returns:
        Content
        See Also:
        EdbDoc.EMailText
      • engineCreateURL

        protected EdbDoc.Content engineCreateURL(CharSequence s)
        エンジンが扱う形式で指定された URL のコンテントを返します.
        Parameters:
        s - URL文字列
        Returns:
        Content
        See Also:
        EdbDoc.URLText
      • engineCreateDATE

        protected EdbDoc.Content engineCreateDATE(EdbDate d,
                                                  EdbDate.FMT fmt)
        エンジンが扱う形式で指定された日付のコンテンツを返します.
        Parameters:
        d - 日付
        fmt - フォーマット,フォーマットの定数の値を指定
        Returns:
        Content
        See Also:
        EdbDoc.DateText, EdbDate.FMT
      • engineCreateDATE2

        protected EdbDoc.Content engineCreateDATE2(EdbDate2 period,
                                                   EdbDate.FMT fmt)
        エンジンが扱う形式で指定された期間のコンテンツを返します.
        Parameters:
        period - 期間.期間 ( 始まり ) ・期間 ( 終わり ) の配列
        fmt - フォーマット,フォーマットの定数の値を指定
        Returns:
        Content
        See Also:
        EdbDate.FMT, EdbDoc.Date2Text
      • engineCreatePageNumber

        protected EdbDoc.Content engineCreatePageNumber(String[] page,
                                                        boolean latin)
        エンジンが扱う形式で指定されたページ番号のコンテンツを返します.
        Parameters:
        page - ページ.ページ ( 始まり ) ・ページ ( 終わり ) の配列
        latin - 英語 (Latin) かどうか
        Returns:
        Content
        See Also:
        EdbDoc.PageNumberText
      • engineCreateMONETARY

        protected EdbDoc.Content engineCreateMONETARY(double money,
                                                      boolean latin)
        エンジンが扱う形式で指定された金額のコンテンツを返します.
        Parameters:
        money - 金額
        latin - 英語 (Latin) かどうか
        Returns:
        Content
        See Also:
        EdbDoc.MonetaryText
      • engineImportSpecialAttributes

        protected void engineImportSpecialAttributes(List<EdbDoc.Attribute> list)
      • enginePreProcessings

        protected void enginePreProcessings()
        前処理
        • (set attributes)
        • enginePreProcessings()
        • engineXXXBegin()
        • (print contents)
        • engineXXXEnd()
        • enginePostProcessings()
      • enginePostProcessings

        protected void enginePostProcessings()
      • createContext

        protected C createContext()
        プリンターのコンテキストを作成する.
        Returns:
        コンテキスト
      • duplicateContext

        protected C duplicateContext(C ctxt)
        プリンターコンテキストの複製を作成する.
        Parameters:
        ctxt - 複製されるコンテキスト
        Returns:
        複製されたコンテキスト
      • printContainerContents

        protected void printContainerContents(EdbDoc.Container con)
      • enginePrint

        protected final void enginePrint(EdbDoc.Content content)
        Contentを出力する.
        Parameters:
        content - Content.
      • enginePrintContent

        protected void enginePrintContent(EdbDoc.Content content)
        Contentを出力する.
        Parameters:
        content - Content.
EDB/Java

EDB Working Group at Tue Jun 10 17:08:59 JST 2025