Toolsパッケージには、Oracle XMLツールの作成とインスタンス化に関連した型とインタフェースが含まれます。
この章の内容は次のとおりです。
|
関連項目:
|
表7-1にToolsパッケージのデータ型の概要を示します。
Factoryツールの例外です。
定義
typedef enum FactoryExceptionCode {
FACTORY_UNDEFINED_ERR = 0,
FACTORY_OTHER_ERR = 1
} FactoryExceptionCode;
表7-2にFactoryインタフェースで使用できるメソッドの概要を示します。
表7-2 Factoryメソッドの概要: ツール・パッケージ
| 関数 | 概要 |
|---|---|
|
|
コンストラクタです。 |
|
|
DOMパーサーを作成します。 |
|
|
SAXパーサーを作成します。 |
|
|
スキーマ・バリデータを作成します。 |
|
|
拡張XPathプロセッサを作成します。 |
|
|
XPathコンパイラを作成します。 |
|
|
XPathプロセッサを作成します。 |
|
|
XPointerプロセッサを作成します。 |
|
|
Xslコンパイラを作成します。 |
|
createXslExtendedTransformer() |
XSL拡張トランスフォーマを作成します。 |
|
|
XSLトランスフォーマを作成します。 |
|
|
ファクトリのコンテキストを取得します。 |
|
|
デフォルトのデストラクタです。 |
クラス・コンストラクタです。
| 構文 | 説明 |
|---|---|
Factory() throw (FactoryException); |
デフォルトのコンストラクタです |
Factory( Context* ctx_ptr) throw (FactoryException); |
コンテキスト・オブジェクトを指定してファクトリ・オブジェクトを作成します。 |
| パラメータ | 説明 |
|---|---|
ctx_ptr |
コンテキスト・オブジェクトへのポインタ |
戻り値
(Factory) オブジェクト
DOMパーサーを作成します。
構文
DOMParser< Context, Node>* createDOMParser ( DOMParserIdType id_type, Context* ctx_ptr = NULL) throw (FactoryException);
| パラメータ | 説明 |
|---|---|
id_type |
パーサーIDの型 |
ctx_ptr |
コンテキスト・オブジェクトへのポインタ |
戻り値
(DOMParser*) パーサー・オブジェクトへのポインタ。
SAXパーサーを作成します。
構文
SAXParser< Context>* createSAXParser ( SAXParserIdType id_type, Context* ctx_ptr = NULL) throw (FactoryException);
| パラメータ | 説明 |
|---|---|
id_type |
パーサーIDの型 |
ctx_ptr |
コンテキスト・オブジェクトへのポインタ |
戻り値
(SAXParser*) パーサー・オブジェクトへのポインタ。
スキーマ・バリデータを作成します。
構文
SchemaValidator< Node>* createSchemaValidator ( SchValidatorIdType id_type, Context* ctx_ptr = NULL) throw (FactoryException);
| パラメータ | 説明 |
|---|---|
id_type |
バリデータIDの型 |
ctx_ptr |
コンテキスト・オブジェクトへのポインタ |
戻り値
(SchemaValidator*) バリデータ・オブジェクトへのポインタ。
拡張XPathプロセッサを作成します。値XvmPrCXmlのみをとります。
構文
CompProcessor< Context, Node>* createXPathCompProcessor ( XPathPrIdType id_type, Context* ctx_ptr = NULL) throw (FactoryException);
| パラメータ | 説明 |
|---|---|
id_type |
プロセッサIDの型 |
ctx_ptr |
コンテキスト・オブジェクトへのポインタ |
戻り値
(CompProcessor*) プロセッサ・オブジェクトへのポインタ。
XPathコンパイラを作成します。
構文
XPath::Compiler< Context, Node>* createXPathCompiler ( XPathCompIdType id_type, Context* ctx_ptr = NULL) throw (FactoryException);
| パラメータ | 説明 |
|---|---|
id_type |
コンパイラIDの型 |
ctx_ptr |
コンテキスト・オブジェクトへのポインタ |
戻り値
(XpathCompiler*) コンパイラ・オブジェクトへのポインタ。
XPathプロセッサを作成します。
構文
XPath::Processor< Context, Node>* createXPathProcessor ( XPathPrIdType id_type, Context* ctx_ptr = NULL) throw (FactoryException);
| パラメータ | 説明 |
|---|---|
id_type |
プロセッサIDの型 |
ctx_ptr |
コンテキスト・オブジェクトへのポインタ |
戻り値
(Processor*) プロセッサ・オブジェクトへのポインタ。
XPointerプロセッサを作成します。
構文
XPointer::Processor< Context, Node>* createXPointerProcessor ( XppPrIdType id_type, Context* ctx_ptr = NULL) throw (FactoryException);
| パラメータ | 説明 |
|---|---|
id_type |
プロセッサIDの型 |
ctx_ptr |
コンテキスト・オブジェクトへのポインタ |
戻り値
(Processor*) プロセッサ・オブジェクトへのポインタ。
Xslコンパイラを作成します。
構文
Xsl::Compiler< Context, Node>* createXslCompiler ( XslCompIdType id_type, Context* ctx_ptr = NULL) throw (FactoryException);
| パラメータ | 説明 |
|---|---|
id_type |
コンパイラIDの型 |
ctx_ptr |
コンテキスト・オブジェクトへのポインタ |
戻り値
(Compiler*) コンパイラ・オブジェクトへのポインタ。
XSL拡張transformerを作成します。値XvmTrCXmlのみをとります。
構文
CompTransformer< Context, Node>* createXslExtendedTransformer ( XslTrIdType id_type, Context* ctx_ptr = NULL) throw (FactoryException);
| パラメータ | 説明 |
|---|---|
id_type |
トランスフォーマIDの型 |
ctx_ptr |
コンテキスト・オブジェクトへのポインタ |
戻り値
(CompTrasformer*) トランスフォーマ・オブジェクトへのポインタ。
XSLトランスフォーマを作成します。
構文
Transformer< Context, Node>* createXslTransformer ( XslTrIdType id_type, Context* ctx_ptr = NULL) throw (FactoryException);
| パラメータ | 説明 |
|---|---|
id_type |
トランスフォーマIDの型 |
ctx_ptr |
コンテキスト・オブジェクトへのポインタ |
戻り値
(Trasformer*) トランスフォーマ・オブジェクトへのポインタ。
ファクトリのコンテキストを戻します。
構文
Context* getContext() const;
戻り値
(Context*) コンテキスト・オブジェクトへのポインタ。
デフォルトのデストラクタです。
構文
~Factory();
表7-3にFactoryExceptionインタフェースで使用できるメソッドの概要を示します。
表7-3 FactoryExceptionメソッドの概要: ツール・パッケージ
| 関数 | 概要 |
|---|---|
|
|
例外に埋め込まれたOracle XMLエラー・コードを取得します。 |
|
|
例外に埋め込まれたFactoryExceptionコードを取得します。 |
|
|
エラー・メッセージの現在の言語(エンコーディング)を取得します。 |
|
|
Oracle XMLエラー・メッセージを取得します。 |
例外に埋め込まれたOracle XMLエラー・コードを取得します。XmlExceptionから継承された仮想メンバー関数です。
構文
virtual unsigned getCode() const = 0;
戻り値
(unsigned) 数値のエラー・コード(正常に終了した場合は0)。
これは実行時の例外状況の、FactoryExceptionCodeで定義されたツール名前空間に固有の例外コードを戻す、実装で定義済のメンバー関数のプロトタイプを定義する仮想メンバー関数です。
構文
virtual FactoryExceptionCode getFactoryCode() const = 0;
戻り値
(FactoryExceptionCode) 例外コード
XmlExceptionから継承された仮想メンバー関数です。
構文
virtual oratext* getMesLang() const = 0;
戻り値
(oratext*) エラー・メッセージの現在の言語(エンコーディング)。
XmlExceptionから継承された仮想メンバー関数です。
構文
virtual oratext* getMessage() const = 0;
戻り値
(oratext *) エラー・メッセージ