jp.kuro.meteor.core.xml
クラス ParserImpl

java.lang.Object
  上位を拡張 jp.kuro.meteor.core.Kernel
      上位を拡張 jp.kuro.meteor.core.xml.ParserImpl
すべての実装されたインタフェース:
Parser

public class ParserImpl
extends Kernel
implements Parser

XML解析パーサ


フィールドの概要
 
クラス jp.kuro.meteor.core.Kernel から継承されたフィールド
_attributes, _attrName, _attrName1, _attrName2, _attrValue, _attrValue1, _attrValue2, _content, _elmName, _id, AND_1, AND_2, AP_1, AP_2, ASTERISK_1, ASTERISK_2, ATTR_EQ, BRAC_CLOSE_1, BRAC_CLOSE_2, BRAC_OPEN_1, BRAC_OPEN_2, CBRAC_CLOSE_1, CBRAC_CLOSE_2, CBRAC_OPEN_1, CBRAC_OPEN_2, CLEAN_1, CLEAN_2, COMMA_1, COMMA_2, counter, docType, DOL_1, DOL_2, DOUBLE_QUATATION, elementCache, elm_, EMPTY, EN_1, EN_2, ERASE_ATTR_1, GET_ATTR_1, GET_ATTRS_MAP, GT_1, GT_2, LT_1, LT_2, matcher, matcher1, matcher2, matcher_, pattern, pattern_1b, pattern_2, pattern_cc, pattern_get_attrs_map, PLUS_1, PLUS_2, position, position2, QMARK_1, QMARK_2, QO_2, res, res1, res2, result, root, SBRAC_CLOSE_1, SBRAC_CLOSE_2, SBRAC_OPEN_1, SBRAC_OPEN_2, sbuf, SEARCH_CX_1, SEARCH_CX_2, SEARCH_CX_3, SEARCH_CX_4, SEARCH_CX_5, SEARCH_CX_6, SET_ATTR_1, SET_CX_1, SET_CX_2, SET_CX_3, SET_CX_4, SET_MONO_1, SPACE, TAG_CLOSE, TAG_CLOSE2, TAG_CLOSE3, TAG_OPEN, TAG_OPEN3, TAG_OPEN4, TAG_SEARCH_1_1, TAG_SEARCH_1_2, TAG_SEARCH_1_3, TAG_SEARCH_1_4, TAG_SEARCH_1_4_2, TAG_SEARCH_2_1, TAG_SEARCH_2_1_2, TAG_SEARCH_2_2, TAG_SEARCH_2_2_2, TAG_SEARCH_2_3, TAG_SEARCH_2_3_2, TAG_SEARCH_2_3_2_2, TAG_SEARCH_2_4, TAG_SEARCH_2_4_2, TAG_SEARCH_2_4_2_2, TAG_SEARCH_2_4_2_3, TAG_SEARCH_2_4_3, TAG_SEARCH_2_4_3_2, TAG_SEARCH_2_4_4, TAG_SEARCH_2_6, TAG_SEARCH_2_7, TAG_SEARCH_3_1, TAG_SEARCH_3_1_2, TAG_SEARCH_3_1_2_2, TAG_SEARCH_3_2, TAG_SEARCH_3_2_2, TAG_SEARCH_3_2_2_2, TAG_SEARCH_4_1, TAG_SEARCH_4_2, TAG_SEARCH_4_3, TAG_SEARCH_4_4, TAG_SEARCH_4_5, TAG_SEARCH_4_6, TAG_SEARCH_4_7, TAG_SEARCH_4_7_2, TAG_SEARCH_NC_1_1, TAG_SEARCH_NC_1_2, TAG_SEARCH_NC_1_3, TAG_SEARCH_NC_1_4, TAG_SEARCH_NC_1_4_2, TAG_SEARCH_NC_2_1, TAG_SEARCH_NC_2_1_2, TAG_SEARCH_NC_2_2, TAG_SEARCH_NC_2_2_2, TAG_SEARCH_NC_2_3, TAG_SEARCH_NC_2_3_2, TAG_SEARCH_NC_2_3_2_2, TAG_SEARCH_NC_2_4, TAG_SEARCH_NC_2_4_2, TAG_SEARCH_NC_2_4_2_2, TAG_SEARCH_NC_2_4_2_3, TAG_SEARCH_NC_2_4_3, TAG_SEARCH_NC_2_4_3_2, TAG_SEARCH_NC_2_4_4, TAG_SEARCH_NC_2_6, TAG_SEARCH_NC_2_7, TAG_SEARCH_NC_3_1, TAG_SEARCH_NC_3_1_2, TAG_SEARCH_NC_3_1_2_2, TAG_SEARCH_NC_3_2, TAG_SEARCH_NC_3_2_2, TAG_SEARCH_NC_3_2_2_2, VLINE_1, VLINE_2
 
インタフェース jp.kuro.meteor.Parser から継承されたフィールド
HTML, HTML5, XHTML, XHTML5, XML
 
コンストラクタの概要
ParserImpl()
          デフォルトコンストラクタ
ParserImpl(Parser ps)
          コピーコンストラクタ
 
メソッドの概要
 java.lang.String attribute(Element elm, java.lang.String attrName)
          要素を属性名で検索し、属性値を得る
 Element attribute(Element elm, java.lang.String attrName, java.lang.String attrValue)
          要素の属性を編集する
 AttributeMap attributeMap(Element elm)
          属性マップを取得する
 java.lang.String content(Element elm)
          要素の内容を取得する
 Element content(Element elm, java.lang.String content)
          要素の内容をセットする
 Element content(Element elm, java.lang.String content, boolean entityRef)
          要素の内容をセットする
 Element cxTag(java.lang.String id)
          ID属性でCXタグを検索する
 Element cxTag(java.lang.String elmName, java.lang.String id)
          要素名とID属性でCX(コメント拡張)タグを検索する
 java.lang.String document()
          ドキュメントを取得する
 Element element(java.lang.String elmName)
          要素名で要素を検索する
 Element element(java.lang.String attrName, java.lang.String attrValue)
          属性(属性名="属性値")で要素を検索する
 Element element(java.lang.String elmName, java.lang.String attrName, java.lang.String attrValue)
          要素名と属性で要素を検索する
 Element element(java.lang.String attrName1, java.lang.String attrValue1, java.lang.String attrName2, java.lang.String attrValue2)
          属性1・属性2で要素を検索する
 Element element(java.lang.String elmName, java.lang.String attrName1, java.lang.String attrValue1, java.lang.String attrName2, java.lang.String attrValue2)
          要素名と属性1・属性2で要素を検索する
protected  java.lang.String escape(java.lang.String element)
          特殊文字(エンティティ参照)の置換
protected  java.lang.String escapeContent(java.lang.String element, java.lang.String elmName)
           
 void execute(Element elm, Hooker hook)
          フッククラスに処理を委譲する
 void execute(Element elm, Looper hook, java.util.List list)
          フッククラスに処理を委譲する
 void flush()
          反映する
 void parse(java.lang.String document)
          XMLドキュメントをパースする
 void read(java.lang.String filePath, java.lang.String encoding)
          ファイルを読み込み、パースする
 Element removeAttribute(Element elm, java.lang.String attrName)
          要素の属性を消す
 Element removeElement(Element elm)
          要素を消す
 RootElement rootElement()
          ルート要素を取得する
 void size(int size)
          フック時のスケールをセットする
protected  java.lang.String unescape(java.lang.String element)
           
protected  java.lang.String unescapeContent(java.lang.String element, java.lang.String elmName)
           
 
クラス jp.kuro.meteor.core.Kernel から継承されたメソッド
_elementWithout_3_1, _elementWithout_5_1, attributeMap, clean, create, docType, document, editAttributes_, editDocument_, editDocument_, element, elementCache, elementWith_3_1, elementWith_3_2, elementWith_5_1, elementWith_5_2, elementWith, elementWithout_3, elementWithout_5, elementWithout, escapeRegex, find, getAttributeValue_, getCharacterEncoding, isMatch, isMatch, isMatch, setCharacterEncoding
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
インタフェース jp.kuro.meteor.Parser から継承されたメソッド
attributeMap, docType, element, elementCache, find
 

コンストラクタの詳細

ParserImpl

public ParserImpl()
デフォルトコンストラクタ


ParserImpl

public ParserImpl(Parser ps)
コピーコンストラクタ

パラメータ:
ps - HTMLParserオブジェクト
メソッドの詳細

read

public final void read(java.lang.String filePath,
                       java.lang.String encoding)
ファイルを読み込み、パースする

オーバーライド:
クラス Kernel 内の read
パラメータ:
filePath - 入力ファイルの絶対パス
encoding - 入力ファイルの文字コード

parse

public final void parse(java.lang.String document)
XMLドキュメントをパースする

パラメータ:
document - XMLドキュメント

rootElement

public final RootElement rootElement()
ルート要素を取得する

定義:
インタフェース Parser 内の rootElement
オーバーライド:
クラス Kernel 内の rootElement
戻り値:
ルート要素

size

public final void size(int size)
フック時のスケールをセットする

オーバーライド:
クラス Kernel 内の size
パラメータ:
size - フック時のスケール

document

public final java.lang.String document()
ドキュメントを取得する

定義:
インタフェース Parser 内の document
オーバーライド:
クラス Kernel 内の document
戻り値:
ドキュメント

element

public final Element element(java.lang.String elmName)
要素名で要素を検索する

定義:
インタフェース Parser 内の element
オーバーライド:
クラス Kernel 内の element
パラメータ:
elmName - 要素名
戻り値:
要素

element

public final Element element(java.lang.String elmName,
                             java.lang.String attrName,
                             java.lang.String attrValue)
要素名と属性で要素を検索する

定義:
インタフェース Parser 内の element
オーバーライド:
クラス Kernel 内の element
パラメータ:
elmName - 要素名
attrName - 属性名
attrValue - 属性値
戻り値:
要素

element

public final Element element(java.lang.String attrName,
                             java.lang.String attrValue)
クラス Kernel の記述:
属性(属性名="属性値")で要素を検索する

定義:
インタフェース Parser 内の element
オーバーライド:
クラス Kernel 内の element
パラメータ:
attrName - 属性名
attrValue - 属性値
戻り値:
要素

element

public final Element element(java.lang.String elmName,
                             java.lang.String attrName1,
                             java.lang.String attrValue1,
                             java.lang.String attrName2,
                             java.lang.String attrValue2)
要素名と属性1・属性2で要素を検索する

定義:
インタフェース Parser 内の element
オーバーライド:
クラス Kernel 内の element
パラメータ:
elmName - 要素名
attrName1 - 属性名1
attrValue1 - 属性値1
attrName2 - 属性名2
attrValue2 - 属性値2
戻り値:
要素

element

public final Element element(java.lang.String attrName1,
                             java.lang.String attrValue1,
                             java.lang.String attrName2,
                             java.lang.String attrValue2)
属性1・属性2で要素を検索する

定義:
インタフェース Parser 内の element
オーバーライド:
クラス Kernel 内の element
パラメータ:
attrName1 - 属性名1
attrValue1 - 属性値1
attrName2 - 属性名2
attrValue2 - 属性値2
戻り値:
要素

attribute

public final Element attribute(Element elm,
                               java.lang.String attrName,
                               java.lang.String attrValue)
要素の属性を編集する

定義:
インタフェース Parser 内の attribute
オーバーライド:
クラス Kernel 内の attribute
パラメータ:
elm - 要素
attrName - 属性名
attrValue - 属性値
戻り値:
要素

attribute

public final java.lang.String attribute(Element elm,
                                        java.lang.String attrName)
要素を属性名で検索し、属性値を得る

定義:
インタフェース Parser 内の attribute
オーバーライド:
クラス Kernel 内の attribute
パラメータ:
elm - 要素
attrName - 属性名
戻り値:
属性値

attributeMap

public final AttributeMap attributeMap(Element elm)
属性マップを取得する

定義:
インタフェース Parser 内の attributeMap
オーバーライド:
クラス Kernel 内の attributeMap
パラメータ:
elm - 要素
戻り値:
属性マップ

removeAttribute

public final Element removeAttribute(Element elm,
                                     java.lang.String attrName)
要素の属性を消す

定義:
インタフェース Parser 内の removeAttribute
オーバーライド:
クラス Kernel 内の removeAttribute
パラメータ:
elm - 要素
attrName - 属性名
戻り値:
要素

content

public final Element content(Element elm,
                             java.lang.String content)
要素の内容をセットする

定義:
インタフェース Parser 内の content
オーバーライド:
クラス Kernel 内の content
パラメータ:
elm - 要素
content - 要素の内容
戻り値:
要素

content

public final Element content(Element elm,
                             java.lang.String content,
                             boolean entityRef)
要素の内容をセットする

定義:
インタフェース Parser 内の content
オーバーライド:
クラス Kernel 内の content
パラメータ:
elm - 要素
content - 要素の内容
entityRef - エンティティ参照フラグ
戻り値:
要素

content

public final java.lang.String content(Element elm)
要素の内容を取得する

定義:
インタフェース Parser 内の content
オーバーライド:
クラス Kernel 内の content
パラメータ:
elm - 要素
戻り値:
要素の内容

removeElement

public final Element removeElement(Element elm)
要素を消す

定義:
インタフェース Parser 内の removeElement
オーバーライド:
クラス Kernel 内の removeElement
パラメータ:
elm - 要素
戻り値:
要素

cxTag

public final Element cxTag(java.lang.String elmName,
                           java.lang.String id)
インタフェース Parser の記述:
要素名とID属性でCX(コメント拡張)タグを検索する

定義:
インタフェース Parser 内の cxTag
オーバーライド:
クラス Kernel 内の cxTag
パラメータ:
elmName - 要素名
id - 識別名
戻り値:
要素

cxTag

public final Element cxTag(java.lang.String id)
ID属性でCXタグを検索する

定義:
インタフェース Parser 内の cxTag
オーバーライド:
クラス Kernel 内の cxTag
パラメータ:
id - ID属性値
戻り値:
要素

flush

public final void flush()
反映する

定義:
インタフェース Parser 内の flush
オーバーライド:
クラス Kernel 内の flush

execute

public void execute(Element elm,
                    Hooker hook)
フッククラスに処理を委譲する

定義:
インタフェース Parser 内の execute
オーバーライド:
クラス Kernel 内の execute
パラメータ:
elm - 要素
hook - Hookerオブジェクト

execute

public void execute(Element elm,
                    Looper hook,
                    java.util.List list)
フッククラスに処理を委譲する

定義:
インタフェース Parser 内の execute
オーバーライド:
クラス Kernel 内の execute
パラメータ:
elm - 要素
hook - Hookerオブジェクト
list - Listオブジェクト

escape

protected final java.lang.String escape(java.lang.String element)
特殊文字(エンティティ参照)の置換

定義:
クラス Kernel 内の escape
パラメータ:
element - 入力文字列
戻り値:
出力文字列

escapeContent

protected final java.lang.String escapeContent(java.lang.String element,
                                               java.lang.String elmName)
定義:
クラス Kernel 内の escapeContent
パラメータ:
element - 入力文字列
elmName - 要素名
戻り値:
出力文字列

unescape

protected final java.lang.String unescape(java.lang.String element)
定義:
クラス Kernel 内の unescape
パラメータ:
element - 入力文字列
戻り値:
出力文字列

unescapeContent

protected final java.lang.String unescapeContent(java.lang.String element,
                                                 java.lang.String elmName)
定義:
クラス Kernel 内の unescapeContent
パラメータ:
element - 入力文字列
elmName - 要素名
戻り値:
出力文字列