JP2004530225A - System and method for mapping between software objects and document-based structured language elements - Google Patents

System and method for mapping between software objects and document-based structured language elements Download PDF

Info

Publication number
JP2004530225A
JP2004530225A JP2003504271A JP2003504271A JP2004530225A JP 2004530225 A JP2004530225 A JP 2004530225A JP 2003504271 A JP2003504271 A JP 2003504271A JP 2003504271 A JP2003504271 A JP 2003504271A JP 2004530225 A JP2004530225 A JP 2004530225A
Authority
JP
Japan
Prior art keywords
document
structured language
mapping
xml
language element
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003504271A
Other languages
Japanese (ja)
Inventor
ベイシーゲル、マイケル
グリーン、ジョン、エイチ
ワーフィールド、ジェイ、ダブリュー
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
International Business Machines Corp
Original Assignee
International Business Machines Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by International Business Machines Corp filed Critical International Business Machines Corp
Publication of JP2004530225A publication Critical patent/JP2004530225A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/14Tree-structured documents
    • G06F40/143Markup, e.g. Standard Generalized Markup Language [SGML] or Document Type Definition [DTD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/151Transformation
    • G06F40/154Tree transformation for tree-structured or markup documents, e.g. XSLT, XSL-FO or stylesheets
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/226Validation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Stored Programmes (AREA)
  • Devices For Executing Special Programs (AREA)
  • Document Processing Apparatus (AREA)

Abstract

【課題】文書(たとえばXML文書)とソフトウェア・オブジェクト(たとえばJava(R)オブジェクト)の間のマッピングの共通フレームワークを提供する方法およびシステムを提供すること。
【解決手段】このフレームワークでは、マッピングに関してプロパティがどのように得られるかをマスクするハンドラが使用される。これによって、マッピングの両方の方向で共通の外見を有するマッピング・コードがもたらされる。XML文書の要素とJava(R)オブジェクトのプロパティの間のマッピングが、マッパに含まれる。マッパによって、パーサ(104)(DOMまたはSAXなど)を使用して、XML文書(108)からオブジェクト(110)にマッピングされる。他の方向でのマッピング(Java(R)からXML)は、XML文書(118)の要素が、結果のXML文書(118)の有効性を保証する特定の順序で構築されることを必要とする。本発明は、たとえば、JSPを使用するXMLテンプレート文書を構築する。JSPベースのテンプレートを使用することによって、要素値および属性値を得るコールバックと共に、文書のタグをJSPで記述することが可能になる。さらに、内容を、バッファに向けるか、サーブレットの応答ストリームに直接に向けることができる。
【選択図】図2
A method and system for providing a common framework for mapping between documents (eg, XML documents) and software objects (eg, Java® objects).
The framework uses a handler to mask how properties are obtained for the mapping. This results in a mapping code that has a common appearance in both directions of the mapping. The mapping between the elements of the XML document and the properties of the Java object is included in the mapper. The mapper maps the XML document (108) to the object (110) using a parser (104) (such as DOM or SAX). Mapping in the other direction (from Java (R) to XML) requires that the elements of the XML document (118) be constructed in a particular order that guarantees the validity of the resulting XML document (118). . The present invention constructs an XML template document using, for example, JSP. The use of JSP-based templates allows document tags to be written in JSP, along with callbacks for obtaining element and attribute values. Further, the content can be directed to a buffer or directly to the servlet's response stream.
[Selection] Figure 2

Description

【技術分野】
【0001】
本発明は、ソフトウェア・オブジェクトと構造化言語要素文書の間の変換またはマッピングの分野に関し、具体的には、Java(R)オブジェクトなどのさまざまなソフトウェア・オブジェクトと拡張可能マークアップ言語(XML)文書の間のマッピングに関する。
【背景技術】
【0002】
拡張可能マークアップ言語(XML)は、特にウェブ文書用に設計された、標準汎用マークアップ言語(SGML)の縮小版である。XMLは、設計者が、自分自身のカスタマイズされたタグを作成することを可能とし、HTMLを用いては使用不能な機能性を提供する。たとえば、XMLでは、それぞれが1つの宛先だけを参照できるHTMLリンクではなく、複数の文書をさすリンクがサポートされる。
【0003】
XMLは、自己記述的なデータ(本明細書の説明では構造化言語要素とも称する)の形なので、リッチ・データ・モデルをエンコードするのに使用される。したがって、XMLは、異なるシステムの間のデータ交換媒体として有用である。データを、多数の種類のシステムすなわち、レガシーCOBOLプログラム、データベース、C++プログラムおよび類似物から、XMLとして抽出するか、パブリッシュすることができる。一般に遭遇するビジネス問題には、XML文書から他のデータ・フォーマットへおよびその逆で情報をどのようにマッピングするかを解決することが含まれる。たとえば、情報を企業間でXML文書で交換した後に、その情報を、データベース要求またはトランザクション要求を行う時に使用できるJava(R)オブジェクトにマッピングすることが必要になる場合がある。
【0004】
2000年9月26日にメルツァ(Meltzer)他に発行された米国特許第6125391号で、XML/Java(R)変換ツールの例が開示されている。XMLからJava(R)への変換のために、メルツァ他では、XML文書を構文解析し、イベントを発生させる。具体的に言うと、パーサが、XML文書をウォークスルーし、照会することができるツリー表現をメモリ内に作り、別のパーサが、XML文書をウォークし、文書に関する情報を伴うイベント(たとえば、文書開始イベント、要素の名前、要素の内容を伴う要素開始イベント、要素終了イベント、文書終了イベントなど)を発生させる。
【0005】
Java(R)からXMLへの変換について、メルツァ他では、各要素のアクセッサ(accessor)を含むコードを生成する。要素のアクセッサには、文字ごとにループするループが含まれる。ループには、文字が何であるかに基づいて処置を実行するswitchステートメントが含まれる。処置は、XML文書の要素断片を含むStringBufferを構築することである。メルツァ他の解決策は、Java(R)からXMLに変換するコードと共に動作するインフラストラクチャのサポートを提供しない。メルツァ他のコードのすべてが、生成されるコードであり、ユーザが編集する助けにはならない。
【特許文献1】
米国特許第6125391号
【発明の開示】
【発明が解決しようとする課題】
【0006】
その結果、標準的なツールを使用して効率的に実施できる、ソフトウェア・オブジェクトと構造化言語要素ベースの文書(たとえばXML)の間でのマッピングをサポートするマッピング・フレームワークの必要がある。
【課題を解決するための手段】
【0007】
上で要約した従来技術の欠点は、文書(たとえばXML文書)とソフトウェア・オブジェクト(たとえばJava(R)オブジェクト)の間のマッピングの共通フレームワークを提供する、本発明の例示的な方法およびシステムによって克服される。このフレームワークでは、マッピングのためにプロパティを得る方法をマスクするハンドラが使用される。これによって、両方向のマッピングについて共通の外見を有するマッピング・コードがもたらされる。XML文書の要素とJava(R)オブジェクトのプロパティの間のマッピングが、マッパー(mapper)に含まれる。マッパーによって、パーサ(Document Object Model(DOM)またはSimpleApplication Programming Interface(API)for XML(SAX)など)の使用を介したXML文書からソフトウェア・オブジェクトへのマッピングが行われる。
【0008】
他の方向(Java(R)からXML)へのマッピングは、結果のXML文書の有効性を保証するために、XML文書の要素が特定の順序で構築されることを必要とする。この有効性を保証するために、本発明の例示的実施形態では、たとえばJava(R)Server Pages(商標)(JSP)を使用してXMLテンプレート文書を構築する。JSPベースのテンプレートを使用することによって、要素値および属性値を得るコールバックと共に文書のタグをJSPに書き込めるようになる。JSPは、効率的なテンプレート作成を可能にするエディタ・サポートと共に、明確に文書化されている。さらに、内容を、バッファに向けるか、直接にサーブレット(servlet)の応答ストリームに向けることができる。本発明の1態様によれば、ソフトウェア・オブジェクトを表すデータ構造を、文書の構造化言語要素に変換するコンピュータ実施される方法であって、(a)構造化言語要素テンプレート文書を生成することと、(b)前記ソフトウェア・オブジェクトから、前記文書の前記構造化言語要素に関連するプロパティを読み取ることと、(c)前記プロパティを使用して、前記プロパティと前記構造化言語要素との間の前記関連に基づいて、前記構造化言語要素によって定義される構成を得ることと、(d)前記構造化言語要素テンプレート文書に前記構成を移植することとを含むコンピュータ実施される方法が提供される。
【0009】
本発明のもう1つの態様によれば、文書の構造化言語要素を、ソフトウェア・オブジェクトを表すデータ構造に変換する、コンピュータ実施される方法であって、(a)前記文書の前記構造化言語要素のそれぞれを読み取ることと、(b)前記ソフトウェア・オブジェクトの前記データ構造によって定義される使用可能なプロパティの組から選択される、前記文書の構造化言語要素に関連するプロパティを決定することと、(c)前記ソフトウェア・オブジェクトを表す前記データ構造の前記プロパティに、前記文書からの構造化言語要素値を移植することとを含む、コンピュータ実施される方法が提供される。
【0010】
本発明のもう1つの態様によれば、プロパティを含むソフトウェア・オブジェクトを、構造化言語要素によって定義される文書に変換するシステムであって、(a)文書テンプレートと、(b)前記文書テンプレートによって行われるコール・バックに基づいて、前記文書の前記構造化言語要素の表現を提供するハンドラ・インターフェースと、(c)前記ハンドラ・インターフェースと通信して、前記ソフトウェア・オブジェクトのプロパティを前記文書によって認識される構造化言語要素に変換するマッピング・モジュールと、(d)前記マッピング・モジュールと通信して、ステップ(c)で生成される前記構造化言語要素を前記文書に書き込む出力ターゲット・クラスとを含むシステムが提供される。
【0011】
本発明のもう1つの態様によれば、構造化言語要素を含む文書をソフトウェア・オブジェクトに変換するシステムであって、(a)前記文書の特徴を表すイベントを得るパーサと、(b)前記文書を読み取る入力ソース・クラスと、(c)前記入力ソース・クラスと通信して、前記パーサによって得られる前記イベントについてバッファを実施するコンテント・ハンドラ・クラスと、(d)前記コンテント・ハンドラ・クラスと通信して、前記パーサによって得られる前記イベントを前記ソフトウェア・オブジェクトのプロパティに変換するマッピング・モジュールとを含むシステムが提供される。
【0012】
本発明のもう1つの態様によれば、プロパティを有するソフトウェア・オブジェクトを、構造化言語要素によって表される文書に変換する方法であって、(a)呼び出されるマッピング・インターフェースのインスタンスに前記ソフトウェア・オブジェクトを供給することと、(b)呼び出されるコンテナのインスタンスを使用してテンプレートをコンパイルし、実行することと、(c)前記コンパイルされたテンプレートを使用して、指定された出力ストリームに前記文書を書き込むこととを含む方法が提供される。
【0013】
本発明のもう1つの態様によれば、構造化言語要素を含む文書をソフトウェア・オブジェクトに変換する方法であって、(a)呼び出されるマッピング・インターフェースのインスタンスに前記文書を供給することと、(b)前記マッピング・インターフェースをコンテント・ハンドラとして登録することと、(c)呼び出されるパーサのインスタンスを使用して前記文書を構文解析することと、(d)前記ソフトウェア・オブジェクトに、前記マッピング・インターフェースに対して行われるコール・バックを介して前記文書から解析される前記構造化言語要素に関連するプロパティを移植することとを含む方法が提供される。
【0014】
本発明のもう1つの態様によれば、ソフトウェア・オブジェクトを表すデータ構造を、文書の構造化言語要素に変換するコンピュータ・プログラム製品であって、(a)構造化言語要素テンプレート文書を生成するコンピュータ可読プログラム・コード・デバイスと、(b)前記ソフトウェア・オブジェクトから、前記文書の前記構造化言語要素に関連するプロパティを読み取るコンピュータ可読プログラム・コード・デバイスと、前記プロパティが、(c)前記プロパティを使用して、前記プロパティと前記構造化言語要素との間の前記関連に基づいて、前記構造化言語要素によって定義される構成を得るコンピュータ可読プログラム・コード・デバイスと、(d)前記構造化言語要素テンプレート文書に前記構成を移植するコンピュータ可読プログラム・コード・デバイスとを含むコンピュータ・プログラム製品が提供される。
【0015】
本発明のもう1つの態様によれば、文書の構造化言語要素を、ソフトウェア・オブジェクトを表すデータ構造に変換するコンピュータ・プログラム製品であって、(a)前記文書の前記構造化言語要素のそれぞれを読み取るコンピュータ可読プログラム・コード・デバイスと、(b)前記ソフトウェア・オブジェクトの前記データ構造によって定義される使用可能なプロパティの組から選択される、前記文書の構造化言語要素に関連するプロパティを決定するコンピュータ可読プログラム・コード・デバイスと、(c)前記ソフトウェア・オブジェクトを表す前記データ構造の前記プロパティに、前記文書からの構造化言語要素値を移植するコンピュータ可読プログラム・コード・デバイスとを含むコンピュータ・プログラム製品が提供される。
【0016】
本発明の他の態様および特徴は、添付図面と共に本発明の特定の実施形態の以下の説明を再検討する時に、当業者に明白になる。
【0017】
本発明のさらなる特徴および長所を、添付図面と組み合わせて詳細な説明で説明する。
【発明を実施するための最良の形態】
【0018】
図1および関連する説明は、本発明を実施することができる適切なコンピューティング環境の例を表す。本発明を、パーソナル・コンピュータで動作するコンピュータ・プログラムのコンピュータ実行可能命令という全般的な文脈で説明するが、本発明は、他のプログラム・モジュールと組み合わせて実施することもできる。
【0019】
一般に、プログラム・モジュールには、特定のタスクを実行するか特定の抽象データ型を実施するルーチン、プログラム、コンポーネント、データ構造、および類似物が含まれる。さらに、本発明は、ハンドヘルド・デバイス、マルチプロセッサ・システム、マイクロプロセッサベースの民生用電子機器、プログラム可能な民生用電子機器、ミニコンピュータ、メインフレーム・コンピュータ、および類似物を含む、他のコンピュータ・システム構成を使用して実施することもできる。本発明は、通信ネットワークを介してリンクされたリモート処理装置によってタスクが実行される分散コンピューティング環境でも実施することができる。分散コンピューティング環境では、プログラム・モジュールを、ローカルおよびリモートの両方のメモリ・ストレージ・デバイスに配置することができる。
【0020】
図1に関して、例示的なシステム10に、普通のパーソナル・コンピュータ20が含まれ、パーソナル・コンピュータ20に、処理ユニット22、システム・メモリ24、およびシステム・メモリ24を含むさまざまなシステム構成要素を処理ユニット22に結合するシステム・バス26が含まれる。システム・バス26には、メモリ・バスまたはメモリ・コントローラ、周辺バス、およびさまざまな従来のバス・アーキテクチャ(たとえば、PCI、VESA、ISA、EISAなど)のいずれかを使用するローカル・バスを含む複数のタイプのバス構造が含まれる。
【0021】
システム・メモリ24に、読取専用メモリ(ROM)28およびランダム・アクセス・メモリ(RAM)30が含まれる。スタートアップ時などにコンピュータ20内の要素の間での情報転送を助ける基本ルーチンを含む基本入出力システム(BIOS)32が、ROM28に格納される。コンピュータ20には、ハード・ディスク・ドライブ34、磁気ディスク・ドライブ36(取外し可能ディスク38から読み取り、これに書き込む)、光ディスク・ドライブ40(CD−ROMディスク42を読み取るか、他の光媒体から読み取り、これに書き込む)も含まれる。ドライブ34、36、および40は、それぞれ、インターフェース44、46、および48によってシステム・バス26に接続される。
【0022】
ドライブ34、36、および40とそれに関連するコンピュータ可読媒体(38、42)によって、コンピュータ20のデータ、データ構造、およびコンピュータ実行可能命令の不揮発性ストレージが提供される。図1の記憶媒体は、単に例であり、コンピュータによって可読の他のタイプの媒体(たとえば、磁気カセット、フラッシュ・メモリ・カード、ディジタル・ビデオ・ディスクなど)を含めることが、当業者に既知である。
【0023】
オペレーティング・システム50、1つまたは複数のアプリケーション・プログラム52、他のプログラム・モジュール54、およびプログラム・データ56を含む複数のプログラム・モジュールを、ドライブ34、36、および40ならびにRAM30に保管することができる。ユーザは、キーボード58および入力装置60(たとえば、マウス、マイクロホン、ジョイスティック、ゲーム・パッド、衛星放送受信用パラボラ・アンテナ、スキャナなど)を介してコンピュータ20にコマンドおよび情報を入力することができる。これらの装置(58および60)は、システム・バス26に結合されたポート・インターフェース62(たとえば、シリアル・ポート、パラレル・ポート、ゲーム・ポート、universal serial bus(USB)など)を介して処理ユニット22に接続される。モニタ64または他のタイプのディスプレイ装置も、インターフェース66(たとえばビデオ・アダプタ)を介してバス26に接続される。
【0024】
コンピュータ20は、リモート・コンピュータ68などの1つまたは複数のリモート・コンピュータへの論理接続を使用して、ネットワーク化された環境で動作することができる。リモート・コンピュータ68は、サーバ、ルータ、ピア・デバイス、または他の一般的なネットワーク・ノードとすることができ、リモート・コンピュータ68には、通常は、コンピュータ20に関して説明した要素の多数またはすべてが含まれるが、図を簡単にするために、メモリ・ストレージ・デバイス70だけを図示した。図1に示された論理接続には、ローカル・エリア・ネットワーク(LAN)72および広域ネットワーク(WAN)74が含まれる。そのようなネットワーキング環境は、オフィス、会社全体のコンピュータ・ネットワーク、イントラネット、およびインターネットで一般的に使用されている。
【0025】
LANネットワーキング環境で使用される時に、コンピュータ20は、ネットワーク・インターフェースまたはネットワーク・アダプタ76を介してLAN72に接続される。WANネットワーキング環境で使用される時に、コンピュータ20に、通常は、インターネットなどのWAN74を介する通信を確立する、モデム78または他の手段が含まれる。モデム78は、内蔵または外付けとすることができるが、ポート・インターフェース62を介してバス26に接続される。ネットワーク化された環境では、コンピュータ20に関して示されたプログラム・モジュールまたはその一部を、リモート・メモリ・ストレージ・デバイス70に格納することができる。
【0026】
本発明の方法の議論は、XMLからJava(R)オブジェクトへおよびJava(R)オブジェクトからXMLへの変換/マッピングに関して基づく。他のデータ・フォーマットもサポートされる。たとえば、多数のレガシ・ビジネス・アプリケーションが、COBOL、C、およびPL1で記述されている。これらのアプリケーションは、CICS(商標)(汎用オンライン・トランザクション処理ソフトウェア)またはIMS(商標)(情報管理システム)などのエンタープライズ情報システム(EIS)に常駐するプログラムからなる。COBOLプログラムでは、入出力にCOBOL構造体が使用される。XMLからCOBOLへおよびCOBOLからXMLへのマッピングの必要がある。本発明を使用して、これらのマッピングを行うことができ、ここで、XML−オブジェクトXマッピング・ハンドラ(下で説明する)によって、XML文書からCOBOL構造体に移植され、オブジェクトX−XMLマッピング・ハンドラ(下で説明する)は、COBOL構造体からデータを抽出し、XML文書に移植するテンプレートによって使用される。
【0027】
背景として、本発明のマッピング方法では、下記の高水準プロセスを使用する:(a)レクサによって、文字を、特定のシステムによって認識可能な単語またはトークンにグループ化し(トークン化と称する)、(b)正しい言語構成を認識するために、パーサによって、トークンのグループを分析し、(c)コード・ジェネレータによって、正しい言語構成の組をとり、実行可能コードを生成する。(a)から(c)によって定義される機能を、混合することができる。
【0028】
たとえば、XMLからJava(R)オブジェクトへのマッピングについて、開始タグ、属性、終了タグ、および「CDATA」セクションなどの正しいXMLトークンを認識するために、XML文書の各文字が分析される。次に、トークンが正しいXML構成を形成することについて、トークンを検証しなければならない。最も基本的なレベルでは、タグ付けのすべてが、マッチする開始タグおよび終了タグを有し、属性が、開始タグ内で正しく構成されていることが検証される。文書型定義(DTD)またはXMLスキーマが使用可能な場合には、構文解析中に見つかったXML構成が、DTDまたはXMLスキーマに関して正しく、明確に形成されたXMLであることを保証することができる。最後に、XML文書に含まれるデータが、有用なこと(たとえばJava(R)オブジェクトへのマッピング)を達成するのに使用される。
【0029】
上で識別された作業の一部を、少なくとも部分的に、すぐに入手可能なXMLパーサによって実行することができる。XMLパーサによって、字句分析および構文解析の作業が処理される。構文解析標準規格の2つの例が、SAXおよびDOM APIである(SAXはSimple Application Programming Interface (API) for XML、DOMはDocumentObject Model)。
【0030】
SAXは、イベントベースである。SAXを実装するXMLパーサは、構文解析されるXML文書で見つかる異なる特徴に対応するイベントを生成する。DOM APIは、オブジェクトモデルベースAPIである。DOMを実装するXMLパーサは、XML文書の内容を表す汎用オブジェクト・モデルをメモリ内に作成する。XMLパーサが、構文解析を完了すると、メモリに、XML文書の構造および内容の両方に関する情報を提供するDOMオブジェクトのツリーが含まれる。
【0031】
図2に、本発明の実施形態によるフレームワーク100の概略図を示す。フレームワーク100は、図1のシステム10で実施できるサーブレットなどの統合コンポーネント102でインスタンス化されるものとして図示されている。統合コンポーネント102には、たとえばDOMまたはSAXを使用して実装され、XML−オブジェクト・マッピング・モジュール106と相互作用するパーサ104が含まれる。説明をわかりやすくするために、本発明の実施形態を説明する際に、SAXをパーサ104の例として述べる。
【0032】
XML−オブジェクト・マッピング・モジュール106によって、入力XML文書108が受け取られ、出力Java(R)オブジェクト110が生成される。統合コンポーネント102には、さらに、オブジェクト−XMLマッピング・モジュール114と通信するXML文書テンプレート・モジュール112(たとえば、Java(R)Server Pages(商標)すなわちJSP技術に基づく)が含まれる。オブジェクト−XMLマッピング・モジュール114によって、入力Java(R)オブジェクト116が受け取られ、出力XML文書118が生成される。
【0033】
XML−ソフトウェア・オブジェクト・マッピング
図2に関して、XML−オブジェクト・マッピング・モジュール106に、下記のコンポーネントが含まれる。
(a)入力XML文書108を実施する入力ソース・クラス106−1(XML2xInputSource)。
(b)パーサ104によって生成されるSAXイベントのバッファを実施するバッファード・コンテント・ハンドラ・クラス106−2(XML2xBufferedContentHandler)。
(c)マッピングを実行し、入力ターゲット・ストリームおよび出力ターゲットストリームをセットするマッピング・インターフェース106−3(XML2xMapping)。
(d)入力XML文書108から出力Java(R)オブジェクト110へのマッピングのメソッドを提供するマッピング・クラス106−4(XML2xMappingImpl)。
【0034】
さまざまなインターフェースおよびクラスのさらなる詳細を、下で説明する。用語「クラス」および「インターフェース」は、Java(R)では固有の意味を有する。Java(R)クラス(抽象、inner、またはfinal)は、特定のオブジェクトを定義するデータ・メンバおよびメソッドの集合であり、Java(R)インターフェースは、ある機能性をそれを実装するクラスに強制するのに使用される(すなわち、インターフェースによって、クラスが行わなければならないことが指定される)。インターフェースは、そのインターフェースを実装するクラスによって使用することができる定数を提供するのにも使用される。インターフェースには、定数変数宣言およびメソッド宣言が含まれるが、メソッドの実装は、インターフェースを実装するクラスに委ねられる。1つのクラスによって、任意の個数のインターフェースを実装することができる。
【0035】
表1に、入力ソース・クラス106−1(XML2xInputSource)の主要な関数を要約する(すなわち、網羅的ではない)。
【0036】
XML2xInputSourceは、XM文書をバイト・ストリーム、文字ストリーム、またはXML2xBufferedContentHandler 106−2から読み取ることができるようにするのに使用される。
【0037】
【表1】

Figure 2004530225
【0038】
表2に、バッファード・コンテント・ハンドラ・クラス106−2(XML2xBufferedContentHandler)の主要な関数を要約する(すなわち、網羅的でない)。ハンドラ・クラス106−2には、パーサ104からのSAXイベントをバッファリングするコンテント・ハンドラも含まれる。これによって、イベントを再生できるようになる。この特徴が有用になる場合の例が、XML文書の異なる部分について異なるマッピング・ハンドラが使用される場合である。実装の例が、Simple Object Access Protocol(SOAP)である。
【0039】
【表2】
Figure 2004530225
【0040】
SOAPは、非集中分散環境で情報を交換する軽量プロトコルである。SOAPは、XMLベースのプロトコルであり、(1)メッセージに含まれるものと、それを処理する方法を記述するフレームワークを定義するエンベロープと、(2)アプリケーション定義のデータ型のインスタンスを表すエンコーディング・ルールの組と、(3)リモート・プロシージャ呼出しおよび応答を表す規約、という3つの部分からなる。SOAPメッセージは、必須のSOAPエンベロープ、任意選択のSOAPヘッダ、および必須のSOAP本体からなるXML文書である。この状況では、エンベロープと本体に異なるマッピング・ハンドラを使用することが可能である。
【0041】
表3に、マッピング・インターフェース106−3(XML2xMapping)の主要な関数を要約する(すなわち、網羅的でない)。XML2xMappingによって、マッピングが実行され、InputStreamの構成が可能になる。
【0042】
【表3】
Figure 2004530225
【0043】
表4に、マッピング・クラス106−4(XML2xMappingImpl)の主要な関数を要約する(すなわち、網羅的でない)。クラスおよびインターフェースの定義に関して上で述べたように、XML2xMappingImplクラスは、直接に使用されるのではなく、マッピングの元の入力XML文書108およびマッピング先の出力Java(R)オブジェクト110の文書型定義に依存して、適当なメソッドに内容を追加されてサブクラス化される。
【0044】
【表4】
Figure 2004530225
【0045】
図3を参照すると、XML文書108をソフトウェア・オブジェクト110(たとえばJava(R) Bean)にマッピングするために実行される全般的なステップを示すメソッド300が示されており、これには下記が含まれる。
(a)ステップ302の、XMLからオブジェクトXへのマッピングを実施するためにマッピング・インターフェース106−4(たとえば、XML2XMapping)のインスタンスを取得することと、
(b)ステップ304で、マッピング・インターフェース106−4を呼び出し、ステップ306で、入力XML文書108を供給することと、
(c)ステップ308で、マッピング・インターフェース106−4によって、イベント・パーサのインスタンス(たとえばパーサ104)を取得し、ステップ310で、マッピング・インターフェース106−4をコンテント・ハンドラ(たとえばバッファード・コンテント・ハンドラ・クラス106−2)として登録することと、
(d)ステップ312で、XML文書108に対してパーサ104を呼び出す(すなわち、文書の構文解析を開始する)ことと、
(e)ステップ(d)が実行される時に、ステップ314で、さまざまなメソッド(たとえば、startDocument、startElement、characters、endElement、endDocumentなど)を呼び出す、マッピング・インターフェース106−4へのコール・バックを行うことと、
(f)ステップ316で、startDocumentメソッドまたはstartElementメソッドあるいはこの両方で、マッピング・インターフェース106−4によって、ソフトウェア・オブジェクト110を作成することと、
(g)ステップ318で、endElementメソッドで、マッピング・インターフェース106−4によって、ソフトウェア・オブジェクト110に要素をセットすること。
【0046】
上で説明したSAX APIには、当技術分野で既知の多数の仕様が含まれる。本発明は、「ContentHandler」インターフェースを実装するクラスの作成に関し、ContentHandlerインターフェースは、XML文書内で見つかる時にSAXイベントのプログラムを通知するためにXMLパーサによって使用されるコールバック・インターフェースである。このインターフェースは、XML2xBufferedContentHandlerクラス106−2およびXML2xInputSourceクラス106−1と共に使用される。SAX APIによって、「ContentHandler」インターフェースの「DefaultHandler」実装クラスも提供される。下で詳細に説明する例I「XML−Java(R)カスタマ」では、「DefaultHandler」を拡張して、カスタマXML文書からカスタマJava(R) Beanを生成する。
【0047】
例I
XML−Java(R)カスタマ
以下のコンポーネント(下で詳細に説明する)が、例Iの一部である。
(A)customer.xml 入力XML文書108のサンプルである。
(B)XML2CustomerMapping.java パーサ104がコール・バックするハンドラ・クラス106−2である。これには、カスタマ・オブジェクトを構成し、その値を確立する指示が含まれる。
(C)execute.java XMLからJava(R)へおよびJava(R)からXMLへ(下の例II)のマッピングを実行するのに使用されるマッピング・クラス/インターフェース106−3、106−4のプログラムである。
(D)customer.java 出力カスタマJava(R) Bean110である。
(E)CustomerSymbols.java 整数定数およびハッシュマップが含まれる。ハッシュマップは、タグの名前を、XML2CustomerMapping.java(R)で使用される整数定数にマッピングするのに使用される。
【0048】
A.入力XML文書(customer.xml)を下に示す。
Figure 2004530225
【0049】
B.簡潔にするために部分的に省略された、カスタマ・オブジェクトを構成し、値をセットするプログラム(XML2CustomerMapping.java)(すなわち、イベント・パーサがコール・バックするハンドラ)を下に示す。
Figure 2004530225
Figure 2004530225
Figure 2004530225
【0050】
C.簡潔にするために部分的に省略された、XMLからJava(R)へ(および、下の例IIで詳細に示されるように、Java(R)からXMLへ)のマッピングを実行するのに使用されるプログラム(execute.java)。
Figure 2004530225
Figure 2004530225
Figure 2004530225
【0051】
D.カスタマJava(R) Bean(customer.java)の詳細を下に示す。Java(R) Beanは、当技術分野で既知の標準設計アーキテクチャを厳守する再利用可能なコンポーネントである。Beanは、実行時に可視または不可視とすることができるクラス・オブジェクトである。Java(R)Beansによって、コンポーネント・アーキテクチャ、コンポーネント開発の標準フレームワークがもたらされる。
Figure 2004530225
Figure 2004530225
【0052】
例Iからわかるように、XMLからJava(R)へのマッピングは、パーサ104によって、開始タグ、要素タグ、および終了タグのすべてのイベントが処理され、イベントのトラッキングが改善されるので効率的である。
【0053】
もう1つの例として、カスタマの配列への単一のカスタマXML文書の拡張を検討されたい。カスタマ・ジャバ・ビーンズの配列を生成するには、下記の手順に従う。
(i)CustomersのstartElementを使用して、ベクトルを作成する。
(ii)各CustomerのstartElementで、Customerオブジェクトを作成する。
(iii)FirstName、LastName、およびCustIDのstartElementイベント、getElementイベント、およびendElementイベントを使用してCustomerオブジェクトに移植し、CustomerのendElementイベントを使用して、Customerオブジェクトをベクトルに挿入し、CustomersのendElementイベントを使用して、ベクトルからCustomersの配列を作成し、共に動作するJava(R)オブジェクトにセットする。
【0054】
パーサ104によって、再帰的XML構造(すなわち、リストのリストを表すXML要素)についてスタックが維持される。startElementごとに1つのオブジェクトが作成される。スタックを使用して、必要に応じて状態を保存することができる。子要素が作成されたならば、その子要素を親オブジェクトにセットすることができる。
【0055】
ソフトウェア・オブジェクト−XMLマッピング
図2に関して、オブジェクト−XMLマッピング・モジュール114に、下記のコンポーネントが含まれる。
(a)構文解析イベントを管理するハンドラ・インターフェース114−1(X2XMLHandler)
(b)マッピングおよび出力ターゲット・ストリームのセットを実行するマッピング・インターフェース114−2(X2XMLMapping)
(c)入力Java(R)オブジェクト116から出力XML文書118へのマッピングのメソッドを提供するマッピング・クラス114−3(X2XMLMappingImpl)
(d)出力XML文書118を実装する出力ターゲット・クラス114−4(X2XMLOutputTarget)
【0056】
表5に、ハンドラ・インターフェース114−1(X2XMLHandler)の主要な関数を要約する(すなわち、網羅的でない)。マッピング・モジュール114によって、インターフェース114−1が実装され、そのインスタンスがJSPコンテナに登録される。文書テンプレート112によって、要素の開始および終了などと要素値の入手のための基本的な文書関連イベントについてマッピング・モジュール114へのコール・バックが行われる。
【0057】
【表5】
Figure 2004530225
【0058】
一般に、コンテナは、ライフ・サイクル管理、セキュリティ、デプロイメント、および実行時サービスをコンポーネントに提供する実体である。コンテナには、コンポーネント固有のサービスを提供する多数の固有のタイプ(ウェブ、JSP、サーブレット、アプレットなど)がある。サーブレット・コンテナは、それを介して要求および応答が送られ、要求がデコードされ、応答がフォーマットされるネットワーク・サービスを提供するコンテナである。JSPコンテナは、サーブレット・コンテナと同一のサービスを提供するコンテナであり、JSPページを解釈し、サーブレットに処理するエンジンである。
【0059】
X2XMLHandler114−1によって、パーサ104によって作られる構文解析イベントに対する構文解析イベントのミラー(同一ではないが)イメージが提供される。効果的に、パーサ104によって提供される構造が、X2XMLからのパスにミラーリングされる。
【0060】
パーサ104が、SAXを使用して実装される時に、イベントが、それを処理するハンドラ106−2(すなわち、効果的にコールバック機構)によって受け取られる。この例では、ハンドラ106−2が、Java(R)クラスを移植するのに使用される。
【0061】
テンプレート112は、呼び出される時に、X2XMLHandlerインターフェース114−1をコール・バックする。ハンドラ114−1は、要求されたデータを取得し、構文解析の状態を維持することによって、コールバックを処理する。
【0062】
ハンドラ・インターフェース114−1は、XML−オブジェクト・マッピング・モジュール106によって実行されるさまざまな機能に関して類似するが、ある種の相違がある。要素名は、生成されるか手でコーディングされ、「ネームスペース」サポートを有するスキーマからは取られない。要素名を、要素ごとに一意にすることができる。したがって、startElementメソッドおよびendElementメソッドでは、nameパラメータだけが必要である。
【0063】
マッピングが、XML−オブジェクト・マッピング・モジュール106によって実行される時に、入力ソース・クラス106−1(すなわちXMLReader)によって、要素の名前がストリングとして返される。マッピング・クラス/インターフェース106−3、106−4では、要素名が、一意の番号と対にされる。この番号は、要素の処理を制御するために、switchステートメントで使用される。オブジェクト−XMLモジュール114では、要素名を整数定数として定義することによって、処理が最適化され、コーディング・アシスタンスが改善される。したがって、これらのメソッドへのコールバックでは、ストリングの代わりに整数定数が使用される。
【0064】
ハンドラ・インターフェース114−1のイベントの順序は、オブジェクト116自体の情報の順序の鏡像になる。
【0065】
XML文書テンプレート112(Java(R)Server Pages技術を使用して書き込まれる)では、下で詳細を示すコーディング・スタイルが使用される。JSP技術では、ユーザ・インターフェースが内容生成から分離され、基礎になる動的な内容を変更せずに、全体的なページ・レイアウトを変更できるようになる。Java(R)Server Pagesは、当業者に周知のJava(R)Servlet技術の拡張である。
【0066】
XML文書テンプレート112−JSPコーディング・スタイルの例
コールバックが、文書118の開始タグおよび終了タグと、複合型に関してコーディングされる。これによって、ハンドラ114−1が状態を維持できるようになる。JSP XML文書テンプレート112では、開始タグおよび終了タグも、直接にコーディングされ、その結果、これらのタグが、ターゲットに設定された出力ストリームに向けられる。単純型を扱う時には、コールバックをコーディングする必要はないが、開始タグおよび終了タグをコーディングし、その結果、これらのタグがターゲットに設定された出力ストリームに向けられるようにしなければならない。
【0067】
複合型または単純型が、任意選択である場合には、テンプレート112内の条件文節でisOptionalElementPresent()を使用して、任意選択要素を生成するかどうかを制御する。
【0068】
属性が任意選択である場合には、複合型ではisOptionalAttributePresent(int attributeName)を、単純型ではisOptionalAttributePresent(int elementName、int attributeName)を使用する。要素型が、反復される単純型である場合には、isOptionalAttributePresent(int index、int elementName、int attributeName)メソッドを使用して、任意選択の属性が含まれるかどうかを判定する。
【0069】
反復される要素の場合には、getElementRepetitionsメソッドを使用して、反復される要素の数を返す。これは、テンプレート112内でループを構成して、各要素を処理するのに使用される。単純型の場合に、テンプレート112に、開始タグおよび終了タグが含まれなければならず、値を得るためにgetElementValue(int index、int elementName)が呼び出される。複合型の場合には、状態を維持しなければならないので、テンプレート112によって、startElement(int index、int elementName)メソッドおよびendElement(int index、int elementName)メソッドを呼び出さなければならない。
【0070】
表6に、マッピング・インターフェース114−2(X2XMLMapping)の主要な関数を要約する(すなわち、網羅的でない)。マッピング・インターフェース114−2によって、マッピング機能(Java(R)とXMLの間の)が実行され、出力ターゲット・ストリームが確立される。マッピング・インターフェース114−2によって、ハンドラ・インターフェース114−1が拡張され、これによって出力XML文書118を生成するのに必要な文書テンプレート112のコール・バック・メソッドが提供される。
【0071】
【表6】
Figure 2004530225
【0072】
表7に、マッピング・クラス114−3(X2XMLMappingImpl)の主要な関数を要約する(すなわち、網羅的でない)。マッピング・クラス114−3によって、入力Java(R)オブジェクト116から出力XML文書118へのマッピングのメソッドが提供される。クラスおよびインターフェースの定義に関して上で述べたように、X2XMLMappingImplクラス114−3は、直接に使用されるのではなく、マッピング先の出力XML文書118およびマッピング元の入力Java(R)オブジェクト116の文書型定義に依存して、適当なメソッドに内容を追加されてサブクラス化される。
【0073】
【表7】
Figure 2004530225
【0074】
表8に、出力ターゲット・クラス114−4(X2XMLOutputTarget)の主要な関数を要約する(すなわち、網羅的でない)。
【0075】
X2XMLOutputTargetクラス114−4を用いると、XML文書118を、バイト・ストリームまたは文字ストリームに書き込めるようになる。クラス114−4によって、バイト・ストリームのターゲットをサーブレットの出力ストリームにすることを可能にするなど、最適化が提供される。したがって、XML文書118は、書き込まれる前にバッファリングされない。
【0076】
【表8】
Figure 2004530225
【0077】
要約すると、X2XMLMappingImplクラス114−3によって、X2XMLMappingインターフェース114−2が実装される。X2XMLMappingインターフェース114−2によって、X2XMLHandlerインターフェース114−1が拡張される。したがって、X2XMLMappingImplクラス114−3によって、X2XMLHandlerインターフェース114−1で定義されたメソッドが実装される。
【0078】
図4に関して、ソフトウェア・オブジェクト116(たとえばJava(R)Bean)をXML文書118にマッピングするために実行される一般的なステップを示すメソッド400が示されており、この方法には下記が含まれる。
(a)ステップ402で、入力オブジェクトX116から出力XML文書118へのマッピングを実施するマッピング・インターフェース114−2(たとえばX2XMLMapping)のインスタンスを得ることと、
(b)ステップ404で、マッピング・インターフェース114−3でソフトウェア・オブジェクト116および出力XML文書118の出力ストリームをセットすることと、
(c)ステップ406で、マッピング・インターフェース114−2を呼び出すことと、
(d)ステップ408で、JSPコンテナを作成することと、
(e)ステップ410で、マッピング・インターフェース114−2によって、XML文書118を作成するJSP XMLテンプレート112を使用してJSPコンテナを呼び出すことと、
(f)ステップ412で、JSPコンテナによって、JSP XMLテンプレート112をコンパイルし、実行することと、
(g)ステップ414で、コンパイルされたJSP XMLテンプレート112によって、指定された出力ストリーム(ステップ404から)へのXML文書118の書込を開始することと、
(h)ステップ416で、要素/属性データおよび開始/終了タグについて適当な時に、コンパイルされたJSP XMLテンプレート112によって、マッピング・インターフェース114−2をコール・バックして、処理の状態を維持し、出力XML文書118にデータを追加することと(データは、ソフトウェア・オブジェクト116から検索される)、
(i)ステップ418で、コンパイルされたJSP XMLテンプレート112によって、任意選択として、isOptionalElementPresentメソッドまたはisOptionalAttributePresentメソッドを呼び出して、XML文書のある部分を生成しなければならないかどうかを判定することができることと、
(j)ステップ420で、JSP XMLテンプレート112によって、getElementRepetitionsメソッドをコール・バックして、XML文書のある部分の生成で何回ループしなければならないかを判定することと、
(k)ステップ422で、スタックによって処理の状態を維持すること(これは、配列がある、再帰がある、または複合型が別の複合型に含まれる場合に、XML文書内で複合型を生成する時に有用である)。
【0079】
Java(R)からXMLへのマッピングでは、XML文書テンプレート112が使用され、XML文書テンプレート112は、イベントを処理する(少なくとも複合オブジェクトについて)パーサ104によって課せられるものに類似する標準規格を用いてコーディングされる。たとえば、複合型について、開始タグおよび終了タグをコーディングしなければならない(プリミティブ型では不要)。下で詳細を示す例II「Java(R)−XMLカスタマ」では、入力カスタマjava(R)オブジェクトから出力カスタマXML文書を生成する。
【0080】
例II
Java(R)−XMLカスタマ
下記のコンポーネント(下で詳細を示す)が、例IIの一部である。
(A)Customer2XMLMapping.java 出力XML文書118に移植される入力カスタマJava(R)オブジェクト116から値を得るためにJSP112によって呼び出されるハンドラ・クラス114−1
(B)customer.jsp 出力XML文書118を生成するのに使用されるJSPテンプレート112
(C)CustomerSymbols.java 定数およびハッシュマップが含まれる。ハッシュマップは、タグの名前を整数定数にマッピングするのに使用される。JSPテンプレート112では、整数定数が使用される
(D)execute.java Java(R)からXMLへおよびXMLからJava(R)へのマッピングを実行するのに使用されるマッピング・クラス/インターフェース114−2、114−3のプログラム(上の例Iの項目C)
【0081】
A.簡潔にするために部分的に省略された、入力Java(R)オブジェクトからXML文書を構成するプログラム(Customer2XMLMapping.java)。
Figure 2004530225
Figure 2004530225
【0082】
B.簡潔にするために部分的に省略された、モジュール112のJSPの文書テンプレート(Customer.jsp)。
Figure 2004530225
【0083】
C.簡潔にするために部分的に省略された、Customer.jspによって使用されるハッシュマップおよび定数のプログラム(Customersymbols.java)。
Figure 2004530225
Figure 2004530225
【0084】
例Iに関して言及した状況でカスタマの配列に関するXML文書を生成するために、改訂されたcustomer.jspの例を下に示す。
Figure 2004530225
【0085】
ハンドラ114−1は、配列サイズ(すなわち、何回のループを実行するか)を判定し、getElementRepitionsでリターンする。customer.jspによって、indexおよびnameを用いてstartElementが呼び出される時に、ハンドラ114−1によって、配列内の特定のカスタマ・オブジェクトへの参照がセットされる。
【0086】
再帰を処理するために、ハンドラ114−1によって、スタックが使用される。オブジェクトが再帰する時に、ハンドラ114−1によって、startElementでスタックにプッシュされ、endElementでスタックからポップされる。作業オブジェクトは、スタック最上部のオブジェクトである。
【0087】
オブジェクトが任意選択である場合には、isOptionalElement()メソッドまたはisOptionalAttribute()メソッドを使用して、オブジェクトが存在するかどうかを判定する。customer.jspでの処理を改訂して、isOptionalxxxメソッドの1つについて返されるブール値を使用する条件ステートメントを追加する。要約すると、本発明の例示的実施形態の長所には、下記が含まれる。
(a)XML文書からJava(R)オブジェクトへおよびJava(R)オブジェクトからXML文書へのマッピングの共通フレームワークが提供され、このフレームワークでは、マッピングに関してプロパティがどのように得られるかをマスクするハンドラが使用される。
(b)本発明のマッピング方法(XML/Java(R))をインスタンス化するのに、すぐに入手可能なツール(たとえば、SAXパーサ、JSP)が使用される。
(c)本発明のマッピング処理の構造を単純にし、両方のマッピング方向でマッピング処理を似たものにするインターフェースおよびクラス(Java(R)環境での)が提供される。
【図面の簡単な説明】
【0088】
【図1】本発明を実施する方法および装置を実施するのに使用することができるコンピュータ・システムを示すブロック図である。
【図2】XMLとJava(R)オブジェクトの間およびその逆でのマッピングのフレームワークを示すブロック図である。
【図3】図2のフレームワークを使用してXML文書をソフトウェア・オブジェクトにマッピングする方法を示す流れ図である。
【図4】図2のフレームワークを使用してソフトウェア・オブジェクトをXML文書にマッピングする方法を示す流れ図である。【Technical field】
[0001]
The present invention relates to the field of conversion or mapping between software objects and structured language element documents, and in particular, various software objects, such as Java objects, and extensible markup language (XML) documents. Regarding mapping between.
[Background Art]
[0002]
Extensible Markup Language (XML) is a reduced version of the Standard General Purpose Markup Language (SGML), specifically designed for web documents. XML allows designers to create their own customized tags and provides functionality that is not available using HTML. For example, XML supports links that point to multiple documents, rather than HTML links, each of which can refer to only one destination.
[0003]
XML is used to encode a rich data model because it is a form of self-describing data (also referred to herein as a structured language element). Therefore, XML is useful as a data exchange medium between different systems. Data can be extracted or published as XML from many types of systems: legacy COBOL programs, databases, C ++ programs and the like. Commonly encountered business problems include solving how to map information from XML documents to other data formats and vice versa. For example, after exchanging information in XML documents between companies, it may be necessary to map that information to Java objects that can be used when making database or transaction requests.
[0004]
U.S. Pat. No. 6,125,391 issued Sep. 26, 2000 to Meltzer et al. Discloses an example of an XML / Java conversion tool. In order to convert XML to Java (R), Melza et al. Parses an XML document and generates an event. Specifically, a parser walks through an XML document and creates a tree representation in memory that can be queried, and another parser walks through the XML document and events with information about the document (eg, document Start event, element name, element start event with element content, element end event, document end event, etc.).
[0005]
For conversion from Java (R) to XML, Melza et al. Generate a code including an accessor of each element. The element accessor contains a loop that loops for each character. The loop includes a switch statement that performs an action based on what the character is. The action is to build a StringBuffer that contains the element fragments of the XML document. The Melza et al. Solution does not provide infrastructure support to work with code that converts Java to XML. All of Melza's other code is generated code and does not help the user edit it.
[Patent Document 1]
U.S. Pat. No. 6,125,391
DISCLOSURE OF THE INVENTION
[Problems to be solved by the invention]
[0006]
As a result, there is a need for a mapping framework that supports mapping between software objects and structured language element-based documents (eg, XML), which can be efficiently implemented using standard tools.
[Means for Solving the Problems]
[0007]
A disadvantage of the prior art summarized above is that the exemplary method and system of the present invention provides a common framework for mapping between documents (eg, XML documents) and software objects (eg, Java objects). Overcome. This framework uses a handler to mask the way properties are obtained for mapping. This results in a mapping code that has a common look for mapping in both directions. The mapping between the elements of the XML document and the properties of the Java (R) object is contained in a mapper. The mapper maps XML documents to software objects through the use of a parser (such as a Document Object Model (DOM) or Simple Application Programming Interface (API) for XML (SAX)).
[0008]
Mapping in the other direction (Java (R) to XML) requires that the elements of the XML document be constructed in a particular order to ensure the validity of the resulting XML document. To ensure this validity, an exemplary embodiment of the present invention constructs an XML template document using, for example, Java (R) Server Pages (TM) (JSP). The use of JSP-based templates allows document tags to be written to JSP with callbacks to obtain element and attribute values. JSPs are well-documented, with editor support allowing efficient template creation. Further, the content can be directed to a buffer or directly to a servlet response stream. According to one aspect of the invention, a computer-implemented method for converting a data structure representing a software object into structured language elements of a document, comprising: (a) generating a structured language element template document; (B) reading, from the software object, properties associated with the structured language element of the document; and (c) using the properties to define the property between the property and the structured language element. A computer-implemented method is provided that includes obtaining a configuration defined by the structured language element based on the association, and (d) porting the configuration to the structured language element template document.
[0009]
According to another aspect of the present invention, a computer-implemented method for converting a structured language element of a document into a data structure representing a software object, comprising: (a) the structured language element of the document. And (b) determining a property associated with the structured language element of the document selected from a set of available properties defined by the data structure of the software object; (C) populating a structured language element value from the document to the property of the data structure representing the software object.
[0010]
According to another aspect of the present invention, there is provided a system for converting a software object including a property into a document defined by a structured language element, comprising: (a) a document template; A handler interface for providing a representation of the structured language element of the document based on a callback made; and (c) communicating with the handler interface to recognize properties of the software object by the document. And (d) an output target class that communicates with the mapping module and writes the structured language element generated in step (c) to the document. A system is provided that includes:
[0011]
According to another aspect of the present invention, there is provided a system for converting a document including a structured language element into a software object, comprising: (a) a parser for obtaining an event representing a characteristic of the document; An input source class that reads from the input source class; and (c) a content handler class that communicates with the input source class and implements a buffer for the event obtained by the parser; and (d) the content handler class. A mapping module for communicating and converting the events obtained by the parser into properties of the software object.
[0012]
According to another aspect of the present invention, there is provided a method of converting a software object having properties into a document represented by a structured language element, comprising: (a) placing the software object in an instance of a mapping interface to be invoked; Providing an object; (b) compiling and executing a template using an instance of the called container; and (c) using the compiled template to output the document to a specified output stream. Writing.
[0013]
According to another aspect of the invention, there is provided a method of converting a document containing structured language elements into a software object, comprising: (a) providing the document to an instance of a mapping interface to be invoked; b) registering the mapping interface as a content handler; (c) parsing the document using an instance of the called parser; and (d) the mapping interface in the software object. And populating properties associated with the structured language element parsed from the document via a callback made to the document.
[0014]
According to another aspect of the present invention, a computer program product for converting a data structure representing a software object into a structured language element of a document, comprising: (a) a computer for generating a structured language element template document; A computer readable program code device that reads properties associated with the structured language elements of the document from the software object; and (c) reads the properties from the software object. A computer readable program code device for use in obtaining a configuration defined by the structured language element based on the association between the property and the structured language element; and (d) the structured language. Computer for porting the configuration to element template document Computer program product comprising a reading program code devices is provided.
[0015]
According to another aspect of the invention, there is provided a computer program product for converting a structured language element of a document into a data structure representing a software object, comprising: (a) each of the structured language elements of the document; Determining a property associated with the structured language element of the document, selected from a set of available properties defined by the data structure of the software object. A computer readable program code device, and (c) a computer readable program code device for populating a structured language element value from the document into the property of the data structure representing the software object.・ Program products are provided .
[0016]
Other aspects and features of the present invention will become apparent to one of ordinary skill in the art upon reviewing the following description of particular embodiments of the invention in conjunction with the accompanying drawings.
[0017]
Further features and advantages of the present invention are described in the detailed description, taken in conjunction with the accompanying drawings.
BEST MODE FOR CARRYING OUT THE INVENTION
[0018]
FIG. 1 and the associated description represent examples of suitable computing environments in which the invention may be implemented. Although the invention is described in the general context of computer-executable instructions in a computer program running on a personal computer, the invention may be implemented in combination with other program modules.
[0019]
Generally, program modules include routines, programs, components, data structures, and the like that perform particular tasks or implement particular abstract data types. Further, the present invention relates to other computer systems, including handheld devices, multiprocessor systems, microprocessor-based consumer electronics, programmable consumer electronics, minicomputers, mainframe computers, and the like. It can also be implemented using a system configuration. The invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.
[0020]
With reference to FIG. 1, an exemplary system 10 includes a conventional personal computer 20, which processes a processing unit 22, a system memory 24, and various system components including the system memory 24. A system bus 26 that couples to unit 22 is included. The system bus 26 includes a memory bus or memory controller, a peripheral bus, and a plurality of local buses using any of a variety of conventional bus architectures (eg, PCI, VESA, ISA, EISA, etc.). Types of bus structures are included.
[0021]
System memory 24 includes read-only memory (ROM) 28 and random access memory (RAM) 30. A basic input / output system (BIOS) 32 containing basic routines to help transfer information between elements within the computer 20, such as at startup, is stored in the ROM. The computer 20 includes a hard disk drive 34, a magnetic disk drive 36 (reads from and writes to a removable disk 38), an optical disk drive 40 (reads a CD-ROM disk 42 or reads from other optical media). , Write in this). Drives 34, 36, and 40 are connected to system bus 26 by interfaces 44, 46, and 48, respectively.
[0022]
Drives 34, 36, and 40 and their associated computer-readable media (38, 42) provide nonvolatile storage of computer 20 data, data structures, and computer-executable instructions. The storage media of FIG. 1 is merely exemplary and it is known to those skilled in the art to include other types of media readable by a computer (eg, magnetic cassettes, flash memory cards, digital video disks, etc.). is there.
[0023]
A plurality of program modules, including operating system 50, one or more application programs 52, other program modules 54, and program data 56, may be stored in drives 34, 36, and 40 and RAM 30. it can. A user can enter commands and information into computer 20 via keyboard 58 and input device 60 (eg, a mouse, microphone, joystick, game pad, satellite dish, scanner, etc.). These devices (58 and 60) are connected to a processing unit via a port interface 62 (eg, a serial port, a parallel port, a game port, a universal serial bus (USB), etc.) coupled to the system bus 26. 22. A monitor 64 or other type of display device is also connected to bus 26 via interface 66 (eg, a video adapter).
[0024]
Computer 20 can operate in a networked environment using logical connections to one or more remote computers, such as remote computer 68. Remote computer 68 may be a server, router, peer device, or other common network node, and typically includes many or all of the elements described with respect to computer 20. Although included, only the memory storage device 70 is shown for simplicity of illustration. The logical connections shown in FIG. 1 include a local area network (LAN) 72 and a wide area network (WAN) 74. Such networking environments are commonly used in offices, enterprise-wide computer networks, intranets, and the Internet.
[0025]
When used in a LAN networking environment, computer 20 is connected to LAN 72 via a network interface or adapter 76. When used in a WAN networking environment, the computer 20 typically includes a modem 78 or other means for establishing communication over the WAN 74, such as the Internet. Modem 78, which may be internal or external, is connected to bus 26 via port interface 62. In a networked environment, program modules depicted relative to the computer 20, or portions thereof, may be stored in the remote memory storage device 70.
[0026]
The discussion of the method of the present invention is based on the transformation / mapping from XML to Java objects and from Java objects to XML. Other data formats are also supported. For example, a number of legacy business applications have been written in COBOL, C, and PL1. These applications consist of programs residing in an enterprise information system (EIS) such as CICS ™ (general purpose online transaction processing software) or IMS ™ (information management system). In the COBOL program, a COBOL structure is used for input and output. There is a need for mapping XML to COBOL and COBOL to XML. The present invention can be used to perform these mappings, where the XML-to-object X mapping handler (described below) is used to populate the COBOL structure from the XML document with the object X-to-XML mapping. Handlers (described below) are used by templates to extract data from COBOL structures and port them to XML documents.
[0027]
By way of background, the mapping method of the present invention uses the following high-level process: (a) The lexer groups characters into words or tokens recognizable by a particular system (referred to as tokenization); A) parsing the group of tokens by a parser to recognize the correct language construct, and (c) taking the correct set of language constructs and generating executable code by a code generator. The functions defined by (a) to (c) can be mixed.
[0028]
For example, for a mapping from XML to a Java object, each character of the XML document is analyzed to recognize the correct XML token, such as the start tag, attributes, end tag, and "CDATA" section. Next, the token must be verified that the token forms the correct XML configuration. At the most basic level, all of the tagging has matching start and end tags, and it is verified that the attributes are correctly configured within the start tag. If a document type definition (DTD) or XML schema is available, it can be ensured that the XML constructs found during parsing are correct and well-formed XML for the DTD or XML schema. Finally, the data contained in the XML document is used to achieve usefulness (eg, mapping to Java objects).
[0029]
Some of the work identified above may be performed, at least in part, by a readily available XML parser. The XML parser handles the lexical and parsing tasks. Two examples of parsing standards are SAX and DOM API (SAX is Simple Application Programming Interface (API) for XML, DOM is DocumentObject Model).
[0030]
SAX is event-based. XML parsers implementing SAX generate events corresponding to different features found in the parsed XML document. The DOM API is an object model based API. An XML parser that implements DOM creates a generic object model in memory that represents the contents of an XML document. When the XML parser has completed parsing, the memory contains a tree of DOM objects that provides information about both the structure and content of the XML document.
[0031]
FIG. 2 shows a schematic diagram of a framework 100 according to an embodiment of the present invention. Framework 100 is illustrated as being instantiated with an integration component 102, such as a servlet, that can be implemented in system 10 of FIG. The integration component 102 includes a parser 104 implemented using, for example, DOM or SAX and interacting with an XML-to-object mapping module 106. For ease of explanation, SAX will be described as an example of the parser 104 when describing embodiments of the present invention.
[0032]
An input XML document 108 is received by an XML-object mapping module 106 and an output Java object 110 is generated. Integration component 102 further includes an XML document template module 112 (e.g., based on Java (R) Server Pages (TM) or JSP technology) that communicates with an object-to-XML mapping module 114. An input Java (R) object 116 is received by the object-to-XML mapping module 114 and an output XML document 118 is generated.
[0033]
XML-Software Object Mapping
Referring to FIG. 2, the XML-to-object mapping module 106 includes the following components:
(A) Input source class 106-1 (XML2xInputSource) that implements the input XML document 108.
(B) Buffered content handler class 106-2 (XML2xBufferedContentHandler) that implements a buffer for SAX events generated by parser 104.
(C) Mapping interface 106-3 (XML2xMapping) that performs mapping and sets the input and output target streams.
(D) A mapping class 106-4 (XML2xMappingImpl) that provides a method of mapping from the input XML document 108 to the output Java (R) object 110.
[0034]
Further details of the various interfaces and classes are described below. The terms "class" and "interface" have their own meaning in Java. A Java class (abstract, inner, or final) is a collection of data members and methods that define a particular object, and a Java interface forces some functionality on the class that implements it. (Ie, the interface specifies what the class must do). Interfaces are also used to provide constants that can be used by the class that implements the interface. The interface includes constant variable declarations and method declarations, but the implementation of the method is left to the class implementing the interface. An arbitrary number of interfaces can be implemented by one class.
[0035]
Table 1 summarizes the key functions of the input source class 106-1 (XML2xInputSource) (ie, not exhaustive).
[0036]
XML2xInputSource is used to allow an XML document to be read from a byte stream, a character stream, or an XML2xBufferedContentHandler106-2.
[0037]
[Table 1]
Figure 2004530225
[0038]
Table 2 summarizes the key functions of the buffered content handler class 106-2 (XML2xBufferedContentHandler) (ie, not exhaustive). The handler class 106-2 also includes a content handler that buffers SAX events from the parser 104. This allows the event to be played. An example where this feature is useful is when different mapping handlers are used for different parts of an XML document. An example of an implementation is the Simple Object Access Protocol (SOAP).
[0039]
[Table 2]
Figure 2004530225
[0040]
SOAP is a lightweight protocol for exchanging information in a decentralized distributed environment. SOAP is an XML-based protocol that includes (1) an envelope that defines what is contained in a message and how to process it, and (2) an encoding that represents an instance of an application-defined data type. It consists of three parts: a set of rules and (3) a convention representing remote procedure calls and responses. A SOAP message is an XML document consisting of a mandatory SOAP envelope, an optional SOAP header, and a mandatory SOAP body. In this situation, it is possible to use different mapping handlers for the envelope and the body.
[0041]
Table 3 summarizes the key functions of the mapping interface 106-3 (XML2xMapping) (ie, not exhaustive). XML2xMapping performs the mapping and allows for the construction of an InputStream.
[0042]
[Table 3]
Figure 2004530225
[0043]
Table 4 summarizes the key functions of mapping class 106-4 (XML2xMappingImpl) (ie, not exhaustive). As discussed above with respect to class and interface definitions, the XML2xMappingImpl class is not used directly, but rather in the document type definition of the mapping source input XML document 108 and the mapping destination Java (R) object 110. Depending on the method, the content is added to the appropriate method and subclassed.
[0044]
[Table 4]
Figure 2004530225
[0045]
Referring to FIG. 3, a method 300 is shown that illustrates the general steps performed to map an XML document 108 to a software object 110 (eg, Java Bean), including: It is.
(A) obtaining an instance of the mapping interface 106-4 (eg, XML2XMapping) to perform the XML to object X mapping of step 302;
(B) In step 304, call the mapping interface 106-4, and in step 306, supply the input XML document 108;
(C) At step 308, an instance of the event parser (eg, parser 104) is obtained by mapping interface 106-4, and at step 310, mapping interface 106-4 is converted to a content handler (eg, buffered content. Registering as handler class 106-2)
(D) In step 312, calling the parser 104 for the XML document 108 (ie, starting parsing the document);
(E) When step (d) is performed, at step 314, make a callback to the mapping interface 106-4 that invokes various methods (eg, startDocument, startElement, characters, endElement, endDocument, etc.). That
(F) In step 316, creating the software object 110 by the mapping interface 106-4 with the startDocument method and / or the startElement method;
(G) At step 318, setting an element in the software object 110 by the mapping interface 106-4 with the endElement method.
[0046]
The SAX API described above includes a number of specifications known in the art. The present invention relates to the creation of a class that implements the "ContentHandler" interface, which is a callback interface used by an XML parser to notify the program of SAX events when found in an XML document. This interface is used with the XML2xBufferedContentHandler class 106-2 and the XML2xInputSource class 106-1. The SAX API also provides a "DefaultHandler" implementation class for the "ContentHandler" interface. In Example I “XML-Java (R) Customer” described in detail below, “DefaultHandler” is extended to generate a customer Java (R) Bean from a customer XML document.
[0047]
Example I
XML-Java (R) customer
The following components (described in detail below) are part of Example I:
(A) customer. xml This is a sample of the input XML document 108.
(B) XML2CustomerMapping. The handler class 106-2 that the Java parser 104 calls back. This includes instructions for configuring the customer object and establishing its values.
(C) execute. Java A mapping class / interface 106-3, 106-4 program used to perform the mapping from XML to Java (R) and from Java (R) to XML (Example II below).
(D) customer. Java The output customer is Java (R) Bean110.
(E) CustomerSymbols. java Includes integer constants and hash maps. The hash map stores the names of the tags in XML2CustomerMapping. Used to map to integer constants used in java (R).
[0048]
A. The input XML document (customer.xml) is shown below.
Figure 2004530225
[0049]
B. Shown below is a program (XML2CustomerMapping.java) that constructs and sets the value of the customer object (ie, the handler that the event parser calls back), partially omitted for brevity.
Figure 2004530225
Figure 2004530225
Figure 2004530225
[0050]
C. Used to perform XML to Java (R) mapping (and Java to XML as detailed in Example II below), partially omitted for brevity Program (execute.java) to be executed.
Figure 2004530225
Figure 2004530225
Figure 2004530225
[0051]
D. Details of the customer Java (R) Bean (customer.java) are shown below. Java (R) Bean is a reusable component that adheres to standard design architectures known in the art. Beans are class objects that can be made visible or invisible at runtime. Java Beans provides a standard framework for component architecture, component development.
Figure 2004530225
Figure 2004530225
[0052]
As can be seen from Example I, the mapping from XML to Java (R) is efficient because parser 104 processes all start tag, element tag, and end tag events, improving event tracking. is there.
[0053]
As another example, consider extending a single customer XML document to an array of customers. To generate an array of customer Java beans, follow these steps:
(I) Create a vector using the Starters element of Customers.
(Ii) Create a Customer object with the startElement of each Customer.
(Iii) Populate the Customer object using the FirstName, LastName, and StartElement, getElement, and endElement events of the CustID, insert the Customer object into the vector using the Customer's endElement event, and insert the CustomerElement's event into the CustomerElement event. To create an array of Customers from the vector and set it on the Java (R) object that works with it.
[0054]
The parser 104 maintains a stack for a recursive XML structure (ie, an XML element representing a list of lists). One object is created for each startElement. Stacks can be used to save state as needed. Once a child element has been created, it can be set to the parent object.
[0055]
Software Object-XML Mapping
With reference to FIG. 2, the object-XML mapping module 114 includes the following components:
(A) Handler interface 114-1 (X2XMLHandler) for managing parsing events
(B) Mapping interface 114-2 (X2XMLMapping) that performs mapping and a set of output target streams
(C) Mapping class 114-3 (X2XMLMappingImpl) that provides a method for mapping from the input Java (R) object 116 to the output XML document 118
(D) Output target class 114-4 that implements the output XML document 118 (X2XMLOutputTarget)
[0056]
Table 5 summarizes the key functions of the handler interface 114-1 (X2XMLHandler) (ie, not exhaustive). The interface 114-1 is implemented by the mapping module 114, and the instance is registered in the JSP container. The document template 112 provides a callback to the mapping module 114 for basic document-related events such as the start and end of an element and the acquisition of an element value.
[0057]
[Table 5]
Figure 2004530225
[0058]
Generally, a container is an entity that provides life cycle management, security, deployment, and runtime services to components. There are many unique types of containers (web, JSP, servlets, applets, etc.) that provide component-specific services. A servlet container is a container that provides network services through which requests and responses are sent, requests are decoded, and responses are formatted. The JSP container is a container that provides the same service as the servlet container, and is an engine that interprets a JSP page and processes the JSP page.
[0059]
The X2XMLHandler 114-1 provides a mirror (but not identical) image of the parse event to the parse event created by parser 104. Effectively, the structure provided by parser 104 is mirrored in the path from X2XML.
[0060]
When the parser 104 is implemented using SAX, the event is received by the handler 106-2 that processes it (ie, effectively a callback mechanism). In this example, handler 106-2 is used to port a Java class.
[0061]
When the template 112 is invoked, it calls back the X2XMLHandler interface 114-1. Handler 114-1 processes the callback by obtaining the requested data and maintaining the parsing state.
[0062]
The handler interface 114-1 is similar with respect to various functions performed by the XML-to-object mapping module 106, but with certain differences. Element names are generated or hand-coded and are not taken from schemas with "namespace" support. Element names can be unique for each element. Therefore, only the name parameter is required in the startElement and endElement methods.
[0063]
When the mapping is performed by the XML-to-object mapping module 106, the name of the element is returned as a string by the input source class 106-1 (ie, XMLReader). In mapping classes / interfaces 106-3, 106-4, element names are paired with unique numbers. This number is used in the switch statement to control the processing of the element. In the object-XML module 114, by defining the element names as integer constants, processing is optimized and coding assistance is improved. Therefore, callbacks to these methods use integer constants instead of strings.
[0064]
The order of events in handler interface 114-1 is a mirror image of the order of information in object 116 itself.
[0065]
The XML document template 112 (written using Java (R) Server Pages technology) uses a coding style detailed below. In JSP technology, the user interface is separated from content generation, allowing the overall page layout to be changed without changing the underlying dynamic content. Java Server Pages is an extension of the Java Servlet technology well known to those skilled in the art.
[0066]
XML Document Template 112-Example of JSP Coding Style
A callback is coded for the start and end tags of the document 118 and for the complex type. As a result, the handler 114-1 can maintain the state. In the JSP XML document template 112, the start and end tags are also coded directly, so that these tags are directed to the targeted output stream. When dealing with simple types, you do not need to code the callback, but you must code the start and end tags so that they are directed to the targeted output stream.
[0067]
If the complex or simple type is optional, use isOptionalElementPresent () in the conditional clause in template 112 to control whether an optional element is generated.
[0068]
If the attribute is optional, use isOptionAttributePresent (int attributeName) for the complex type and use isOptionAttributePresent (int elementName, intAttributeName) for the simple type. If the element type is a repeated simple type, use the isOptionAttributePresent (int index, int elementName, int attributeName) method to determine if an optional attribute is included.
[0069]
For repeated elements, use the getElementRepetitions method to return the number of repeated elements. This is used to construct a loop in the template 112 and process each element. In the case of a simple type, the template 112 must include a start tag and an end tag, and getElementValue (int index, int elementName) is called to get the value. In the case of a composite type, since the state must be maintained, the template 112 must call the startElement (int index, int elementName) method and the endElement (int index, int elementName) method.
[0070]
Table 6 summarizes the key functions of mapping interface 114-2 (X2XMLMapping) (ie, not exhaustive). The mapping interface 114-2 performs a mapping function (between Java (R) and XML) and establishes an output target stream. The mapping interface 114-2 extends the handler interface 114-1 to provide the callback methods of the document template 112 needed to generate the output XML document 118.
[0071]
[Table 6]
Figure 2004530225
[0072]
Table 7 summarizes the key functions of mapping class 114-3 (X2XMLMappingImpl) (ie, not exhaustive). The mapping class 114-3 provides a method of mapping from the input Java (R) object 116 to the output XML document 118. As described above with respect to class and interface definitions, the X2XMLMappingImpl class 114-3 is not used directly, but rather the document type of the output XML document 118 of the mapping destination and the input Java (R) object 116 of the mapping source. Depending on the definition, it is subclassed with content added to the appropriate method.
[0073]
[Table 7]
Figure 2004530225
[0074]
Table 8 summarizes the key functions of the output target class 114-4 (X2XMLOutputTarget) (ie, not exhaustive).
[0075]
The X2XMLOutputTarget class 114-4 allows an XML document 118 to be written to a byte or character stream. Class 114-4 provides optimizations, such as allowing the byte stream to be targeted to the servlet output stream. Therefore, the XML document 118 is not buffered before being written.
[0076]
[Table 8]
Figure 2004530225
[0077]
In summary, the X2XMLMappingImpl class 114-3 implements the X2XMLMapping interface 114-2. The X2XMLMapping interface 114-2 extends the X2XMLHandler interface 114-1. Therefore, the method defined by the X2XMLHandler interface 114-1 is implemented by the X2XMLMappingImpl class 114-3.
[0078]
Referring to FIG. 4, a method 400 is shown that illustrates the general steps performed to map a software object 116 (eg, Java (R) Bean) to an XML document 118, which includes the following: .
(A) obtaining an instance of a mapping interface 114-2 (eg, X2XMLMapping) that performs a mapping from the input object X116 to the output XML document 118 at step 402;
(B) setting the software object 116 and the output stream of the output XML document 118 at the mapping interface 114-3 at step 404;
(C) In step 406, calling the mapping interface 114-2;
(D) creating a JSP container in step 408;
(E) In step 410, using the mapping XML interface 112-2 to invoke the JSP container using the JSP XML template 112 to create the XML document 118;
(F) compiling and executing the JSP XML template 112 by the JSP container in step 412;
(G) in step 414, starting writing the XML document 118 to the specified output stream (from step 404) with the compiled JSP XML template 112;
(H) In step 416, at the appropriate time for element / attribute data and start / end tags, the compiled JSP XML template 112 calls back the mapping interface 114-2 to maintain processing state; Adding data to the output XML document 118 (the data is retrieved from the software object 116);
(I) In step 418, the compiled JSP XML template 112 can optionally invoke the isOptionalElementPresent or isOptionAttributePresent methods to determine whether a portion of the XML document must be generated.
(J) In step 420, the JSP XML template 112 calls back the getElementRepetitions method to determine how many times the generation of a portion of the XML document must be looped;
(K) maintaining the state of processing by the stack in step 422 (this creates a complex type in the XML document if there is an array, there is recursion, or the complex type is contained in another complex type) Useful when you do).
[0079]
The Java to XML mapping uses an XML document template 112, which is coded using a standard similar to that imposed by parser 104 (at least for complex objects) that processes events. Is done. For example, for complex types, the start and end tags must be coded (not required for primitive types). In Example II, "Java (R) -XML Customer", detailed below, an output customer XML document is generated from an input customer Java (R) object.
[0080]
Example II
Java (R) -XML Customer
The following components (detailed below) are part of Example II.
(A) Customer2XMLMapping. Java A handler class 114-1 called by the JSP 112 to obtain a value from the input customer Java (R) object 116 to be ported to the output XML document 118.
(B) customer. jsp JSP template 112 used to generate output XML document 118
(C) CustomerSymbols. Java constants and hash maps are included. Hash maps are used to map tag names to integer constants. In the JSP template 112, an integer constant is used.
(D) execute. A program of mapping classes / interfaces 114-2, 114-3 used to perform Java-to-XML and XML-to-Java mappings (item C in Example I above).
[0081]
A. A program (Customer2XMLMapping.java) that constructs an XML document from input Java objects, partially omitted for brevity.
Figure 2004530225
Figure 2004530225
[0082]
B. Document template for JSP of module 112 (Customer.jsp), partially omitted for brevity.
Figure 2004530225
[0083]
C. Customer. Partially omitted for brevity. A program of hash maps and constants used by jsp (Customersymbols.java).
Figure 2004530225
Figure 2004530225
[0084]
Revised customer. An example of jsp is shown below.
Figure 2004530225
[0085]
The handler 114-1 determines the array size (that is, how many loops to execute) and returns with getElementRepetitions. customer. When jsp invokes startElement with index and name, handler 114-1 sets a reference to a particular customer object in the array.
[0086]
The stack is used by handler 114-1 to handle recursion. When the object recurs, the handler 114-1 pushes it on the stack at startElement and pops it off the stack at endElement. The work object is the object at the top of the stack.
[0087]
If the object is optional, use the isOptionalElement () or isOptionAttribute () method to determine if the object exists. customer. Revise the processing in jsp to add a conditional statement that uses the boolean value returned for one of the isOptionalxxx methods. In summary, advantages of an exemplary embodiment of the present invention include:
(A) A common framework is provided for mapping from XML documents to Java objects and from Java objects to XML documents, which masks how properties are obtained for the mapping. Handler is used.
(B) A readily available tool (eg, SAX parser, JSP) is used to instantiate the mapping method (XML / Java®) of the present invention.
(C) Interfaces and classes (in a Java environment) are provided that simplify the structure of the mapping process of the present invention and make the mapping process similar in both mapping directions.
[Brief description of the drawings]
[0088]
FIG. 1 is a block diagram illustrating a computer system that can be used to implement a method and apparatus for practicing the present invention.
FIG. 2 is a block diagram illustrating a framework for mapping between XML and Java objects and vice versa.
FIG. 3 is a flowchart illustrating a method of mapping an XML document to a software object using the framework of FIG.
FIG. 4 is a flowchart illustrating a method for mapping software objects to XML documents using the framework of FIG.

Claims (44)

ソフトウェア・オブジェクトを表すデータ構造を、文書の構造化言語要素に変換するコンピュータ実施される方法であって、
(a)構造化言語要素テンプレート文書を生成することと、
(b)前記ソフトウェア・オブジェクトから、前記文書の前記構造化言語要素に関連するプロパティを読み取ることと、
(c)前記プロパティを使用して、前記プロパティと前記構造化言語要素との間の前記関連に基づいて、前記構造化言語要素によって定義される構成を得ることと、
(d)前記構造化言語要素テンプレート文書に前記構成を移植することと
を含むコンピュータ実施される方法。
A computer-implemented method for converting a data structure representing a software object into structured language elements of a document, comprising:
(A) generating a structured language element template document;
(B) reading from the software object properties associated with the structured language element of the document;
(C) using the property to obtain a configuration defined by the structured language element based on the association between the property and the structured language element;
(D) porting the configuration to the structured language element template document.
ステップ(c)が、前記文書の構造および内容を定義する前記構成を表すプロパティを得るための前記ソフトウェア・オブジェクトへの直接コール・バックを含む、請求項1に記載のコンピュータ実施される方法。The computer-implemented method of claim 1, wherein step (c) comprises a direct callback to the software object to obtain properties representing the structure that define the structure and content of the document. ステップ(c)が、前記文書の構造および内容を表すオブジェクト・モデルを作成することを含む、請求項1に記載のコンピュータ実施される方法。The computer-implemented method of claim 1, wherein step (c) comprises creating an object model representing the structure and content of the document. 前記構造化言語要素が、拡張可能マークアップ言語(XML)構成を表す、請求項1に記載のコンピュータ実施される方法。The computer-implemented method of claim 1, wherein the structured language element represents an extensible markup language (XML) configuration. ステップ(c)が、反復される構造化言語要素を処理するために前記テンプレート文書内でループを構成することを含む、請求項1に記載のコンピュータ実施される方法。The computer-implemented method of claim 1, wherein step (c) comprises constructing a loop in the template document to process the repeated structured language element. 文書の構造化言語要素を、ソフトウェア・オブジェクトを表すデータ構造に変換する、コンピュータ実施される方法であって、
(a)前記文書の前記構造化言語要素のそれぞれを読み取ることと、
(b)前記ソフトウェア・オブジェクトの前記データ構造によって定義される使用可能なプロパティの組から選択される、前記文書の構造化言語要素に関連するプロパティを決定することと、
(c)前記ソフトウェア・オブジェクトを表す前記データ構造の前記プロパティに、前記文書からの構造化言語要素値を移植することと
を含む、コンピュータ実施される方法。
A computer-implemented method for converting a structured language element of a document into a data structure representing a software object, comprising:
(A) reading each of the structured language elements of the document;
(B) determining a property associated with a structured language element of the document selected from a set of available properties defined by the data structure of the software object;
(C) populating a structured language element value from the document into the property of the data structure representing the software object.
ステップ(a)が、前記文書の構造および内容を表すイベントを生成することを含む、請求項6に記載のコンピュータ実施される方法。The computer-implemented method of claim 6, wherein step (a) comprises generating an event representing the structure and content of the document. ステップ(a)が、前記文書の構造および内容を表すイベントを用いてハンドラをコール・バックすることを含む、請求項6に記載のコンピュータ実施される方法。7. The computer-implemented method of claim 6, wherein step (a) comprises calling back a handler with events representing the structure and content of the document. ステップ(a)が、前記文書の構造および内容を表すオブジェクト・モデルを作成することを含む、請求項6に記載のコンピュータ実施される方法。7. The computer-implemented method of claim 6, wherein step (a) comprises creating an object model representing the structure and content of the document. 前記構造化言語要素が、拡張可能マークアップ言語(XML)構成を表し、ステップ(a)が、さらに、文書型定義(DTD)およびXMLスキーマ標準規格を実施することを含む、請求項6に記載のコンピュータ実施される方法。7. The method of claim 6, wherein the structured language element represents an extensible markup language (XML) construct, and step (a) further comprises implementing a document type definition (DTD) and an XML schema standard. Computer implemented method. さらに、再帰XML構成についてスタックを維持することを含む、請求項10に記載のコンピュータ実施される方法。The computer-implemented method of claim 10, further comprising maintaining a stack for a recursive XML configuration. プロパティを含むソフトウェア・オブジェクト(116)を、構造化言語要素によって定義される文書(118)に変換するシステムであって、
(a)文書テンプレート(112)と、
(b)前記文書テンプレート(112)によって行われるコール・バックに基づいて、前記文書(118)の前記構造化言語要素の表現を提供するハンドラ・インターフェース(114−1)と、
(c)前記ハンドラ・インターフェース(114−1)と通信し、前記ソフトウェア・オブジェクト(116)のプロパティを前記文書(118)よって認識される構造化言語要素に変換するマッピング・モジュール(114−2、114−3)と、
(d)前記マッピング・モジュール(114−2、114−3)と通信し、ステップ(c)で生成される前記構造化言語要素を前記文書(118)に書き込む出力ターゲット・クラス(114−4)と
を含むシステム。
A system for converting a software object (116) containing properties into a document (118) defined by structured language elements, comprising:
(A) a document template (112);
(B) a handler interface (114-1) for providing a representation of the structured language element of the document (118) based on a callback made by the document template (112);
(C) a mapping module (114-2; 114-2) that communicates with the handler interface (114-1) and converts the properties of the software object (116) into structured language elements recognized by the document (118). 114-3),
(D) an output target class (114-4) that communicates with the mapping module (114-2, 114-3) and writes the structured language element generated in step (c) into the document (118) And a system including:
前記マッピング・モジュールが、マッピング・インターフェース(114−2)およびマッピング・クラス(114−3)を含み、前記マッピング・インターフェース(114−2)が、前記構造化言語要素への前記プロパティの前記変換を実行し、および前記文書(118)の出力ターゲット・ストリームをセットし、前記マッピング・クラス(114−3)が、前記マッピング・インターフェース(114−2)によって使用されるメソッドを提供する、請求項12に記載のシステム。The mapping module includes a mapping interface (114-2) and a mapping class (114-3), wherein the mapping interface (114-2) performs the conversion of the property to the structured language element. 13. A method for executing and setting an output target stream of the document (118), wherein the mapping class (114-3) provides methods used by the mapping interface (114-2). System. 前記出力ターゲット・ストリームが、バッファとして定義される、請求項13に記載のシステム。14. The system of claim 13, wherein the output target stream is defined as a buffer. 前記出力ターゲット・ストリームが、サーブレットの応答ストリームとして定義される、請求項13に記載のシステム。14. The system of claim 13, wherein the output target stream is defined as a servlet response stream. 前記構造化言語要素が、拡張可能マークアップ言語(XML)構成を表す、請求項12に記載のシステム。The system of claim 12, wherein the structured language element represents an extensible markup language (XML) configuration. 前記文書テンプレートが、Java(R)Server Pages(JSP)を使用して作成される、請求項16に記載のシステム。17. The system of claim 16, wherein the document template is created using Java (R) Server Pages (JSP). 構造化言語要素を含む文書(108)をソフトウェア・オブジェクト(110)に変換するシステムであって、
(a)前記文書(108)の特徴を表すイベントを取得するパーサ(104)と、
(b)前記文書(108)を読み取る入力ソース・クラス(106−1)と、
(c)前記入力ソース・クラス(106−1)と通信し、前記パーサ(104)によって得られる前記イベントをバッファするコンテント・ハンドラ・クラス(106−2)と、
(d)前記コンテント・ハンドラ・クラス(106−2)と通信し、前記パーサ(104)によって得られる前記イベントを前記ソフトウェア・オブジェクト(110)のプロパティに変換するマッピング・モジュール(106−3、106−4)と
を含むシステム。
A system for converting a document (108) containing structured language elements into a software object (110),
(A) a parser (104) for acquiring an event representing a characteristic of the document (108);
(B) an input source class (106-1) for reading the document (108);
(C) a content handler class (106-2) that communicates with the input source class (106-1) and buffers the event obtained by the parser (104);
(D) a mapping module (106-3, 106) that communicates with the content handler class (106-2) and converts the event obtained by the parser (104) into a property of the software object (110). -4).
前記マッピング・モジュールが、マッピング・インターフェース(106−4)とマッピング・クラス(106−3)とを含み、前記マッピング・インターフェース(106−4)が、前記プロパティへの前記イベントの前記変換を実行し、および前記ソフトウェア・オブジェクト(110)の出力ターゲット・ストリームをセットし、前記マッピング・クラス(106−3)が、前記マッピング・インターフェース(106−4)によって使用されるメソッドを提供する、請求項18に記載のシステム。The mapping module includes a mapping interface (106-4) and a mapping class (106-3), wherein the mapping interface (106-4) performs the conversion of the event to the property. And setting an output target stream of the software object (110), wherein the mapping class (106-3) provides a method used by the mapping interface (106-4). System. 前記構造化言語要素が、拡張可能マークアップ言語(XML)構成を表す、請求項19に記載のシステム。20. The system of claim 19, wherein the structured language element represents an extensible markup language (XML) configuration. プロパティを有するソフトウェア・オブジェクトを、構造化言語要素によって表される文書に変換する方法であって、
(a)呼び出されるマッピング・インターフェースのインスタンスに前記ソフトウェア・オブジェクトを供給することと、
(b)呼び出されるコンテナのインスタンスを使用してテンプレートをコンパイルし、実行することと、
(c)前記コンパイルされたテンプレートを使用して、指定された出力ストリームに前記文書を書き込むことと
を含む方法。
A method of converting a software object having properties into a document represented by a structured language element, comprising:
(A) providing the software object to an instance of a mapping interface to be invoked;
(B) compiling and executing the template using the instance of the container to be invoked;
(C) writing the document to a specified output stream using the compiled template.
さらに、処理の状態を維持するために前記マッピング・インターフェースをコール・バックすることを含む、請求項21に記載の方法。22. The method of claim 21, further comprising calling back the mapping interface to maintain a state of processing. さらに、前記文書の選択された部分を生成しなければならないかどうかを決定するために、前記コンパイルされたテンプレートを介してisOptionalElementPresentメソッドを呼び出すことを含む、請求項21に記載の方法。22. The method of claim 21, further comprising calling an isOptionalElementPresent method via the compiled template to determine whether a selected portion of the document must be generated. さらに、前記文書の選択された部分を生成しなければならないかどうかを決定するために、前記コンパイルされたテンプレートを介してisOptionalAttributePresentメソッドを呼び出すことを含む、請求項21に記載の方法。22. The method of claim 21, further comprising calling an isOptionalAttributePresent method via the compiled template to determine whether a selected portion of the document must be generated. さらに、前記文書内で複合型を生成する時に、スタックを使用して処理の状態を維持することを含み、前記複合型が、配列、再帰、および別の複合型内に含まれる複合型からなる群から選択される、請求項21に記載の方法。Further comprising maintaining a state of processing using a stack when generating the composite type in the document, wherein the composite type comprises an array, recursion, and a composite type contained within another composite type. 22. The method of claim 21, wherein the method is selected from a group. 前記スタックの前記状態が、前記複合型が開始され、終了する時を示すために前記コンパイルされたテンプレートから前記マッピング・インターフェースへコール・バックすることによって維持される、請求項25に記載の方法。26. The method of claim 25, wherein the state of the stack is maintained by calling back from the compiled template to the mapping interface to indicate when the complex type is started and finished. さらに、前記テンプレートが前記文書の選択された部分で何回ループするかを決定するためにgetElementRepetitionsメソッドを呼び出すことを含む、請求項21に記載の方法。22. The method of claim 21, further comprising invoking a getElementRepetitions method to determine how many times the template loops at a selected portion of the document. 前記構造化言語要素が、拡張可能マークアップ言語(XML)構成を表し、前記テンプレートが、Java(R)Server Pages(JSP)を使用して作成される、請求項21に記載の方法。22. The method of claim 21, wherein the structured language element represents an extensible markup language (XML) configuration and the template is created using Java Server Pages (JSP). 構造化言語要素を含む文書をソフトウェア・オブジェクトに変換する方法であって、
(a)呼び出されるマッピング・インターフェースのインスタンスに前記文書を供給することと、
(b)前記マッピング・インターフェースをコンテント・ハンドラとして登録することと、
(c)呼び出されるパーサのインスタンスを使用して前記文書を構文解析することと、
(d)前記ソフトウェア・オブジェクトに、前記マッピング・インターフェースに対して行われるコール・バックを介して前記文書から解析される前記構造化言語要素に関連するプロパティを移植することと
を含む方法。
A method of converting a document containing structured language elements into a software object,
(A) providing the document to an instance of the mapping interface to be invoked;
(B) registering the mapping interface as a content handler;
(C) parsing said document using an instance of the called parser;
(D) populating the software object with properties associated with the structured language element parsed from the document via a callback made to the mapping interface.
ステップ(d)が、startDocument、startElement、characters、endElement、およびendDocumentからなる群から選択されるメソッドを呼び出すためのコール・バックを含む、請求項29に記載の方法。30. The method of claim 29, wherein step (d) includes a callback for invoking a method selected from the group consisting of startDocument, startElement, characters, endElement, and endDocument. 前記マッピング・インターフェースによって実行されるstartDocumentメソッドおよびstartElementメソッドが、前記ソフトウェア・オブジェクトを作成する、請求項30に記載の方法。31. The method of claim 30, wherein a startDocument method and a startElement method executed by the mapping interface create the software object. 前記マッピング・インターフェースによって実行されるendElementメソッドが、前記ソフトウェア・オブジェクトに前記プロパティをセットする、請求項29に記載の方法。30. The method of claim 29, wherein an endElement method executed by the mapping interface sets the property on the software object. 前記構造化言語要素が、拡張可能マークアップ言語(XML)構成を表す、請求項29に記載の方法。The method of claim 29, wherein the structured language element represents an extensible markup language (XML) configuration. ソフトウェア・オブジェクトを表すデータ構造を、文書の構造化言語要素に変換するコンピュータ・プログラム製品であって、
(a)構造化言語要素テンプレート文書を生成するコンピュータ可読プログラム・コード・デバイスと、
(b)前記ソフトウェア・オブジェクトから、前記文書の前記構造化言語要素に関連するプロパティを読み取るコンピュータ可読プログラム・コード・デバイスと、
(c)前記プロパティを使用して、前記プロパティと前記構造化言語要素との間の前記関連に基づいて、前記構造化言語要素によって定義される構成を得るコンピュータ可読プログラム・コード・デバイスと、
(d)前記構造化言語要素テンプレート文書に前記構成を移植するコンピュータ可読プログラム・コード・デバイスと
を含むコンピュータ・プログラム製品。
A computer program product for converting a data structure representing a software object into a structured language element of a document,
(A) a computer readable program code device for generating a structured language element template document;
(B) a computer readable program code device for reading properties associated with the structured language element of the document from the software object;
(C) using the property to obtain a configuration defined by the structured language element based on the association between the property and the structured language element; and
(D) a computer readable program code device for porting the configuration to the structured language element template document.
ステップ(c)が、前記文書の構造および内容を定義する前記構成を表すイベントを得るための前記ソフトウェア・オブジェクトへの直接コール・バックを含む、請求項34に記載のコンピュータ・プログラム製品。35. The computer program product of claim 34, wherein step (c) comprises a direct call back to the software object to obtain an event representing the structure defining the structure and content of the document. ステップ(c)が、前記文書の構造および内容を表すオブジェクト・モデルを作成することを含む、請求項34に記載のコンピュータ・プログラム製品。35. The computer program product of claim 34, wherein step (c) comprises creating an object model representing the structure and content of the document. 前記構造化言語要素が、拡張可能マークアップ言語(XML)構成を表す、請求項34に記載のコンピュータ・プログラム製品。35. The computer program product of claim 34, wherein the structured language element represents an extensible markup language (XML) configuration. ステップ(c)が、反復される構造化言語要素を処理するために前記テンプレート文書内でループを構成することを含む、請求項34に記載のコンピュータ・プログラム製品。35. The computer program product of claim 34, wherein step (c) comprises constructing a loop in the template document to process the repeated structured language element. 文書の構造化言語要素を、ソフトウェア・オブジェクトを表すデータ構造に変換するコンピュータ・プログラム製品であって、
(a)前記文書の前記構造化言語要素のそれぞれを読み取るコンピュータ可読プログラム・コード・デバイスと、
(b)前記ソフトウェア・オブジェクトの前記データ構造によって定義される使用可能なプロパティの組から選択される、前記文書の構造化言語要素に関連するプロパティを決定するコンピュータ可読プログラム・コード・デバイスと、
(c)前記ソフトウェア・オブジェクトを表す前記データ構造の前記プロパティに、前記文書からの構造化言語要素値を移植するコンピュータ可読プログラム・コード・デバイスと
を含むコンピュータ・プログラム製品。
A computer program product that converts a structured language element of a document into a data structure representing a software object,
(A) a computer readable program code device for reading each of the structured language elements of the document;
(B) a computer readable program code device for determining a property associated with a structured language element of the document selected from a set of available properties defined by the data structure of the software object;
(C) a computer readable program code device for populating a structured language element value from the document into the property of the data structure representing the software object.
ステップ(a)が、前記文書の構造および内容を表すイベントを生成することを含む、請求項39に記載のコンピュータ・プログラム製品。40. The computer program product of claim 39, wherein step (a) comprises generating an event representing the structure and content of the document. ステップ(a)が、前記文書の構造および内容を表すイベントを用いてハンドラをコール・バックすることを含む、請求項39に記載のコンピュータ・プログラム製品。40. The computer program product of claim 39, wherein step (a) comprises calling back a handler with events representing the structure and content of the document. ステップ(a)が、前記文書の構造および内容を表すオブジェクト・モデルを作成することを含む、請求項39に記載のコンピュータ・プログラム製品。40. The computer program product of claim 39, wherein step (a) comprises creating an object model representing the structure and content of the document. 前記構造化言語要素が、拡張可能マークアップ言語(XML)構成を表し、ステップ(a)が、さらに、文書型定義(DTD)およびXMLスキーマ標準規格を実施することを含む、請求項39に記載のコンピュータ・プログラム製品。40. The structured language element according to claim 39, wherein the structured language element represents an extensible markup language (XML) construct, and step (a) further comprises implementing a document type definition (DTD) and an XML schema standard. Computer program products. さらに、再帰XML構成についてスタックを維持することを含む、請求項43に記載のコンピュータ・プログラム製品。44. The computer program product of claim 43, further comprising maintaining a stack for a recursive XML configuration.
JP2003504271A 2001-06-07 2001-12-28 System and method for mapping between software objects and document-based structured language elements Pending JP2004530225A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CA002349905A CA2349905A1 (en) 2001-06-07 2001-06-07 System and method of mapping between software objects and structured language element based documents
PCT/US2001/049577 WO2002101579A1 (en) 2001-06-07 2001-12-28 System & method of mapping between software objects & structured language element-based documents

Publications (1)

Publication Number Publication Date
JP2004530225A true JP2004530225A (en) 2004-09-30

Family

ID=4169222

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003504271A Pending JP2004530225A (en) 2001-06-07 2001-12-28 System and method for mapping between software objects and document-based structured language elements

Country Status (11)

Country Link
EP (1) EP1399841A1 (en)
JP (1) JP2004530225A (en)
KR (1) KR100583517B1 (en)
CN (1) CN1313953C (en)
CA (1) CA2349905A1 (en)
CZ (1) CZ20033330A3 (en)
HU (1) HUP0400135A2 (en)
PL (1) PL367225A1 (en)
RU (1) RU2287181C2 (en)
TW (1) TW573278B (en)
WO (1) WO2002101579A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010211403A (en) * 2009-03-09 2010-09-24 Nec System Technologies Ltd Information processing apparatus, development processing method of multidimensional array, and program
WO2023053867A1 (en) * 2021-09-29 2023-04-06 株式会社スカイディスク System, server, and method

Families Citing this family (38)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003091419A (en) * 2001-09-19 2003-03-28 Just Syst Corp Information processor and its program
US7861250B2 (en) 2003-04-25 2010-12-28 Microsoft Corporation Runtime polymorphism
US7194485B2 (en) 2003-11-21 2007-03-20 International Business Machines Corporation Mapping XML schema components to qualified java components
US7212410B2 (en) 2004-01-16 2007-05-01 Finisar Corporation Actuator for small form-factor pluggable transceiver
US7418456B2 (en) 2004-01-16 2008-08-26 International Business Machines Corporation Method for defining a metadata schema to facilitate passing data between an extensible markup language document and a hierarchical database
US7290012B2 (en) 2004-01-16 2007-10-30 International Business Machines Corporation Apparatus, system, and method for passing data between an extensible markup language document and a hierarchical database
US7120864B2 (en) 2004-01-27 2006-10-10 International Business Machines Corporation Eliminating superfluous namespace declarations and undeclaring default namespaces in XML serialization processing
CN1306400C (en) * 2004-05-20 2007-03-21 北京大学 Binary system software member and its manufacturing method
CN100336023C (en) * 2004-08-24 2007-09-05 英业达股份有限公司 Method for realizing software call through keyword associated mechanism
KR100653610B1 (en) 2004-09-15 2006-12-04 (주)웹플러스 On-line flash editing system with reinforced function of editing navigation bar
US7694284B2 (en) * 2004-11-30 2010-04-06 International Business Machines Corporation Shareable, bidirectional mechanism for conversion between object model and XML
US20060123345A1 (en) * 2004-12-06 2006-06-08 International Business Machines Corporation Platform-independent markup language-based gui format
US7904417B2 (en) 2006-02-27 2011-03-08 Microsoft Corporation Recursive metadata templating
KR100836736B1 (en) * 2006-09-27 2008-06-10 한국전자통신연구원 Apparatus for Parser Framework using Markup Language and Method thereof
US8578350B2 (en) * 2006-11-30 2013-11-05 Ncr Corporation System and method for interpreting a specification language file to implement a business system
US8381093B2 (en) 2006-12-06 2013-02-19 Microsoft Corporation Editing web pages via a web browser
US8880564B2 (en) * 2007-10-11 2014-11-04 Microsoft Corporation Generic model editing framework
CN101355560B (en) * 2008-09-12 2011-12-14 深圳市联软科技有限公司 Method and system for transmitting data
US9250938B2 (en) 2008-10-15 2016-02-02 Microsoft Technology Licensing, Llc Caching runtime generated code
US8347208B2 (en) * 2009-03-04 2013-01-01 Microsoft Corporation Content rendering on a computer
US20100235806A1 (en) * 2009-03-13 2010-09-16 Microsoft Corporation Rich Web Site Authoring And Design
US10089119B2 (en) 2009-12-18 2018-10-02 Microsoft Technology Licensing, Llc API namespace virtualization
CN101826113A (en) * 2010-05-14 2010-09-08 珠海世纪鼎利通信科技股份有限公司 High-efficiency and unified method for storing wireless measurement data
US8776094B2 (en) 2011-08-11 2014-07-08 Microsoft Corporation Runtime system
US8695021B2 (en) 2011-08-31 2014-04-08 Microsoft Corporation Projecting native application programming interfaces of an operating system into other programming languages
KR101535703B1 (en) 2012-09-28 2015-07-09 삼성에스디에스 주식회사 Apparatus and method for converting Value Object
US9075618B2 (en) 2012-11-02 2015-07-07 Microsoft Technology Licensing, Llc Cross-platform data visualizations using common descriptions
RU2527201C1 (en) * 2013-01-24 2014-08-27 Общество с ограниченной ответственностью "Системное моделирование и анализ" Data conversion method, data conversion device and data conversion system
KR102095703B1 (en) * 2013-06-20 2020-04-01 에스케이플래닛 주식회사 An apparatus, method and recording medium for Markup parsing
US10635504B2 (en) 2014-10-16 2020-04-28 Microsoft Technology Licensing, Llc API versioning independent of product releases
CN104636265B (en) * 2015-01-21 2016-04-27 广东电网有限责任公司电力科学研究院 A kind of access method of efficient memory model tissue of CIMXML document
CN106407679B (en) * 2016-09-13 2019-03-26 上海市徐汇区中心医院 Mobile interchange cross-platform cross equipment remote diagnosis system
KR102255806B1 (en) * 2017-07-03 2021-05-26 (주)더리스 Integrated management method and system of online shopping mall based on API
CN108519964B (en) * 2018-03-09 2022-03-04 中国工程物理研究院计算机应用研究所 Method for converting XML Schema document into Java code
CN110795169B (en) * 2018-08-02 2022-11-11 武汉斗鱼网络科技有限公司 Method and related device for acquiring data
CN110795168B (en) * 2018-08-02 2022-11-11 武汉斗鱼网络科技有限公司 Method for acquiring data and related device
CN113505269B (en) * 2021-07-02 2024-03-29 卡斯柯信号(成都)有限公司 Binary file detection method and device based on XML
CN113742008B (en) * 2021-09-13 2024-04-02 挂号网(杭州)科技有限公司 Interface calling method and device, electronic equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5926189A (en) * 1996-03-29 1999-07-20 Apple Computer, Inc. Method and apparatus for typographic glyph construction including a glyph server
US6343265B1 (en) * 1998-07-28 2002-01-29 International Business Machines Corporation System and method for mapping a design model to a common repository with context preservation
US6226675B1 (en) * 1998-10-16 2001-05-01 Commerce One, Inc. Participant server which process documents for commerce in trading partner networks
US6125391A (en) * 1998-10-16 2000-09-26 Commerce One, Inc. Market makers using documents for commerce in trading partner networks
EP1266317A4 (en) * 1999-06-14 2005-12-14 Integral Dev Corp System and method for conducting web-based financial transactions in capital markets
US6327628B1 (en) * 2000-05-19 2001-12-04 Epicentric, Inc. Portal server that provides a customizable user Interface for access to computer networks

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010211403A (en) * 2009-03-09 2010-09-24 Nec System Technologies Ltd Information processing apparatus, development processing method of multidimensional array, and program
WO2023053867A1 (en) * 2021-09-29 2023-04-06 株式会社スカイディスク System, server, and method
JP2023049888A (en) * 2021-09-29 2023-04-10 株式会社スカイディスク System, server and method
JP7315253B2 (en) 2021-09-29 2023-07-26 株式会社スカイディスク System, server and method

Also Published As

Publication number Publication date
HUP0400135A2 (en) 2004-08-30
TW573278B (en) 2004-01-21
CZ20033330A3 (en) 2004-03-17
RU2003137567A (en) 2005-05-27
RU2287181C2 (en) 2006-11-10
PL367225A1 (en) 2005-02-21
WO2002101579A1 (en) 2002-12-19
CN1313953C (en) 2007-05-02
CA2349905A1 (en) 2002-12-07
EP1399841A1 (en) 2004-03-24
CN1513145A (en) 2004-07-14
KR20040007545A (en) 2004-01-24
KR100583517B1 (en) 2006-05-24

Similar Documents

Publication Publication Date Title
JP2004530225A (en) System and method for mapping between software objects and document-based structured language elements
US20040168124A1 (en) System and method of mapping between software objects & structured language element-based documents
US7480894B2 (en) Method and system for retaining formal data model descriptions between server-side and browser-side javascript objects
US7233956B2 (en) Method and apparatus for data migration between databases
US7366973B2 (en) Item, relation, attribute: the IRA object model
US20030135825A1 (en) Dynamically generated mark-up based graphical user interfaced with an extensible application framework with links to enterprise resources
US20030182452A1 (en) System and method for implementing a schema object model in application integration
US20070219959A1 (en) Computer product, database integration reference method, and database integration reference apparatus
US20020099738A1 (en) Automated web access for back-end enterprise systems
US20040268238A1 (en) Systems and methods for processing documents using an XML-based process flow description language
JP2005018776A (en) Query intermediate language method and system
US20020143816A1 (en) Method and system for using a generalized execution engine to transform a document written in a markup-based declarative template language into specified output formats
WO2003034228A1 (en) System and method for implementing a schema object model in application integration
Bosch et al. XSLT transformation generating OWL ontologies automatically based on XML Schemas
Zou et al. Towards a portable XML-based source code representation
JP2006510955A (en) Context-independent framework system and method for managing and executing XML processing tasks
US7305667B1 (en) Call back structures for user defined DOMs
Zdun et al. Content conversion and generation on the web: A pattern language
Manola Some Web Object Model Construction Technologies
Emir et al. Scalable programming abstractions for XML services
KR20010113472A (en) A method and apparatus defining a component model for creating dynamic document in a distributed data processing system
Rinderle-Ma et al. From Databases to Exchange Formats
Jung XML-Digital Glue for the Modern World-Electronic Business Standards Fuelling Intra-and Inter-Enterprise Interoperability for Global Collaboration
Malý XML Document Adaptation and Integrity Constraints in XML
Jung XML-Digital Glue for the Modern World

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050525

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050726

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20051024

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051024

RD12 Notification of acceptance of power of sub attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7432

Effective date: 20051024

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20051024

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20060525

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060525

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20060525

A911 Transfer to examiner for re-examination before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20060703

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060825

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20061018

RD14 Notification of resignation of power of sub attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7434

Effective date: 20061018

A912 Re-examination (zenchi) completed and case transferred to appeal board

Free format text: JAPANESE INTERMEDIATE CODE: A912

Effective date: 20070202