JP2007164630A - Information processor, control method, program and storage medium - Google Patents

Information processor, control method, program and storage medium Download PDF

Info

Publication number
JP2007164630A
JP2007164630A JP2005362369A JP2005362369A JP2007164630A JP 2007164630 A JP2007164630 A JP 2007164630A JP 2005362369 A JP2005362369 A JP 2005362369A JP 2005362369 A JP2005362369 A JP 2005362369A JP 2007164630 A JP2007164630 A JP 2007164630A
Authority
JP
Japan
Prior art keywords
object model
structured document
processing apparatus
schema
information processing
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.)
Granted
Application number
JP2005362369A
Other languages
Japanese (ja)
Other versions
JP4942144B2 (en
Inventor
Hitoshi Uchida
均 内田
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2005362369A priority Critical patent/JP4942144B2/en
Publication of JP2007164630A publication Critical patent/JP2007164630A/en
Application granted granted Critical
Publication of JP4942144B2 publication Critical patent/JP4942144B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Document Processing Apparatus (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a technique for allowing an application to access a structured document at low cost. <P>SOLUTION: This information processor comprises an input means for inputting structured document information; a model generation means for generating an object model having a tree structure based on the structured document information; a determination means for determining a condition for reconfiguring the tree structure; a reconfiguration means for reconfiguring the object model based on the condition determined by the determination means; and a file generation means for generating a class file based on the object model reconfigured by the reconfiguration means. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は構造化文書を処理するための情報処理技術に関する。   The present invention relates to an information processing technique for processing a structured document.

従来より、XML等の構造化文書をアプリケーションにおいて読み取り、読み取った構造化文書のデータを操作する技術としてDOMやSAXが一般的に知られている。ただし、XMLは、Extensible Markup Languageの略称である。また、DOMは、Document Object Model(ドキュメント・オブジェクト・モデル)の略称である。また、SAXは、Simple API for XMLの略称である。   Conventionally, DOM and SAX are generally known as techniques for reading a structured document such as XML in an application and operating the data of the read structured document. However, XML is an abbreviation for Extensible Markup Language. DOM is an abbreviation for Document Object Model. SAX is an abbreviation for Simple API for XML.

しかし、これらの技術を利用して、構造化文書の読み取りや操作の処理を有するアプリケーションを、所定のプログラミング言語で実装する場合、開発者は、構造化文書の構造を事前に知っている必要がある。このため、異なる文書構造を持つ構造化文書のデータの読み取りや操作を行うアプリケーションを作成するために、開発者は構造化文書の構造に合わせたDOMやSAXのアプリケーションを作り直さなければならない場合があった。このように、DOMやSAXを用いた開発は、多くの時間を要することがあった。   However, when using these technologies to implement an application that has the processing of reading and operating a structured document in a predetermined programming language, the developer needs to know the structure of the structured document in advance. is there. For this reason, in order to create an application that reads and manipulates data of a structured document having a different document structure, the developer may have to recreate a DOM or SAX application that matches the structure of the structured document. It was. As described above, development using DOM or SAX may take a lot of time.

上記の問題に鑑み、近年、Sun MicrosystemsのJAXBや浅海智晴氏のRelaxerなどのデータバインディングツールが開発されている。これらのデータバインディングツールは、スキーマコンパイラを用いることによりXML SchemaやRELAX NGといったスキーマを基にプログラミング言語JAVAで記述されたプログラムを自動生成する。自動生成されたJAVAにより記述されたプログラムを用いることによって、構造化文書をJAVAのクラスに読み込む処理や構造化文書としてファイルに書き出す処理等の、構造化文書へのアクセスを容易に実行することができる。   In view of the above problems, data binding tools such as Sun Microsystems's JAXB and Toshiharu Asami's Relaxer have been developed in recent years. These data binding tools automatically generate a program described in a programming language JAVA based on a schema such as XML Schema or RELAX NG by using a schema compiler. By using an automatically generated program written in JAVA, it is possible to easily execute access to a structured document, such as a process of reading a structured document into a JAVA class or a process of writing a structured document to a file. it can.

DOMやSAXを利用するアプリケーションをプログラミングする場合、構造化文書の構造に合わせたプログラムを開発する必要があり、プログラムの開発工程数が非常に多くなる。これに対し、データバインディングツールを用いた開発においては、自動生成されるJAVAのAPIを用いることによりアプリケーションにおいて構造化文書のデータをJAVAのメンバ変数として指定できる。このため、プログラムの開発工程数を削減することができ、プログラム開発者の負担を減らすことができる。   When programming an application using DOM or SAX, it is necessary to develop a program in accordance with the structure of the structured document, and the number of program development steps is very large. On the other hand, in development using a data binding tool, structured document data can be designated as a JAVA member variable in an application by using an automatically generated JAVA API. For this reason, the number of program development steps can be reduced, and the burden on the program developer can be reduced.

スキーマ文書を基に自動生成されたJAVAのプログラムを用いて、構造化文書のデータをアプリケーションにおいて扱うことのできるデータに変換する処理をアンマーシャルと呼ぶ。また、自動生成されたJAVAのプログラムを用いて、アプリケーションがJAVAのクラスに格納しているデータを構造化文書のデータとしてファイルに書き出す操作をマーシャルと呼ぶ。   A process of converting structured document data into data that can be handled in an application using a JAVA program automatically generated based on a schema document is called unmarshalling. In addition, an operation in which the data stored in the JAVA class by the application using the automatically generated JAVA program is written to the file as structured document data is referred to as marshalling.

図1はJAVAで記述されたプログラムに読み込む構造化文書(図1(b))と構造化文書に対応するベクターグラフィックス(図1(a))を例示した図である。   FIG. 1 is a diagram illustrating a structured document (FIG. 1B) read into a program described in JAVA and vector graphics (FIG. 1A) corresponding to the structured document.

図2は図1(b)の構造化文書と妥当な関係にあるスキーマ文書の例として、XML Schemaの記述を例示した図である。   FIG. 2 is a diagram illustrating the description of XML Schema as an example of a schema document that has a reasonable relationship with the structured document of FIG.

図3、図4は、図2に示したスキーマ文書を入力としてデータバインディングツールJAXBに含まれるスキーマコンパイラxjc.shを用いて自動生成されたJAVAで記述されたAPIを例示した図である。図3、図4と図2を比較して明らかなように、JAXBのスキーマコンパイラによって自動生成されるJAVAのクラスの入れ子構造は、その基となるスキーマの入れ子構造と対応関係がある。構造化文書のデータを読み込む処理やJAVAのクラスに格納されたデータを構造化文書としてファイルに書き出す処理を行うアプリケーションは、自動生成されたJAVAのAPIを利用することによりアンマーシャルやマーシャルを行うことができる。なお、JAXBは、アンマーシャル、マーシャルの処理をする際に、スキーマと構造化文書の妥当性を検証する機能も有している。   FIGS. 3 and 4 are diagrams illustrating an API described in JAVA automatically generated using the schema compiler xjc.sh included in the data binding tool JAXB with the schema document shown in FIG. 2 as an input. As is clear from comparison between FIGS. 3, 4, and 2, the nested structure of the JAVA class automatically generated by the JAXB schema compiler has a corresponding relationship with the nested structure of the underlying schema. An application that performs processing for reading structured document data or writing data stored in a JAVA class as a structured document to a file may perform unmarshalling or marshalling by using an automatically generated JAVA API. Can do. JAXB also has a function of verifying the validity of the schema and the structured document when unmarshalling and marshalling are performed.

データバインディングツールは、例えば、グラフィカルユーザーインターフェースを備えたプログラム開発において利用することができる。例えば、グラフィカルユーザーインターフェースの画面を構造化文書として記述し、構造化文書をJAXBやRelaxerなどのスキーマコンパイラを用いることによりプログラムの基本部分を自動生成できるようになる。   The data binding tool can be used, for example, in program development with a graphical user interface. For example, a basic part of a program can be automatically generated by describing a screen of a graphical user interface as a structured document and using a schema compiler such as JAXB or Relaxer for the structured document.

上記のように、データバインディングツールを用いた開発は、DOMやSAXを用いてプログラムを実装する場合に比べて、プログラム開発者が直接コーディングするコードが短くなり、アプリケーションの開発効率を上げることが可能となる。また、上記のように、JAXBコンパイラによって生成されるJAVAのAPIに係るプログラムとアプリケーション共通のライブラリとを用いることによりを用いることによりXML文書をJAVAのクラスに変換(マッピング)する。このため、JAVAのアプリケーションはXMLの文書構造を知らなくてもXMLのデータをアプリケーションにおいて利用することができる。
特開2003−203067号公報
As described above, the development using the data binding tool can shorten the code directly coded by the program developer compared to the case where the program is implemented using DOM or SAX, and can improve the development efficiency of the application. It becomes. In addition, as described above, an XML document is converted (mapped) into a JAVA class by using a program related to the API of JAVA generated by the JAVB compiler and using a library common to applications. Therefore, a JAVA application can use XML data in the application without knowing the XML document structure.
JP 2003-203667 A

しかし、JAXBやRelaxerなど既存のデータバインディングツールは、スキーマ文書をもとにJAVAのAPIに係るプログラムを自動生成する。このため、APIを用いてアンマーシャルやマーシャル処理するアプリケーションにとって不要なデータを処理するためのプログラムがAPIに含まれる場合がある。このような不要なAPIに係るプログラムには、使用しないデータを処理するためのJAVAクラスや変数、メソッド等のソースコードが含まれる。   However, existing data binding tools such as JAXB and Relaxer automatically generate a program related to JAVA API based on the schema document. For this reason, the API may include a program for processing data unnecessary for an application that performs unmarshalling or marshalling using the API. Such an unnecessary API-related program includes source codes such as JAVA classes, variables, and methods for processing unused data.

また、APIをリソースの限られた機器のアプリケーションにおいて使用する場合、アプリケーションにとって不要なデータを操作するプログラムを含むため、多くの記憶容量を必要としてしまう。また、アプリケーションにおいてマーシャルやアンマーシャルする際に、不要なJAVAのクラスをインスタンス化してしまうことによってCPUの多くの処理時間を必要としてしまう。   Further, when the API is used in an application of a device with limited resources, a program for manipulating data unnecessary for the application is included, so that a large storage capacity is required. Further, when marshalling or unmarshalling in an application, a lot of processing time of the CPU is required by instantiating an unnecessary JAVA class.

本発明は上記問題に鑑みなされたものであり、アプリケーションが低コストで構造化文書へアクセスすることを可能にする技術を提供することを目的とする。   The present invention has been made in view of the above problems, and an object of the present invention is to provide a technique that enables an application to access a structured document at a low cost.

上記目的を達成するため、本発明による情報処理装置は以下の構成を備える。即ち、
構造化文書情報を入力する入力手段と、
前記構造化文書情報に基づいてツリー構造をなすオブジェクトモデルを生成するモデル生成手段と、
前記ツリー構造を再構成する条件を決定する決定手段と、
前記決定手段において決定された条件に基づいて前記オブジェクトモデルを再構成する再構成手段と、
前記再構成手段により再構成されたオブジェクトモデルに基づいてクラスファイルを生成するファイル生成手段と、を備える。
In order to achieve the above object, an information processing apparatus according to the present invention comprises the following arrangement. That is,
An input means for inputting structured document information;
Model generation means for generating an object model having a tree structure based on the structured document information;
Determining means for determining conditions for reconstructing the tree structure;
Reconstructing means for reconstructing the object model based on the condition determined by the determining means;
File generating means for generating a class file based on the object model reconfigured by the reconfiguring means.

また、上記目的を達成するため、本発明による情報処理装置の制御方法は以下の構成を備える。即ち、
構造化文書情報を入力する入力工程と、
前記構造化文書情報に基づいてツリー構造をなすオブジェクトモデルを生成するモデル生成工程と、
前記ツリー構造を再構成する条件を決定する決定工程と、
前記決定工程において決定された条件に基づいて前記オブジェクトモデルを再構成する再構成工程と、
前記再構成工程において再構成されたオブジェクトモデルに基づいてクラスファイルを生成するファイル生成工程と、を備える。
In order to achieve the above object, a method for controlling an information processing apparatus according to the present invention comprises the following arrangement. That is,
An input process for inputting structured document information;
A model generation step of generating an object model having a tree structure based on the structured document information;
A determining step for determining conditions for reconstructing the tree structure;
A reconfiguration step of reconfiguring the object model based on the conditions determined in the determination step;
A file generation step of generating a class file based on the object model reconfigured in the reconfiguration step.

本発明によれば、アプリケーションが低コストで構造化文書へアクセスすることを可能にする技術を提供することができる。   According to the present invention, it is possible to provide a technique that enables an application to access a structured document at a low cost.

以下、添付図面を参照して本発明に係る実施の形態を詳細に説明する。ただし、この実施の形態に記載されている構成要素はあくまでも例示であり、本発明の範囲をそれらのみに限定する趣旨のものではない。   Embodiments according to the present invention will be described below in detail with reference to the accompanying drawings. However, the constituent elements described in this embodiment are merely examples, and are not intended to limit the scope of the present invention only to them.

(システム構成)
図5は本実施形態に係る情報処理装置を含むシステムの概要を例示したブロック図である。図5において、スキャナ101は、ネットワーク102に接続されている。ネットワーク102には、携帯機器103、クライアントとしてのPC104、ネットワークプリンタ105、ファイルサーバ106が接続されている。
(System configuration)
FIG. 5 is a block diagram illustrating an outline of a system including the information processing apparatus according to this embodiment. In FIG. 5, the scanner 101 is connected to the network 102. A mobile device 103, a PC 104 as a client, a network printer 105, and a file server 106 are connected to the network 102.

携帯機器103は、本実施形態に係る情報処理装置として機能する装置であり、PDAやデジタルカメラ、携帯電話、PHS等により実現される。   The mobile device 103 is a device that functions as an information processing device according to the present embodiment, and is realized by a PDA, a digital camera, a mobile phone, a PHS, or the like.

スキャナ101は、文書を光学的に読み取り画像データを生成する装置である。PC104は、デスクトップPC、ノートブックPC等のコンピュータ装置である。ネットワークプリンタ105は、ネットワーク102を経由して入力された画像データに基づいて、所定の記録媒体(記録用紙)に画像を形成する装置である。ファイルサーバ106は、ファイルを記憶する記憶装置を有し、ネットワーク102を介してファイルの入出力や、記憶装置に記憶されたファイルの管理等を行う。   The scanner 101 is a device that optically reads a document and generates image data. The PC 104 is a computer device such as a desktop PC or a notebook PC. The network printer 105 is an apparatus that forms an image on a predetermined recording medium (recording paper) based on image data input via the network 102. The file server 106 includes a storage device that stores files, and performs input / output of files and management of files stored in the storage device via the network 102.

ネットワーク102は、典型的には、インターネットであるが、有線/無線を問わず、公衆回線(アナログ回線、ISDN等)やLAN、WAN、無線LAN等のデータ送受信可能な回線であれば、どのような構成でもよい。ネットワークを用いた通信プロトコルは、例えば、TCP/IP等を採用することができる。   The network 102 is typically the Internet, but it may be any line that can send and receive data, such as a public line (analog line, ISDN, etc.), LAN, WAN, or wireless LAN, regardless of whether it is wired or wireless. It may be a simple configuration. As a communication protocol using a network, for example, TCP / IP or the like can be adopted.

以下、携帯機器103において、XMLにより記述された画像(ベクターグラフィックス)を表示するアプリケーションを実行する場合について例示的に説明するが、アプリケーションはこれに限られない。また、処理を実行する装置は携帯機器103に限られず、例えば、汎用のPCやWS等においても実行可能であることは言うまでもない。   Hereinafter, although a case where an application that displays an image (vector graphics) described in XML is executed in the portable device 103 will be described as an example, the application is not limited thereto. Further, the apparatus for executing the process is not limited to the portable device 103, and it is needless to say that the apparatus can be executed in, for example, a general-purpose PC or WS.

(携帯機器103の構成)
次に、携帯機器103の構成について図6を参照して説明する。図6は図5に例示したシステムにおける、携帯機器103の構成を示したブロック図である。
(Configuration of portable device 103)
Next, the configuration of the mobile device 103 will be described with reference to FIG. FIG. 6 is a block diagram illustrating a configuration of the mobile device 103 in the system illustrated in FIG.

図6において、CPU201はシステム制御部であり、装置全体の動作を制御する。   In FIG. 6, a CPU 201 is a system control unit and controls the operation of the entire apparatus.

ROM202は、CPUの制御プログラムや各種固定データを格納する読み出し専用のメモリ装置である。RAM203は、SRAM、DRAMなどで構成され、プログラム制御変数などを格納する書き込み可能なメモリ装置である。また、各種設定パラメータ、各種ワーク用バッファもRAM203に格納されている。   The ROM 202 is a read-only memory device that stores a CPU control program and various fixed data. The RAM 203 is a writable memory device configured with SRAM, DRAM, or the like and storing program control variables and the like. Various setting parameters and various work buffers are also stored in the RAM 203.

記憶部204はハードディスク等で構成される記憶装置であり、文書や画像などのスキャン画像等を格納する。操作パネル205はキーボード、タッチパネルなどで構成され、オペレータが各種入力操作を行うために利用される。表示部206は、LCD、LEDなどでオペレータに表示通知するディスプレイとして機能する。   The storage unit 204 is a storage device configured by a hard disk or the like, and stores scanned images such as documents and images. The operation panel 205 includes a keyboard, a touch panel, and the like, and is used by an operator to perform various input operations. The display unit 206 functions as a display for notifying an operator of display using an LCD, an LED, or the like.

LAN I/F207及びLAN I/F209は所定のネットワークに接続するためのネットワークインタフェースである。即ち、LAN I/F207は、LAN回線208に接続するためのインターフェースである。無線LAN I/F209は無線LAN回線210に接続するためのインターフェースである。   A LAN I / F 207 and a LAN I / F 209 are network interfaces for connecting to a predetermined network. That is, the LAN I / F 207 is an interface for connecting to the LAN line 208. The wireless LAN I / F 209 is an interface for connecting to the wireless LAN line 210.

尚、以上の各装置と同等の機能を実現するソフトウェアにより、ハードウェア装置の代替として構成することもできる。   In addition, it can also be comprised as an alternative of a hardware apparatus with the software which implement | achieves a function equivalent to the above each apparatus.

本実施形態では、本実施形態に係るプログラムを動作させる度に、既にプログラムがインストールされている記憶部204からRAM203にロードして実行する例を示すがこれに限られない。例えば、所定のメディア(不図示)から本実施形態に係るプログラム及び関連データを直接RAM203にロードして実行させてもよい。或いは、本実施形態に係るプログラムをROM202に記録しておき、これをメモリマップの一部をなすように構成し、直接CPU201で実行することも可能である。   In this embodiment, every time the program according to this embodiment is operated, an example is shown in which the program is loaded from the storage unit 204 in which the program is already installed into the RAM 203 and executed, but the present invention is not limited thereto. For example, the program and related data according to the present embodiment may be directly loaded into the RAM 203 from a predetermined medium (not shown) and executed. Alternatively, the program according to the present embodiment may be recorded in the ROM 202, configured to form part of the memory map, and directly executed by the CPU 201.

また、本実施形態では、説明の便宜のため、本実施形態に係る情報処理装置(携帯機器103)を1つの装置で実現した構成について述べるが、複数の装置にリソースを分散した構成によって実現してもよい。例えば、記憶や演算のリソースを複数の装置に分散した形に構成してもよい。或いは、情報処理装置上で仮想的に実現される構成要素毎にリソースを分散し、並列処理を行うようにしてもよい。   In the present embodiment, for convenience of explanation, a configuration in which the information processing apparatus (mobile device 103) according to the present embodiment is realized by one device will be described. However, the configuration is realized by a configuration in which resources are distributed to a plurality of devices. May be. For example, storage and calculation resources may be distributed in a plurality of devices. Alternatively, resources may be distributed for each component virtually realized on the information processing apparatus, and parallel processing may be performed.

(シナリオ)
例えば、リソースの限られている携帯機器103上にベクターグラフィックスを表示する場合、その表示処理においてはXMLのヘッダ情報(例えば、図1の111)が不要な場合がある。また、ベクターグラフィックスに高画質の画像が含まれる際、携帯機器のアプリケーションが容量の重い画像データを読み込まないようにすることによってアプリケーションの処理速度が向上する場合が考えられる。後述するように、本実施形態に係る構成は、このような処理が不要なXMLの箇所について処理を行わないように制御する。
(scenario)
For example, when displaying vector graphics on the mobile device 103 with limited resources, XML display header information (for example, 111 in FIG. 1) may not be necessary in the display process. In addition, when vector graphics include a high-quality image, it may be possible that the processing speed of the application is improved by preventing the application of the mobile device from reading a large amount of image data. As will be described later, the configuration according to the present embodiment performs control so that processing is not performed for an XML location that does not require such processing.

本実施形態では、図1の構造化文書に含まれるベクターグラフィックスとしてSVGを用いる。また、構造化文書に含まれるデータのうちベクターグラフィックスに対応する箇所に基づいて、携帯機器103の表示部206に画像を表示する。図7(a)は、構造化文書のベクターグラフィックスに対応する箇所に基づいて表示した画像を例示した図である。図7(b)は、ヘッダ情報等の、携帯機器103が画像を表示する際に参照する必要のない部分を除いた、図7(a)の画像例に対応する構造化文書の一例であるXMLを例示した図である。図7と図1を比較して明らかなように、図7は、図1におけるデータのうち文字とイメージオブジェクトを携帯機器103表示し、ヘッダ情報とベクターグラフィックスにおける図形オブジェクトは表示しない場合を例示している。尚、イメージオブジェクトが高画質で容量が大きい際には、ヘッダ情報と同様に、イメージオブジェクトを読み込まないようにすることもできる。   In this embodiment, SVG is used as vector graphics included in the structured document of FIG. In addition, an image is displayed on the display unit 206 of the mobile device 103 based on a portion corresponding to vector graphics in the data included in the structured document. FIG. 7A is a diagram illustrating an image displayed based on a location corresponding to vector graphics of a structured document. FIG. 7B is an example of a structured document corresponding to the image example of FIG. 7A, excluding the header information and the like that need not be referred to when the mobile device 103 displays the image. It is the figure which illustrated XML. As is apparent from a comparison between FIG. 7 and FIG. 1, FIG. 7 illustrates an example in which characters and image objects in the data in FIG. 1 are displayed on the mobile device 103 and graphic information in header information and vector graphics is not displayed. is doing. When the image object has a high image quality and a large capacity, the image object can be prevented from being read in the same manner as the header information.

図8は、図7の構造化文書を携帯機器103のアプリケーションに読み込むために利用するJAVAのAPIの生成する際のコマンドを例示した図である。図8は、図2のスキーマ文書("schema.xsd")と図7のベクターグラフィックスを含む構造化文書("graphics.xml")を入力としてコンパイルする場合を例示している。図8に示すように、生成するJAVAのAPIのパッケージ名をコンパイルオプション-pでtest.jaxbとしている。また、コンパイルオプション-dにより、生成するJAVAのAPIをカレントディレクトリに生成する。スキーマ文書のファイルにはコンパイルオプションとして-schemaを付け、構造化文書のファイルにはコンパイルオプションとして-xmlを付けることによりJAVAのAPIを生成するものとする。なお、このようなコマンドの規約は一例であり、これに限られないことは明らかである。また、グラフィカルインタフェースを用いてコンパイルに係る指定を受け付けるように構成してもよい。   FIG. 8 is a diagram exemplifying commands when generating a JAVA API used to read the structured document of FIG. 7 into the application of the mobile device 103. FIG. 8 illustrates a case where the schema document (“schema.xsd”) in FIG. 2 and the structured document (“graphics.xml”) including the vector graphics in FIG. 7 are compiled as inputs. As shown in FIG. 8, the package name of the generated JAVA API is set to test.jaxb with the compile option -p. Also, a JAVA API to be generated is generated in the current directory by the compile option -d. It is assumed that a JAVA API is generated by adding -schema as a compile option to a schema document file and -xml as a compile option to a structured document file. It should be noted that such command conventions are merely examples and are not limited thereto. Moreover, you may comprise so that the designation | designated which concerns on compilation may be received using a graphical interface.

なお、本実施形態においては、スキーマ文書はそれ自体が構造化文書となっている。即ち、本実施形態では、XML Schemaによりスキーマ文書を記述するが、XML Schema文書はXMLにより記述される。   In the present embodiment, the schema document itself is a structured document. That is, in the present embodiment, a schema document is described by XML Schema, but the XML Schema document is described by XML.

(API生成処理)
次に、スキーマ文書と構造化文書からJAVAのAPIを生成する処理について図9、10、11を参照して説明する。図9はJAVAのAPIを生成する処理の全体の手順を示したフローチャートである。図10は、図9のステップS106において実行するDOM再構成処理の詳細な手順を示したフローチャートである。図11は図9のステップS107において実行するJAVAクラス生成処理の詳細な手順を示したフローチャートである。以下、説明を容易にするために、図8のコンパイルコマンドを実行し、図2に例示したスキーマ文書("schema.xsd")と、図7に例示したXML文書("graphics.xml")に基づいて処理を行う場合を例示的に説明する。
(API generation processing)
Next, processing for generating a JAVA API from a schema document and a structured document will be described with reference to FIGS. FIG. 9 is a flowchart showing an overall procedure of processing for generating a JAVA API. FIG. 10 is a flowchart showing a detailed procedure of the DOM reconstruction process executed in step S106 of FIG. FIG. 11 is a flowchart showing a detailed procedure of JAVA class generation processing executed in step S107 of FIG. Hereinafter, for easy explanation, the compile command of FIG. 8 is executed, and the schema document (“schema.xsd”) illustrated in FIG. 2 and the XML document (“graphics.xml”) illustrated in FIG. A case where processing is performed based on this will be described as an example.

ステップS101において処理を開始すると、まず、コンパイル時に指定されたスキーマ文書を内部メモリに格納する(ステップS102)。内部メモリとしては例えばRAM203や記憶部204等を使用することができる。次に、ステップS102と同様に、コンパイル時に指定された構造化文書を内部メモリに格納する(ステップS103)。   When the process is started in step S101, first, the schema document designated at the time of compilation is stored in the internal memory (step S102). As the internal memory, for example, the RAM 203 or the storage unit 204 can be used. Next, similarly to step S102, the structured document designated at the time of compilation is stored in the internal memory (step S103).

次に、ステップS104において、スキーマ文書に基づいてDOMを生成する。図12は図2のスキーマ文書に基づいて生成されたDOMを例示した模式図である。図12のように、DOMは要素、内容モデル、属性からなるツリー構造を構成する。例えば、要素オブジェクト(ノード)1201は、図2における要素211に対応する。同様に、1202〜1210は212〜220にそれぞれ対応する。   Next, in step S104, a DOM is generated based on the schema document. FIG. 12 is a schematic view illustrating a DOM generated based on the schema document of FIG. As shown in FIG. 12, DOM forms a tree structure composed of elements, content models, and attributes. For example, the element object (node) 1201 corresponds to the element 211 in FIG. Similarly, 1202 to 1210 correspond to 212 to 220, respectively.

次に、ステップS105において、ステップS104と同様に、構造化文書に基づいてDOMを生成する。図13は、図7のXML文書に基づいて生成されたDOMを例示した模式図である。例えば、要素オブジェクト1301は図7(b)の701に対応する。同様に、1302〜1304は702〜704にそれぞれ対応する。なお、ステップS104、S105の処理は公知技術を用いて実行することができる。また、生成したDOMに対応するデータはRAM203等に記憶する。   Next, in step S105, a DOM is generated based on the structured document as in step S104. FIG. 13 is a schematic diagram illustrating a DOM generated based on the XML document of FIG. For example, the element object 1301 corresponds to 701 in FIG. Similarly, 1302 to 1304 correspond to 702 to 704, respectively. Note that the processing in steps S104 and S105 can be executed using a known technique. Further, data corresponding to the generated DOM is stored in the RAM 203 or the like.

次に、構造化文書をもとに生成されたDOMを用いて、スキーマ文書をもとに生成したDOMを再構成する、DOM再構成処理を実行する(ステップS106)。この処理の詳細について、図10を参照して説明する。   Next, using the DOM generated based on the structured document, a DOM reconfiguration process is performed to reconfigure the DOM generated based on the schema document (step S106). Details of this processing will be described with reference to FIG.

DOM再構成処理を開始すると(ステップS201)、まず、スキーマ文書のDOMを構成する要素オブジェクトのそれぞれについて、構造化文書のDOMに含まれる要素オブジェクトであるかどうか判定する(ステップS202)。ただし、この判定は、スキーマ文書のDOMツリーにおいて、最上位ノードから子ノードを辿って順に行う。もし構造化文書のDOMに含まれる要素オブジェクトならば(ステップS202でYES)、ステップS204において、その要素オブジェクトにフラグ1を付与する。即ち、その要素オブジェクトに関連づけてフラグ1を記憶制御する。構造化文書のDOMに含まれない要素オブジェクトならば(ステップS202でNO)、要素オブジェクト以下の要素オブジェクトに0を付与する、即ち、その要素オブジェクトに関連づけてフラグ0を記憶制御する(ステップS203)。   When the DOM reconstruction process is started (step S201), it is first determined whether each of the element objects constituting the DOM of the schema document is an element object included in the DOM of the structured document (step S202). However, this determination is performed in order by tracing the child node from the highest node in the DOM tree of the schema document. If it is an element object included in the DOM of the structured document (YES in step S202), a flag 1 is assigned to the element object in step S204. That is, the flag 1 is stored and controlled in association with the element object. If it is an element object not included in the DOM of the structured document (NO in step S202), 0 is assigned to the element object below the element object, that is, the flag 0 is stored and controlled in association with the element object (step S203). .

図14は、図13の構造化文書のDOMをもとに各オブジェクトにフラグが付与された、図12のスキーマ文書に対応するDOMを示した模式図である。例えば、スキーマ文書の要素オブジェクト"picture"1201については、構造化文書に要素オブジェクト"picture"1301が存在するため、フラグ1が付与されている。これに対して、例えば、スキーマ文書の要素オブジェクト"header"1202は、これに対応する要素オブジェクトが構造化文書に存在しないため、フラグ0が付与されている。そして、フラグ0が付与された要素オブジェクト"header"1202以下の要素オブジェクト"date date型"1203、"author string型"1204にもフラグ0が付与されている。   FIG. 14 is a schematic diagram showing a DOM corresponding to the schema document of FIG. 12 in which a flag is assigned to each object based on the DOM of the structured document of FIG. For example, for the element object “picture” 1201 of the schema document, since the element object “picture” 1301 exists in the structured document, the flag 1 is given. On the other hand, for example, the element object “header” 1202 of the schema document is given a flag 0 because the corresponding element object does not exist in the structured document. The flag object 0 is also given to the element objects “date date type” 1203 and “author string type” 1204 below the element object “header” 1202 to which the flag 0 is given.

次に、スキーマ文書のDOMの要素オブジェクトのそれぞれについてフラグか0であるかどうか判定する(ステップS205)。もしフラグが0ならば(ステップS205でYES)、DOMからそのオブジェクト以下のノードを全て削除する(ステップS206)。即ち、RAM203等の記憶装置から、フラグ0が付与された要素オブジェクト、及び、そのオブジェクト以下の要素オブジェクトに係るデータを削除する。   Next, it is determined whether each of the DOM element objects of the schema document is a flag or 0 (step S205). If the flag is 0 (YES in step S205), all nodes below the object are deleted from the DOM (step S206). That is, the element object to which the flag 0 is assigned and the data related to the element objects below the object are deleted from the storage device such as the RAM 203.

図15は、ステップS205の処理の結果、図14に例示したDOMから、フラグ0が付与された要素オブジェクトが削除された、即ち、XML文書に基づいて再構成されたスキーマ文書のDOMを例示した模式図である。   FIG. 15 illustrates the DOM of the schema document in which the element object to which the flag 0 is added is deleted from the DOM illustrated in FIG. 14 as a result of the process of step S205, that is, reconstructed based on the XML document. It is a schematic diagram.

図9の説明に戻る。ステップS106のDOM再構成処理を終了すると、ステップS107において、ステップS106で再構成されたスキーマ文書のDOMに含まれるオブジェクトの親子関係をもとにJAVAのクラスを生成するJAVAクラス生成処理を実行する。JAVAクラス生成処理の詳細について図11を参照して説明する。   Returning to the description of FIG. When the DOM reconstruction process in step S106 is completed, a JAVA class generation process for generating a JAVA class based on the parent-child relationship of the objects included in the DOM of the schema document reconstructed in step S106 is executed in step S107. . Details of the JAVA class generation processing will be described with reference to FIG.

JAVAクラス生成処理を開始すると(ステップS301)、ステップS302へ進む。ステップS302では、schema要素のオブジェクトを除くDOMの各オブジェクトについて、最上位オブジェクト、即ち、schemaオブジェクトの第一子要素のオブジェクトであるかどうか判定する。図15の例では、"picture"オブジェクト1501がschemaオブジェクトの第一子要素のオブジェクトに該当する。1502〜1504オブジェクト等はschemaオブジェクトの第一子要素のオブジェクトに該当しない。   When the JAVA class generation process is started (step S301), the process proceeds to step S302. In step S302, it is determined whether each DOM object excluding the schema element object is the top-level object, that is, the object of the first child element of the schema object. In the example of FIG. 15, the “picture” object 1501 corresponds to the object of the first child element of the schema object. The 1502 to 1504 objects do not correspond to the object of the first child element of the schema object.

ステップS302において、schemaの第一子要素のオブジェクトならば(ステップS302でYES)オブジェクトの要素名であるJAVAのルートクラスを生成する(ステップS304)。もしschemaの第一子要素のオブジェクトではないならば(ステップS302でNO)、親要素のクラスのインナークラスとなるようにJAVAのクラスを生成する(ステップS303)。このようにしてJAVAクラスを生成することで、JAVAのAPIのクラス構造は、スキーマ文書のDOMにおける要素オブジェクトの親子関係と同じ構造になる。なお、クラスの生成はオブジェクトに付随する内容モデル、属性等に基づいて決定されるが、その処理は公知技術を用いて実行することができる。   In step S302, if it is an object of the first child element of schema (YES in step S302), a JAVA root class which is an element name of the object is generated (step S304). If it is not the object of the first child element of schema (NO in step S302), a JAVA class is generated so as to be an inner class of the parent element class (step S303). By generating the JAVA class in this way, the class structure of the JAVA API becomes the same structure as the parent-child relationship of the element objects in the DOM of the schema document. The generation of the class is determined based on the content model, attributes, and the like attached to the object, but the process can be executed using a known technique.

図9の説明に戻る。次に、ステップS108で生成されたJAVAのクラスをファイルに書き出す(ステップS108)。   Returning to the description of FIG. Next, the JAVA class generated in step S108 is written to a file (step S108).

以上のように、本実施形態に係る構成においては、アプリケーションに不要な構造化文書のデータを扱うプログラムを含まないJAVAのAPIを生成することができる。なお、本実施形態においては、コンパイル時に指定する構造化文書は1つであるが、複数の構造化文書を指定する場合も考えられ、その際には複数の構造化文書をデータバインディング可能であるプログラムを生成することができる。ただし、複数の構造化文書を指定する場合は、DOM再構成処理(ステップS106)のステップS202において、スキーマ文書の要素オブジェクトが指定された複数の構造化文書に対応する複数のDOMのいずれかに含まれるか否かを判定する。即ち、複数のDOMのいずれかに含まれる場合はステップS204へ進み、いずれにも含まれない場合はステップS203へ進むように処理を行う。これにより、複数の構造化文書をデータバインディング可能であるプログラムを生成することができる。なお、スキーマ文書の属性オブジェクトにおいても同様のDOM再構成処理を行う場合がある。例えば、スキーマ文書において、ある属性に関するスキーマの記述は必要ないと判断した場合は、DOMの木構造から、その属性に関するスキーマの記述を削除するようにしてもよい。   As described above, in the configuration according to the present embodiment, it is possible to generate a JAVA API that does not include a program that handles structured document data unnecessary for an application. In the present embodiment, one structured document is specified at the time of compiling. However, a plurality of structured documents may be specified. In this case, a plurality of structured documents can be data-bound. A program can be generated. However, when a plurality of structured documents are designated, in step S202 of the DOM reconstruction process (step S106), any one of the plurality of DOMs corresponding to the plurality of structured documents in which the element objects of the schema document are designated. It is determined whether or not it is included. That is, if it is included in any of the plurality of DOMs, the process proceeds to step S204, and if it is not included in any, the process proceeds to step S203. As a result, a program capable of data binding of a plurality of structured documents can be generated. A similar DOM reconstruction process may be performed on the attribute object of the schema document. For example, in the schema document, when it is determined that a description of a schema related to an attribute is not necessary, the description of the schema related to the attribute may be deleted from the DOM tree structure.

(APIの例)
図16は本実施形態に係る構成による処理により生成されたAPIを例示した図である。APIにはコンパイル時に指定された構造化文書に含まれるデータを扱うプログラムのみが含まれる。即ち、ヘッダ情報とベクターグラフィックスに含まれる円と矩形の図形を扱うクラスが削除されたAPIとなっている。そして、携帯機器103は図16のAPIを利用することによりデータバインディング可能となる。
(API example)
FIG. 16 is a diagram illustrating an API generated by the processing according to the configuration according to the present embodiment. The API includes only a program that handles data included in a structured document specified at the time of compilation. That is, it is an API in which the class that handles the circle and rectangle figures included in the header information and vector graphics is deleted. The portable device 103 can perform data binding by using the API of FIG.

既存のJAXBコンパイラを用いて図2のスキーマ文書だけからJAVAのAPIを作成すると、不要な構造化文書のデータを扱うクラスを生成してしまう。これに対し、上記の手法を用いると不要な構造化文書のデータを扱うクラスを生成することなく必要なクラスのみを生成することができる。このため、このようなクラスを用いてデータバインディング可能となり、限られたリソースを持つ携帯機器などにおいてリソースを無駄な処理に割り当てることなく、効率的に処理を実行することができる。   If a JAVA API is created from only the schema document of FIG. 2 using an existing JAXB compiler, a class that handles unnecessary structured document data is generated. On the other hand, if the above method is used, only a necessary class can be generated without generating a class that handles unnecessary structured document data. Therefore, data binding can be performed using such a class, and processing can be executed efficiently without assigning resources to wasteful processing in a portable device having limited resources.

なお、上記の構成では、サンプルとなる構造化文書(図7(b))に基づいて、ステップS106においてスキーマ文書を再構成する処理を行っているが、これに限られない。例えば、スキーマ文書からJAVAのAPIを生成する処理を開始するユーザの指示入力において、クラスを生成しないノードの指定を受け付け、この指定に基づいてDOM再構成処理(ステップS106)におけるノードの削除を制御するようにしてもよい。   In the above configuration, the process of reconstructing the schema document is performed in step S106 based on the sample structured document (FIG. 7B). However, the present invention is not limited to this. For example, in the instruction input of the user who starts the process of generating the JAVA API from the schema document, the specification of the node that does not generate the class is accepted, and the deletion of the node in the DOM reconfiguration process (step S106) is controlled based on this specification You may make it do.

クラスを生成しないノードの指定の受け付けは、例えば、コマンドラインにおいてクラスを生成しない箇所をXPath形式等により指定可能にすることができる。図17は、コマンドラインにおいてクラスを生成しない箇所が指定されている様子を例示する図である。図17では、コンパイルオプション"-remove"でクラスを生成しない箇所"schema/picture/complexType/sequence/header"、"schema/picture/complexType/sequence/svg/complexType/sequence/g"が指定されている。このような指定がなされた場合、本実施形態に係る構成は、図1のフローチャートにおいて、ステップS103、S105の処理を省略する。また、図10(ステップS106)のJAVAクラス生成処理のステップS202〜S204において、クラスを生成しない箇所として指定されている箇所にフラグ0を、それ以外の箇所にフラグ1を付与するように処理する。これにより、指定された箇所に対応するクラスを生成しないでクラスファイルを生成することができる。図17の例では、"schema/picture/complexType/sequence/header"、"schema/picture/complexType/sequence/svg/complexType/sequence/g"が指定されているため、図14のようにフラグが付与される。このため、図17の例のコマンドを実行すると、DOMツリーは図15のように再構成され、最終的に図16のようなクラスファイルが生成される。   For example, a node that does not generate a class can be specified by specifying, for example, an XPath format or the like in a command line. FIG. 17 is a diagram illustrating a state in which a part where a class is not generated is specified on the command line. In FIG. 17, “schema / picture / complexType / sequence / header” and “schema / picture / complexType / sequence / svg / complexType / sequence / g” are specified where the class is not generated by the compile option “-remove”. . When such a designation is made, the configuration according to the present embodiment omits the processes of steps S103 and S105 in the flowchart of FIG. Further, in steps S202 to S204 of the JAVA class generation process in FIG. 10 (step S106), processing is performed so that flag 0 is assigned to a location designated as a location where no class is generated and flag 1 is assigned to other locations. . As a result, a class file can be generated without generating a class corresponding to the designated location. In the example of FIG. 17, since “schema / picture / complexType / sequence / header” and “schema / picture / complexType / sequence / svg / complexType / sequence / g” are specified, flags are added as shown in FIG. Is done. Therefore, when the command in the example of FIG. 17 is executed, the DOM tree is reconstructed as shown in FIG. 15, and finally a class file as shown in FIG. 16 is generated.

また、本実施形態に係る構成により生成されたAPIを用いることで、アンマーシャル、マーシャル時に、構造化文書中の不要なデータをJAVAのクラスに読み込まないようにすることができる。このため、不要なオブジェクトのインスタンス化が必要なくなり、アプリケーションの処理時間や記憶容量を削減することができる。   Also, by using the API generated by the configuration according to the present embodiment, unnecessary data in the structured document can be prevented from being read into the JAVA class during unmarshalling and marshalling. For this reason, it is not necessary to instantiate unnecessary objects, and the processing time and storage capacity of the application can be reduced.

なお、クラスを生成しないノードの指定の受け付けはコマンドラインによるものに限られない。例えば、スキーマ文書をツリー構造で模式的に表示し、このツリー構造において、クラスを生成しない箇所を選択可能に制御することにより、指定を受け付けるようにしてもよい。   It should be noted that the designation of a node that does not generate a class is not limited to the command line. For example, a schema document may be schematically displayed in a tree structure, and designation may be received by controlling a portion where a class is not generated in the tree structure so as to be selectable.

また、上記では、XMLを使用するプログラムはJAVAにより記述されているものとしたが、使用するプログラミング言語はJAVAに限られないことは明らかである。例えば、はC言語、C++言語等を用いる場合においても同様の構成が適用可能である。   In the above description, the program using XML is described in JAVA. However, it is clear that the programming language to be used is not limited to JAVA. For example, the same configuration can be applied even when using C language, C ++ language, or the like.

また、上記では、DOMの再構成として、所定の条件に基づいてDOMのノードを削除する構成について述べたがこれに限られない。例えば、基準となるDOMや、ユーザからの指示入力に基づいて、スキーマ文書又は構造化文書に対応するDOMのツリー構造を変更したり、新たなノードを追加して、クラスファイルを生成するように構成してもよい。例えば、指示入力に基づいて、或いは、基準となるDOMと同じ構造になるように、あるノードの子ノードを別のノードの子ノードとなるように再配置するように構成することができる。   In the above description, the configuration for deleting a DOM node based on a predetermined condition is described as the DOM reconfiguration. However, the configuration is not limited thereto. For example, a class file is generated by changing a tree structure of a DOM corresponding to a schema document or a structured document or adding a new node based on a reference DOM or an instruction input from a user. It may be configured. For example, a child node of a certain node can be rearranged to become a child node of another node based on an instruction input or so as to have the same structure as a reference DOM.

また、上記ではスキーマ文書をXML Schemeにより記述した例を示したが、スキーマ言語はXML Schemeに限られないことは言うまでもない。例えば、スキーマ文書をRELAX NGや、或いは、XMLにより記述してもよい。   Moreover, although the example which described the schema document by XML Scheme was shown above, it cannot be overemphasized that a schema language is not restricted to XML Scheme. For example, the schema document may be described in RELAX NG or XML.

<<その他の実施形態>>
以上、本発明の実施形態例について詳述したが、本発明は、例えば、システム、装置、方法、プログラムもしくは記憶媒体等としての実施態様を取ることが可能である。具体的には、複数の機器から構成されるシステムに適用してもよいし、また、一つの機器からなる装置に適用してもよい。
<< Other Embodiments >>
The exemplary embodiments of the present invention have been described in detail above. However, the present invention can take embodiments as, for example, a system, apparatus, method, program, or storage medium. Specifically, the present invention may be applied to a system composed of a plurality of devices, or may be applied to an apparatus composed of a single device.

尚、本発明は、前述した実施形態の機能を実現するプログラムを、システムあるいは装置に直接あるいは遠隔から供給し、そのシステムあるいは装置のコンピュータが該供給されたプログラムコードを読み出して実行することによっても達成される場合を含む。   The present invention can also be achieved by supplying a program that realizes the functions of the above-described embodiment directly or remotely to a system or apparatus, and the computer of the system or apparatus reads and executes the supplied program code. Including the case where it is achieved.

従って、本発明の機能処理をコンピュータで実現するために、該コンピュータにインストールされるプログラムコード自体も本発明の技術的範囲に含まれる。つまり、本発明は、本発明の機能処理を実現するためのコンピュータプログラム自体も含む。   Therefore, since the functions of the present invention are implemented by a computer, the program code installed in the computer is also included in the technical scope of the present invention. That is, the present invention includes a computer program itself for realizing the functional processing of the present invention.

その場合、プログラムの機能を有していれば、オブジェクトコード、インタプリタにより実行されるプログラム、OSに供給するスクリプトデータ等の形態であってもよい。   In that case, as long as it has the function of a program, it may be in the form of object code, a program executed by an interpreter, script data supplied to the OS, and the like.

プログラムを供給するための記録媒体としては、例えば、次のものが含まれる。即ち、フロッピー(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスク、MO、CD−ROM、CD−R、CD−RW、磁気テープ、不揮発性のメモリカード、ROM、DVD(DVD−ROM,DVD−R)等が含まれる。   Examples of the recording medium for supplying the program include the following. Namely, floppy (registered trademark) disk, hard disk, optical disk, magneto-optical disk, MO, CD-ROM, CD-R, CD-RW, magnetic tape, nonvolatile memory card, ROM, DVD (DVD-ROM, DVD-) R) and the like are included.

その他、プログラムの供給形態としては、次のようなものも考えられる。即ち、クライアント装置のブラウザを用いてインターネットのホームページに接続し、該ホームページから本発明に係るコンピュータプログラム、或いは、圧縮され自動インストール機能を含むファイルをHD等の記録媒体にダウンロードする形態も考えられる。また、本発明のプログラムを構成するプログラムコードを複数のファイルに分割し、それぞれのファイルを異なるホームページからダウンロードすることによっても実現可能である。つまり、本発明の機能処理をコンピュータで実現するためのプログラムファイルを複数のユーザに対してダウンロードさせるWWWサーバも、本発明に含まれるものである。   In addition, the following types of programs may be considered. That is, it is also possible to connect to a homepage on the Internet using a browser of a client device and download a computer program according to the present invention or a compressed file including an automatic installation function from the homepage to a recording medium such as an HD. It can also be realized by dividing the program code constituting the program of the present invention into a plurality of files and downloading each file from a different homepage. That is, a WWW server that allows a plurality of users to download a program file for realizing the functional processing of the present invention on a computer is also included in the present invention.

また、次のような供給形態も考えられる。即ち、まず、本発明に係るプログラムを暗号化してCD−ROM等の記憶媒体に格納してユーザに配布する。そして、所定の条件をクリアしたユーザに対し、インターネットを介してホームページから暗号化を解く鍵情報をダウンロードさせ、その鍵情報の使用により暗号化されたプログラムを実行してコンピュータにインストールさせて本発明に係る構成を実現する。このような供給形態も可能である。   The following supply forms are also conceivable. That is, first, the program according to the present invention is encrypted, stored in a storage medium such as a CD-ROM, and distributed to users. Further, the present invention allows a user who has cleared a predetermined condition to download key information to be decrypted from a homepage via the Internet, execute a program encrypted by using the key information, and install the program on a computer. The structure which concerns on is implement | achieved. Such a supply form is also possible.

また、コンピュータが、読み出したプログラムを実行することによって、前述した実施形態の機能が実現される他次のような実現形態も想定される。即ち、そのプログラムの指示に基づき、コンピュータ上で稼動しているOSなどが、実際の処理の一部または全部を行ない、その処理によっても前述した実施形態の機能が実現され得る。   In addition, the following realization modes in which the functions of the above-described embodiments are realized by the computer executing the read program are also assumed. In other words, based on the instructions of the program, the OS running on the computer performs part or all of the actual processing, and the functions of the above-described embodiments can be realized by the processing.

さらに、記録媒体から読み出されたプログラムが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書き込まれた後、そのプログラムの指示に基づいても前述した実施形態の機能が実現される。即ち、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によっても前述した実施形態の機能が実現される。   Further, after the program read from the recording medium is written in the memory provided in the function expansion board inserted in the computer or the function expansion unit connected to the computer, the above-described embodiment is also based on the instructions of the program. The function is realized. That is, a CPU or the like provided in the function expansion board or function expansion unit performs part or all of the actual processing, and the functions of the above-described embodiments are realized by the processing.

構造化文書と構造化文書に対応するベクターグラフィックスを例示した図である。It is the figure which illustrated the vector graphics corresponding to a structured document and a structured document. スキーマ文書の例を示した図である。It is the figure which showed the example of the schema document. 自動生成されたJAVAで記述されたAPIを例示した図である。It is the figure which illustrated API described by JAVA generated automatically. 自動生成されたJAVAで記述されたAPIを例示した図である。It is the figure which illustrated API described by JAVA generated automatically. 本実施形態に係る情報処理装置を含むシステムの概要を例示したブロック図である。It is the block diagram which illustrated the outline of the system containing the information processor concerning this embodiment. 携帯機器の構成を示したブロック図である。It is the block diagram which showed the structure of the portable apparatus. 構造化文書と構造化文書に対応するベクターグラフィックスを例示した図である。It is the figure which illustrated the vector graphics corresponding to a structured document and a structured document. JAVAのAPIの生成する際のコマンドを例示した図である。It is the figure which illustrated the command at the time of the production | generation of JAVA API. JAVAのAPIを生成する処理の全体の手順を示したフローチャートである。It is the flowchart which showed the procedure of the whole process which produces | generates JAVA API. DOM再構成処理の詳細な手順を示したフローチャートである。It is the flowchart which showed the detailed procedure of the DOM reconstruction process. JAVAクラス生成処理の詳細な手順を示したフローチャートである。It is the flowchart which showed the detailed procedure of JAVA class production | generation processing. スキーマ文書に基づいて生成されたDOMを例示した模式図である。It is the schematic diagram which illustrated DOM produced | generated based on the schema document. 構造化文書に基づいて生成されたDOMを例示した模式図である。It is the schematic diagram which illustrated DOM produced | generated based on the structured document. 各オブジェクトにフラグが付与された、スキーマ文書に対応するDOMを例示した模式図である。It is the schematic diagram which illustrated DOM corresponding to the schema document by which the flag was provided to each object. XML文書に基づいて再構成されたスキーマ文書のDOMを例示した模式図である。It is the schematic diagram which illustrated DOM of the schema document reconfigure | reconstructed based on the XML document. 本実施形態に係る構成による処理により生成されたAPIを例示した図である。It is the figure which illustrated API produced | generated by the process by the structure which concerns on this embodiment. コマンドラインにおいてクラスを生成しない箇所が指定されている様子を例示する図である。It is a figure which illustrates a mode that the location which does not produce | generate a class is designated in the command line.

Claims (12)

構造化文書情報を入力する入力手段と、
前記構造化文書情報に基づいてツリー構造をなすオブジェクトモデルを生成するモデル生成手段と、
前記ツリー構造を再構成する条件を決定する決定手段と、
前記決定手段において決定された条件に基づいて前記オブジェクトモデルを再構成する再構成手段と、
前記再構成手段により再構成されたオブジェクトモデルに基づいてクラスファイルを生成するファイル生成手段と、を備えることを特徴とする情報処理装置。
An input means for inputting structured document information;
Model generation means for generating an object model having a tree structure based on the structured document information;
Determining means for determining conditions for reconstructing the tree structure;
Reconstructing means for reconstructing the object model based on the condition determined by the determining means;
An information processing apparatus comprising: a file generation unit configured to generate a class file based on the object model reconfigured by the reconfiguration unit.
前記決定手段は、前記ツリー構造を構成するノードのうち削除するものを決定し、
前記再構成手段は、前記決定手段において削除すると決定されたノードに対応するオブジェクトを前記オブジェクトモデルから削除することにより前記再構成を行う、ことを特徴とする請求項1に記載の情報処理装置。
The determining means determines a node to be deleted among the nodes constituting the tree structure,
The information processing apparatus according to claim 1, wherein the reconfiguration unit performs the reconfiguration by deleting an object corresponding to a node determined to be deleted by the determination unit from the object model.
前記ツリー構造を構成するノードのうち削除するものの指定を入力する指定入力手段を更に備え、
前記決定手段は、入力された前記指定に基づいて削除するノードを決定することを特徴とする請求項2に記載の情報処理装置。
Further comprising designation input means for inputting designation of a node to be deleted among the nodes constituting the tree structure;
The information processing apparatus according to claim 2, wherein the determination unit determines a node to be deleted based on the input designation.
更に、
前記決定において基準となる基準文書情報を入力する第2入力手段と、
前記基準文書情報に基づいてツリー構造をなす基準オブジェクトモデルを生成する第2モデル生成手段と、を備え、
前記決定手段は、前記モデル生成手段において生成された前記オブジェクトモデルと、前記基準オブジェクトモデルとの比較に基づいて、前記決定を行うことを特徴とする請求項1又は2に記載の情報処理装置。
Furthermore,
Second input means for inputting reference document information which is a reference in the determination;
Second model generation means for generating a reference object model having a tree structure based on the reference document information,
The information processing apparatus according to claim 1, wherein the determination unit performs the determination based on a comparison between the object model generated by the model generation unit and the reference object model.
前記第2入力手段は、複数の前記基準文書情報を入力することを特徴とする請求項4に記載の情報処理装置。   The information processing apparatus according to claim 4, wherein the second input unit inputs a plurality of the reference document information. 前記構造化文書情報は、XML、XML Schema、RELAX NGのいずれかにより記述されることを特徴とする請求項1乃至5のいずれか1項に記載の情報処理装置。   The information processing apparatus according to claim 1, wherein the structured document information is described in any one of XML, XML Schema, and RELAX NG. 前記クラスファイルは、JAVA、C言語、C++言語のいずれかにより記述されることを特徴とする請求項1乃至6のいずれか1項に記載の情報処理装置。   The information processing apparatus according to claim 1, wherein the class file is described in any one of JAVA, C language, and C ++ language. 前記オブジェクトモデルはドキュメント・オブジェクト・モデル形式のデータであることを特徴とする請求項1乃至7のいずれか1項に記載の情報処理装置。   The information processing apparatus according to claim 1, wherein the object model is data in a document object model format. 前記構造化文書情報は文書のスキーマを示すスキーマ文書情報であることを特徴とする請求項1乃至8のいずれか1項に記載の情報処理装置。   9. The information processing apparatus according to claim 1, wherein the structured document information is schema document information indicating a schema of a document. 構造化文書情報を入力する入力工程と、
前記構造化文書情報に基づいてツリー構造をなすオブジェクトモデルを生成するモデル生成工程と、
前記ツリー構造を再構成する条件を決定する決定工程と、
前記決定工程において決定された条件に基づいて前記オブジェクトモデルを再構成する再構成工程と、
前記再構成工程において再構成されたオブジェクトモデルに基づいてクラスファイルを生成するファイル生成工程と、を備えることを特徴とする情報処理装置の制御方法。
An input process for inputting structured document information;
A model generation step of generating an object model having a tree structure based on the structured document information;
A determining step for determining conditions for reconstructing the tree structure;
A reconfiguration step of reconfiguring the object model based on the conditions determined in the determination step;
And a file generation step of generating a class file based on the object model reconfigured in the reconfiguration step.
コンピュータを請求項1乃至9のいずれかに記載の情報処理装置として機能させるためのコンピュータプログラム。   A computer program for causing a computer to function as the information processing apparatus according to claim 1. 請求項11に記載のコンピュータプログラムを格納したコンピュータで読み取り可能な記憶媒体。   A computer-readable storage medium storing the computer program according to claim 11.
JP2005362369A 2005-12-15 2005-12-15 Information processing apparatus, control method therefor, program, and storage medium Expired - Fee Related JP4942144B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005362369A JP4942144B2 (en) 2005-12-15 2005-12-15 Information processing apparatus, control method therefor, program, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005362369A JP4942144B2 (en) 2005-12-15 2005-12-15 Information processing apparatus, control method therefor, program, and storage medium

Publications (2)

Publication Number Publication Date
JP2007164630A true JP2007164630A (en) 2007-06-28
JP4942144B2 JP4942144B2 (en) 2012-05-30

Family

ID=38247428

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005362369A Expired - Fee Related JP4942144B2 (en) 2005-12-15 2005-12-15 Information processing apparatus, control method therefor, program, and storage medium

Country Status (1)

Country Link
JP (1) JP4942144B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009104600A (en) * 2007-10-05 2009-05-14 Canon Inc Information processing apparatus and control method thereof, and document verification apparatus and control method thereof
JP2009187528A (en) * 2007-10-12 2009-08-20 Asml Masktools Bv Method of improved hierarchal xml database
JP2014532253A (en) * 2012-10-10 2014-12-04 エスケー プラネット カンパニー、リミテッド User terminal device and scroll method for supporting high-speed web scrolling of web documents

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0367470A (en) * 1989-08-03 1991-03-22 Hitachi Electron Eng Co Ltd Electrode bar inserting method into wound element of cylindrical battery
JPH10143507A (en) * 1996-09-11 1998-05-29 Fujitsu Ltd Sgml document management device, server device, client device and program storage medium therefor

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0367470A (en) * 1989-08-03 1991-03-22 Hitachi Electron Eng Co Ltd Electrode bar inserting method into wound element of cylindrical battery
JPH10143507A (en) * 1996-09-11 1998-05-29 Fujitsu Ltd Sgml document management device, server device, client device and program storage medium therefor

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009104600A (en) * 2007-10-05 2009-05-14 Canon Inc Information processing apparatus and control method thereof, and document verification apparatus and control method thereof
JP2009187528A (en) * 2007-10-12 2009-08-20 Asml Masktools Bv Method of improved hierarchal xml database
US9361400B2 (en) 2007-10-12 2016-06-07 Asml Netherlands B.V. Method of improved hierarchical XML databases
JP2014532253A (en) * 2012-10-10 2014-12-04 エスケー プラネット カンパニー、リミテッド User terminal device and scroll method for supporting high-speed web scrolling of web documents
US9465780B2 (en) 2012-10-10 2016-10-11 Sk Planet Co., Ltd. User terminal device and scroll method supporting high-speed web scroll of web document

Also Published As

Publication number Publication date
JP4942144B2 (en) 2012-05-30

Similar Documents

Publication Publication Date Title
Rodriguez-Echeverria et al. Towards a language server protocol infrastructure for graphical modeling
US20060236302A1 (en) System and method for unified visualization of two-tiered applications
WO2015078343A1 (en) Development method for web development system, and web development system
US20060236307A1 (en) System and method for transformation of wireless application definition to simplified form
EP1703381A2 (en) Rich data-bound applications
JP2007523418A (en) Data container for user interface data
RU2459238C2 (en) Managed execution environment for software application interfacing
JP2005346719A (en) Apparatus and method for generating user interface based on automatic operation with complete flexibility
CN113076096B (en) Desktop application program development method, device, equipment and storage medium
CN107450897B (en) Cross-platform migration method and device for graphic engine
CN113064593B (en) Method and device for dynamic mobile APP, computer equipment and storage medium
JP4942144B2 (en) Information processing apparatus, control method therefor, program, and storage medium
KR101552914B1 (en) Web server application framework web application processing method using the framework and computer readable medium processing the method
Lazăr et al. Tool support for fUML models
Lyu et al. High-Performance Web Frontend Using WebAssembly
CN111506309A (en) Task execution method and system, and computer-readable storage medium
JP2002366352A (en) Apparatus for supporting web application development
JP4944434B2 (en) Layout method and program
JP5605228B2 (en) Image processing apparatus and program
JP4686117B2 (en) Source code conversion apparatus, source code conversion method, and program
CN113791714A (en) Method for software system icon library
Åkesson et al. Jatte: A tunable tree editor for integrated DSLs
JP2006293436A (en) Program code generation device and generation method
JP4719743B2 (en) Graph processing device
CA2543898A1 (en) System and method for unified visualization of two-tiered applications

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081205

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110708

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110715

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110829

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120224

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120227

R151 Written notification of patent or utility model registration

Ref document number: 4942144

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150309

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees