WO2001077882A1 - System and method for generating computer source code - Google Patents

System and method for generating computer source code Download PDF

Info

Publication number
WO2001077882A1
WO2001077882A1 PCT/US2001/010860 US0110860W WO0177882A1 WO 2001077882 A1 WO2001077882 A1 WO 2001077882A1 US 0110860 W US0110860 W US 0110860W WO 0177882 A1 WO0177882 A1 WO 0177882A1
Authority
WO
WIPO (PCT)
Prior art keywords
document
source code
code
node
tailoring
Prior art date
Application number
PCT/US2001/010860
Other languages
French (fr)
Inventor
John R. Van Roekel
Rex A. Timbs
Original Assignee
Healthmedia, 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 Healthmedia, Inc. filed Critical Healthmedia, Inc.
Priority to AU2001253122A priority Critical patent/AU2001253122A1/en
Publication of WO2001077882A1 publication Critical patent/WO2001077882A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code

Definitions

  • the application includes computer program related materials in the form of appendices.
  • the processing program when executed, captures data from a system user and pulls in information from the MCD as necessary, based on these inputs.
  • Such computer program generation systems are still cumbersome and have numerous deficiencies and built-in inefficiencies.
  • a processing program still has to be generated by a computer programmer in addition to the MCD prepared by a non-programmer content expert. This processing program still needs to be reviewed and tested by both the programmer and the content expert to ensure that the MCD is compatible with the processing program and that the MCD and processing program are working properly together to generate the appropriate output. This system does not allow the non- programmer to view the results of his programming in real time.
  • MCD systems also have some very significant production limitations. Because of the structure of having the processing program operate on separately developed MCD, the condition statements that may be written into the processing programs for such MCD systems are fairly limited, and as a result relatively weak. Also, in such systems the output content that can be supported is fairly limited which ultimately restrains the final presentation of tailored output from the system. Also in production, as a result of a processing program operating on a separate MCD, the processing time for MCD systems is relatively slow, resulting in lengthy waits for tailored output.
  • a method for generating computer source code includes preparing a master tailoring document which contains logic for a computer program, inputting the master tailoring document into a document structure generator which parses out the computer program logic contained in the input document and builds a document tree structure based on the program logic, and providing a code writer program and a template of pre-defined source code snippets so the code writer program may retrieve the computer program logic from the document tree structure and combine the retrieved program logic with designated source code snippets from the template to generate source code for a computer program.
  • the source code generation method may farther include compiling the generated source code to convert the generated source code into executable code.
  • the source code generation method may also include providing computer memory and a computer workstation, moving the executable code to the computer memory, activating the executable code which generates a dynamic user interface on the computer workstation, inputting data into the dynamic user interface and submitting the data, processing the input data, and creating an output content document.
  • the source code generation method may further include formatting the output content document into a formatted file and transmitting the formatted file to the computer workstation for review.
  • the act of formatting the output content document into a formatted file may be done by providing a hypertext markup language (HTML) publisher and an HTML layout file and by inputting the output content document and the HTML layout file into the HTML publisher to format the file into HTML format.
  • the act of formatting the output content document into a formatted file may also be done by providing a print publisher and a print layout file and by inputting the output content document and the print layout file into the print publisher to format the file into a print file format.
  • the act of formatting the output content document into a formatted file may also be done by formatting the output content document into a text file format.
  • the master tailoring document may also include commands that set document tree structure nodes when parsed by the document structure generator and that create branches from each generated node when parsed by the document stracture generator.
  • the master tailoring document may further include group commands which have subcommands that create branches from each generated node when parsed by the document structure generator.
  • the template of pre-defined source code snippets of the source code generation method may be written in extensible markup language (XML) and the generated source code may be written in the Java programming language.
  • the master tailoring document may include at least one condition statement written to output text content based on the condition statement.
  • the master tailoring document may also include at least one condition statement written to output graphics content based on the condition statement.
  • a system for generating computer source code from a master tailoring document which contains logic for a computer program includes a code generator having a document structure generator, a memory, a code writer and a template of pre-defined source code snippets in which the document structure generator parses out the computer program logic contained in the master tailoring document and builds a document tree structure in memory based on the program logic and in which the code writer program retrieves the computer program logic from the document tree structure and combines the retrieved program logic with designated source code snippets from the template to generate source code for a computer program.
  • the source code generation system may further include a code compiler for compiling the generated source code to convert the generated source code into executable code.
  • the master tailoring document of the source code generation system may include commands that set document tree structure nodes when parsed by the document stracture generator and may also include commands that create branches from each generated node when parsed by the document structure generator.
  • the master tailoring document of the source code generation system may also include group commands which have subcommands that create branches from each generated node when parsed by the document structure generator.
  • the template of pre-defined source code snippets of the source code generation system may be written in extensible markup language (XML), and the generated source code may be written in the Java programming language.
  • the master tailoring document may include at least one condition statement written to output text content based on the condition statement.
  • the master tailoring document may include at least one condition statement written to output graphics content based on the condition statement. It is an object of the present invention to provide a computer source code generating system and method in which a non-programmer can write the methodology for a computer program in a language and in a software application that the non-programmer is familiar with which generates source code for a computer program.
  • FIG. 1 depicts an overview of the development process for generating computer source code in the present invention
  • FIG. 2 depicts an overview of the computer source code generated by the system and method of the present invention in a production environment;
  • FIG. 3 illustrates an exemplary master tailoring document in an embodiment of the present invention
  • FIG. 4 illustrates the process within a code generator of the present invention for generating source code from the exemplary master tailoring document
  • FIGS. 5A-M depict an exemplary code template used by a code generator of the present invention
  • FIGS. 6A-G depict exemplary source code generated by the code generator of the present invention
  • FIG. 7 depicts an exemplary dynamic user interface developed by executable code generated by the system and method of the present invention.
  • FIG. 8 depicts an exemplary output content document developed by executable code generated by the system and method of the present invention.
  • FIG. 9 illustrates an exemplary display on the workstation of user of a system using the executable code generated by the system and method of the present invention.
  • a content expert 20 interacts, via a computer workstation 22, with a code development computing system 24 to generate computer source code 26 and to test the code 26 to ensure it is working properly.
  • the content expert 20 writes the algorithm content and logic into a text editing tool that he or she is familiar with, such text editing tools may be any text editor including word processing programs like Word or WordPerfect.
  • the algorithm content and logic details the program's needed inputs, the conditions and processes that the program applies and performs and the output information that the program generates after applying and perfo ⁇ ning these conditions and processes on the captured inputs.
  • the entered program algorithm content and logic is saved as a document called a master tailoring document 28.
  • the master tailoring document 28 maybe saved in a variety of formats, including Hypertext Markup Language (HTML) and Extensible Markup Language (XML). Saving the master tailoring document 28 in either HTML or XML format facilitates processing the information contained in the document.
  • HTML Hypertext Markup Language
  • XML Extensible Markup Language
  • the master tailoring document 28 is input into the code development computing system 24.
  • a code generator 30 operates on the master tailoring document 28, as described in detail below, to parse the master tailoring document 28 into its component elements and then combine these component elements with templated source code to generate the outputted computer source code 26.
  • the source code 26 generated by the code generator 30 is then compiled by a code compiler 32, resident in the code development computing system 24, which converts the source code 26 into computer executable code 34.
  • Dynamic Program Testing Once compiled, the program can be tested in real time by the content expert 20. The content expert 20 does not have to wait for a programmer to write the code and compile the program before he or she can review it. This feature of the invention reduces program development time exponentially. Dynamic testing is possible because the developed executable code 34 is loaded into the memory 36 of the code development computing system 24 immediately after the executable code 34 is created. The stored program can then be accessed by the content expert 20.
  • the content expert 20 activates the developed program executable code 34.
  • the executable code 34 once activated, creates a dynamic user interface 40 on the content expert's workstation 22, as indicated by line 38.
  • the dynamic user interface 40 prompts the content expert 20 for test input information.
  • the program after receiving the inputs, processes the received information and, if the program executes properly, the program creates an output content document 44, as indicated by line 52. If, on the other hand, the program encounters an error during execution, it posts the error to an error log 54, as indicated by line 56, and generates an error message for the content expert's attention, as indicated by line 58.
  • the content expert 20 can correct this easily and immediately by properly re-entering the input data and re- submitting it. If the error, however, was identified as a problem in the program code, the content expert 20 needs to review the master tailoring document 28 to determine the error and resolve it. In this situation, once the content expert 20 identifies the problem and corrects it, the content expert 20 needs to re-generate the computer source code 26 and re- compile it as described above.
  • the output content document 44 created by the program contains raw output data which may be formatted as required.
  • the output content document 44 may be formatted in three different ways.
  • One way is through an HTML publisher 46.
  • the HTML publisher 46 calls on an HTML layout file 48 to generate an HTML file 50 using the information from the output content document 44.
  • the HTML layout file 48 is a previously created file developed by a web site developer in conjunction with the content expert 20 which defines the output fo ⁇ nat for the output content document information and defines and positions any graphics, charts or any other material required by the output content document to be inserted into the published document.
  • the content expert 20 can access the generated HTML file 50 through his workstation browser so he can review the output information and its presentation to determine if changes need to be made.
  • the output content document 44 may also be formatted as a text file 72 through a text publisher 70.
  • the generated text file 72 may be transmitted to the content expert's workstation 22, as indicated by line 74, where the content expert 20 may spell check the document and perform other text editing functions on it, if necessary.
  • the output content document information may also be formatted as a print file 68, in a format such as PostScript.
  • the print file 68 is generated by a print publisher 60 which calls on a print layout file 62 to generate the print file 68.
  • the print layout file 62 is a previously created file developed by a print layout artist in conjunction with the content expert 20 which defines the output format for the output content document information and defines and positions any graphics, charts or any other material required by the output content document to be inserted into the printed document. As indicated by line 64, the content expert 20 can access the generated print file 68 for review and correction, if necessary.
  • the system access device 104 may be any device capable of interacting with a system controller, such as a computer, a personal digital assistant (PDA), a cellular phone, a pager, a call center system, an interactive voice response ("IVR") system, a system for a data input center, an e-mail system or any type of network access device.
  • a system controller such as a computer, a personal digital assistant (PDA), a cellular phone, a pager, a call center system, an interactive voice response (“IVR”) system, a system for a data input center, an e-mail system or any type of network access device.
  • PDA personal digital assistant
  • IVR interactive voice response
  • the system controller 107 creates a dynamic user interface which prompts the user for user input data. Once the user enters all the necessary input data, he or she submits it to the system controller 107 for processing, as indicated by line 110.
  • the system controller 107 after receiving the inputs, saves the inputs to a user input database 1
  • the output content document 114 created by the program contains raw output data which may be formatted as required.
  • the output content document 114 may be formatted in three different ways.
  • the HTML publisher 46 may call on the HTML layout file 48 to generate an HTML file 118 using the output content document infonnation.
  • the HTML file 118 is transferred to a web server 124 which may interact with a browser on the user's system access device 104 which, as described above, may be any number of devices including a computer, a PDA, a pager or a cell phone to generate an end user web page 125 which displays the processed information for review by the user.
  • the output content document 114 may also be formatted as a text file 120 through a text publisher 70.
  • the generated text file 120 may be transmitted to an e-mail exporter 126 for transference to the user's system access device 104 as an end user e-mail 127.
  • the output content document information may also be formatted as a print file 122, in such a format such as PostScript.
  • the print file 122 is generated by a print publisher 60 which calls on a print layout file 62 to generate the print file 122.
  • the print file 122 is transferred to a File Transfer Protocol (FTP) server 128.
  • FTP File Transfer Protocol
  • the print file 122 may be sent to any recipient 129 that needs the print file 122, such as a print vendor for printing.
  • the print vendor in turn, may send the printed documents on to an end user 131.
  • the system of the present invention may be used to develop source code for any type of programming language, such as Java, using a text editor program.
  • the content expert 20 develops a master tailoring document 28 similar to the one depicted in Fig. 3 using a text editor program.
  • the master tailoring document 28 is a set of tables that specify the program information.
  • the tables specify the program name, the inputs that the program requires and the conditions that are applied to the input data to develop output content.
  • the content expert 20 follows guidelines set for developing the program charts. An example of such guidelines are attached as Appendix A. To make program development simpler, the guidelines specify simple, intuitive, easy to follow commands and field identifiers.
  • the first column 152 of this table includes "command" cells.
  • the command in the first cell of the first table is the "Document” command.
  • the "Document” command requires the input of a document/program name in the adjoining cell in the second column.
  • the program's name is "SimpleTest".
  • the next table in this example is the "Response” table 156.
  • the Response table 156 specifies the input data that the program requires.
  • the cells of the Response table may be formatted in any manner as long as they conform to a set of structuring guidelines similar to those attached as Appendix A. In this example, however, each row of the Response table is formatted in a similar manner.
  • the first column 158 of the Response table 156 similar to the first column 152 of the first table 150, is a "command" column.
  • the second column 160 of table 156 is a "name” column. When used with the "response" command, the "name" cell provides a name for the input that is requested by the "response” command.
  • the third column 162 is an "options" column.
  • a cell in the "options” column 162 lists any options required for that entry. For instance, if an input is required for a "response" field, the content expert 20 could ensure that the program would not continue unless data was entered for this field by specifying in the "options” cell that data had to be input for this field for the program to execute.
  • the "options" cells of table 156 are not employed in the example depicted in Fig. 3.
  • the fourth column 164 of table 156 is a "type” column 164.
  • a cell in the "type” column 164 describes the characteristics a response to the query generated by the "Response" command must have.
  • the "FirstName” variable 171 is a "String" type field as indicated by identifier 170 which means that only character values can be entered for this variable.
  • the last column 166 of the table 156 is the “comment” column.
  • a cell in the "comment” column 166 contains the prompt command that a user sees when he or she uses the program.
  • For the Response field 168 the user is prompted with the comment "First Name:" from cell 172.
  • the program requests the user for his first name (field 168), his last name (field 174) and his age (field 176).
  • the "FirstName” and “LastName” response fields both require character data input as indicated by the "String” designation in their respective “type” cells 170, 178.
  • the "Age” response field 176 requires the input of an integer as indicated by the "int” designation in its "type” cell 180.
  • the next table 182 in this example is the "Content" table.
  • the Content table 182 specifies the conditions and operations that are applied to the data inputs and the resulting outputs that are generated by these conditions and operations.
  • the cells of the Content table 182 may be formatted in any manner as long as they conform to a set of structuring guidelines similar to those attached as Appendix A.
  • the first column 184 of the Content table 182, similar to the first columns 152, 158 of the first table 150 and the Response table 156, is a "command" column.
  • the second column 186 of table 182 is a "name” column.
  • the third column 188 is an "options" column.
  • a cell in the "options” column 188 lists any options required for that entry.
  • the “options” cells for table 182 are not employed in the example depicted in Fig. 3.
  • the fourth column 190 of table 182 is a "condition" column 190.
  • a cell in the "condition” column 190 specifies a boolean expression that, if true, generates a program specified output, such as text or graphics.
  • the boolean expressions specified in a "condition” cell 190 in this embodiment, are written in standard Java language because these boolean expressions are inserted directly into the program source code that is ultimately generated.
  • the fifth column 192 of table 182 has multiple uses depending on the type of command entered in the "command" column 184.
  • the content expert 20 may employ a variety of different commands in the "command" column 184 depending on what the content expert 20 wants to set a condition for.
  • This format allows a content expert 20 to use very powerful conditions statements. For instance, if the content expert 20 uses the "Graphic" command described in Appendix A, frame 16, the generated program, when executed, will return a designated graphic if the condition statement is satisfied. Further, since Java code may be directly input into the master tailoring document 28 using the "Java" command (Appendix A, frame 20), the resulting program has all the power and capability of a program written directly in Java. This allows programs generated by the present invention to support a wide variety of content, including formatted text, pictures, tables and charts.
  • the first programmed row 196 of "Content" table 182 defines a "Group".
  • the "Group” command defines the beginning of a series of commands that are to be grouped together.
  • the “End” command defines the end of the grouped commands.
  • the "Group” defined in the Fig. 3 example is the "Welcome” group as designated by the "name” cell 198.
  • the second programmed row 200 of table 182 is a "text" command row. When this row is executed, the program generates the statement in cell 202, "Welcome $$FirstName$$", where the first name entered by the program user (e.g., John) is output for the variable $$FirstName$$.
  • the third programmed row 204 is also a "text" command row.
  • the boolean expression in cell 206 (Age ⁇ 21) is evaluated. If the "Age" data input by the program user is less than 21, then the boolean expression is true and the program generates the statement in cell 208, "You are under 21.”
  • the fifth programmed row 216 is an "End” command row which ends the “Group” designated in the "name” cell 218. In this example, the "End” command designates the end of the "Welcome” group.
  • the master tailoring document 28 may be saved in a variety of formats including HTML or XML. Saving the master tailoring document 28 in either HTML or XML format facilitates further processing of the master tailoring document 28.
  • the master tailoring document 28 is input into the code generator 30.
  • a document structure generator 250 resident in the code generator 30 operates on the input master tailoring document 28.
  • the document structure generator 250 parses the infonnation contained in the master tailoring document 28 and builds a tree structure representing the master tailoring document structure in memory 252.
  • the document structure generator 250 creates the tree structure based on the commands in the input master tailoring document 28.
  • the document structure generator 250 sets the beginning or "root" of a document tree. As depicted in Fig. 4, for the master tailoring document 28 from the Fig. 3 example, the "Document/Simple Test" node object 254 is generated from the master tailoring document "Document" command 152. The node 254 sets the root for the SimpleTest document tree stracture. For each master tailoring document command encountered by the document stracture generator 250 subsequent to the "Document" command, the document structure generator 250 generates branches and sub-branches from the "Document" node 254 until the end of the master tailoring document 28 is reached. As the document stracture generator 250 operates on the master tailoring document
  • the "response” nodes 256-260 have the characteristics specified in the master tailoring document 28.
  • the "group” node 262 sets the node for the "Welcome” group of commands. Extending from the Welcome “group” node 262 are three “text” nodes 264-268 and one group “end” node 270.
  • the "text” nodes 264-268 have the characteristics specified by the master tailoring document 28 depicted in Fig. 3.
  • the code generator 30 generates the source code 26.
  • the code generator 30 generates the source code 26 by invoking a code writer program 272.
  • a sample code writer program 272 is attached as Appendix B.
  • the code writer program 272 generates source code 26 by selectively combining the objects of the generated master tailoring document tree structure with pre- defined, standardized source code snippets from a template 274 to generate a customized program.
  • the code writer 272 first generates a common preamble 300 in the generated source code 26 of Fig. 6 A.
  • the common preamble 300 is generated by selecting a series of preamble snippets 302 from the code template 274 of Fig. 5 A.
  • the code template snippets are formatted in XML.
  • XML is preferable since the XML format is a pure data format that is more amenable to manipulation than languages that combine data with representation characteristics such as HTML.
  • the code writer 272 operates on the pre-defined preamble snippets 302 to insert the proper objects from the master tailoring document tree structure at the appropriate points.
  • the code writer 272 inserts the name of the "document" node 254 ("SimpleTest") into the variable " ⁇ 0 ⁇ " 304 in the code snippet 302 to create a Java class named "SimpleTest” 306.
  • the code writer 272 After creating the preamble, the code writer 272 next writes any Java language that was included directly in the master tailoring document 28, by way of the "Include” command, into the source code.
  • the code writer 272 uses the "include” code snippets 304 (Fig. 5B) from the code template 274 to create this source code, as block 308 indicates (Fig. 6A).
  • the "Include” command was not used in the example depicted in Figs.
  • the code writer 272 After inserting any "included” Java language into the generated source code 26, the code writer 272 writes any global Java language that was included directly in the master tailoring document 28, by way of the "Java” or “Function” commands, into the source code.
  • the code writer 272 uses the "Java” or “function” code snippets 306 (Fig. 5B) from the code template 274 to create this source code, as block 310 indicates (Fig. 6A). Neither the "Java” nor the "Function” commands were used in the example depicted in Figs. 3-6, but these commands are explained in the master tailoring document guidelines attached as Appendix A.
  • the code writer 272 After the code writer 272 writes any "Java” or “Function” language that was written in the master tailoring document 28, the code writer 272 writes a series of Java methods using the document tree structure and the code template snippets.
  • the first method written is named "getResponseNames” and it sets the names of the "response” variables in the generated code by retrieving the "response” variable names from the document tree structure and inserting them into the code template snippet 312 at variable " ⁇ 1 ⁇ " designated as 316.
  • Fig. 5C the code snippet template 274 and block 314 (Fig. 6 A-B) of the generated source code 26 indicate
  • the first method written is named "getResponseNames" and it sets the names of the "response” variables in the generated code by retrieving the "response” variable names from the document tree structure and inserting them into the code template snippet 312 at variable " ⁇ 1 ⁇ " designated as 316.
  • the "response” variables in the Java code of this example are "FirstName” 318, "LastName” 320 and "Age” 322 which come from the three "response” nodes 256-260 of the document tree structure depicted in Fig. 4.
  • the "instrument” variables in the Java code of this example are "FirstName” 330, "LastName” 332 and "Age” 334 which come from the three "response” nodes 256-260 of the document tree structure depicted in Fig. 4. There are no “label” or "endlabel” variables used in the example depicted herein.
  • the code writer 272 also retrieves the "option" characteristics for each "response” variable node in the document tree stracture and inserts these "option” characteristics into the code template snippet 348 at variable " ⁇ 1 ⁇ ", indicated at 352. As illustrated in Fig. 6C, the "response” variables of the example explained herein do not have “option” characteristics so no “options” are set for the “response” variables "FirstName”, "LastName” and "Age” as indicated by designators 354-358.
  • any "variable” computational characteristics are retrieved from the associated "variable” nodes in the document tree stracture a d inserted into the code template snippet 390 at variable " ⁇ 1 ⁇ ” indicated by 396. Since the example explained herein does not have any “variables” or “parameters” designated by the content expert 20, there are no “variables” or “parameters” to compute as the blank space in the Java source code at 398 indicates (Fig. 6D).
  • the next method written is named "setVariableValue".
  • the "setVariableValue” method sets the value of a given variable based on a user input.
  • the code for this method is generated by retrieving the "response" variable names from the document tree stracture and inserting them into the code template snippet 400 at variable " ⁇ 0 ⁇ ” indicated by 404.
  • the result in the source code is that the "response" variables are set to equal the user's inputs for each "response” variable.
  • the "FirstName” variable 406 equals the "value” 408 input by the user for the First Name
  • the "LastName” variable 410 equals the "value” 412 input by the user for the Last Name
  • the "Age” variable 414 equals the "value” 416 input by the user for his or her age.
  • the next series of code snippet templates 418-426 and the related generated source code 428-436 define “get” methods that are generated in the same manner.
  • the code writer 272 generates five “get” methods: 1) “getVariableValue”, 2) “getVariableType”, 3) “getCommand”, 4) "getLabel” and 5) “getObject”.
  • the "get” methods are generated by retrieving the "variable” names from the document tree stracture and inserting them into the code template snippets 418-426 (5J-K, 5E-G) at variable " ⁇ 0 ⁇ ” and then defining what the program is to provide in the "return” line at variable " ⁇ 1 ⁇ ".
  • the output from the program is generated by a "write” method.
  • the "write” method is named “writeDocument” and.it calls on lower level methods (e.g., "writeSimpleTest” 442) to produce the program output.
  • the "writeDocument” method is generated by retrieving the "document” name from the document tree structure and inserting it into the code template snippet 438 at variable " ⁇ 0 ⁇ ” indicated by 444.
  • the lower level methods are generated by retrieving "group” objects branching from the "document” node and inserting them in the proper type of code snippet in the code template.
  • Snippet 438a formats a text node.
  • Snippet 438b formats a graphics node.
  • Snippet 438c formats a group node.
  • Snippet 438d formats a content node.
  • Snippet 438e formats a table node.
  • Snippet 438f formats a chart node.
  • Snippet 438g depicts a series of formats for selection nodes.
  • Snippet 438h depicts a group method format snippet.
  • the code writer 272 develops a group method named "SimpleTestWelcome".
  • the first step in generating group method "SimpleTestWelcome” is accomplished by retrieving the name of the "group” being operated on from the document tree stracture (Fig. 4) and inserting the "group” name into the variable " ⁇ 0 ⁇ ” as indicated at 446 (Fig. 5L), 448 (Fig. 6F).
  • the code writer 272 finds the next node of the group "Welcome” that needs to be inserted into the group method. In this example, it is the text node 264 ("Welcome $$FirstName$$).
  • the code writer 272 then inserts the text from the text node into the text node formatting snippet 438a (Fig. 5K) to generate a text output line of code as indicated at 450 (Fig. 6F).
  • the code writer 272 then operates on the next node of the group, node 266, a conditional text node ("If Age ⁇ 21, return: "You are under 21.”).
  • the code writer 272 inserts this conditional statement into the appropriate selection node formatting snippet 438g (Fig. 5L) to generate the conditional code found at 452.
  • the code writer 272 inserts this conditional statement into the appropriate selection node formatting snippet 438g (Fig. 5L) to generate the conditional code found at 454.
  • the code writer 272 then encounters the group "end" node 270 for the "welcome” group which triggers the code writer 272 to finish processing and preparing the SimpleTestWelcome group code.
  • the code writer 272 continues on to write a few more administrative methods that are generated in a manner similar to the ones described above. At this point the code writer 272 has generated a complete Java source code document. Referring again to Fig.
  • the code development computing system 24 then compiles the generated source code 26 in the code compiler 32.
  • the code compiler 32 converts the generated source code 26 into executable code 34.
  • the executable code 34 is moved to memory 36 where the compiled executable code 34 can be tested by the content expert 20.
  • the content expert 20 may test the generated program by requesting the code development program computing system 24 to invoke the compiled executable code 34.
  • the activated executable code 34 develops the dynamic user interface 500 as depicted in Fig. 7.
  • the dynamic user interface 500 is generated by the code development computing system 24 by calling the "get” methods of the generated source code 26 (the "getVariableValue” method 428, the “getVariableType” method 430, the “getCommand” method 432, the “getLabel” method 434, the “getObject” method 436).
  • the dynamic user interface 500 appears on the content expert's workstation 22 and identifies field information for the content expert 20 to fill in.
  • the dynamic user interface 500 requests the content expert 20 to input a first name in field 502, a last name in field 504 and an age in field 506.
  • the content expert 20 inputs a first name of "John", a last name of "Doe” and an age of "22".
  • this input data may be called from a stored data file and input into the generated program.
  • the input data is sent from the content expert's workstation 22 to the program executable code 34 for processing.
  • the first thing the program does is validate that the proper type of data was entered for each data field (e.g., only numbers, not characters, were entered for an integer "int" type field). If the input data is not valid, the code development computing system 24 sends an e ⁇ or message back to the content expert 20. The content expert 20 then corrects the input data and re-submits it. Once all of the data submitted is valid, the executable code 34 of the generated program passes all of the input data into its respective Java variables (e.g., the first name information (John) is stored in the "FirstName" variable).
  • the generated program calls the "writeDocument” method which processes the input data and prepares an output content document 44.
  • the output content document 44 is an XML document which facilitates further processing.
  • the "writeDocument” method first calls the “writeDocumentHeader” method 460 which writes a document header 462 for the output content document 44 depicted in Fig. 8.
  • the "writeDocument” method next calls the “writeSimpleTestWelcome” method at designation 442.
  • the "writeSimpleTestWelcome” method 456 first calls method "writeGroupHeader” 448 which writes the group header 464 to the output content document 44.
  • the "writeSimpleTestWelcome” method 456 then calls the "writeText” method 450 which retrieves the input for the "FirstName” variable, which in this case is "John” and writes the formatted text section 466 of the output content document 44 which contains the statement "Welcome John”.
  • the "writeSimpleTestWelcome” method 456 next calls the selection method 452 which retrieves the input for the "Age” variable, which in this case is "22", and determines whether the input age is less than 21. In this case, it is not, so the "writeSimpleTestWelcome” method 456 skips to the next selection method 454 which determines if the input for the "Age” variable is greater than or equal to 21.
  • the selection method 454 writes the formatted text section 468 of the output content document 44 which contains the statement "You are 21 or older.”
  • the "writeGroupTrailer” method 470 then writes the trailer 472 for the "group” element in the output content document 44.
  • the "write Variable Values” method 474 writes and formats all of the variable information to the output content document 44.
  • the output content document 44 since it is saved in a pure data format such as XML, may be formatted into any presentation fonnat that the system operator wants to put the output information into.
  • the output information may be saved as a HTML file 50 by conversion through the HTML publisher 46.
  • the HTML file 50 is then sent to content expert's workstation 22 where the workstation's browser opens the HTML file 50 and displays it for the content expert 20 to review.
  • Fig. 9 illustrates what the content expert 20 sees in the example described herein.
  • the output content document 44 may be sent through the text publisher 70 to generate a text file 72 for the content expert 20 to review or tlirough the print publisher to generate a print file 68 for the content expert 20 to review.
  • MTD Master Tailoring Document
  • TJ Tailored Java
  • TJBuilder is incorporated into the Grinder tool so that content developers may never actually need to run it directly.
  • MTD files are created using Microsoft Word. Within the MTD file, "tables" are used to contain tailoring information. TJBuilder ignores anything outside of a table. It is a good practice to place commentary text in the MTD file but outside of any table. Any number of tables may be used in the MTD file. There is no significance to ending one table and starting another. The format of the tables is not significant. For example, developers may select any column width that is appropriate.
  • the MTD files are saved in HTML format for processing in TJBuilder/Grinder. Because MS Word 97 files saved as HTML do not retain all document information, MTDs will be constructed and maintained as ".doc" files and then converted to HTML for processing. Once HMI begins using Word 2000, in which documents saved in HTML format retain all Word information, MTD files will be created and maintained in HTML.
  • TJBuilder looks for a "command word" in the first cell of each row. This command word determines the format of the rest of the cells in that row.
  • the first cell on in a row within a table contains the "Command Word.” For some commands, additional information may be included after the command word (e.g. "LEVEL 1"). All currently defined commands are further described starting on page 9. Below is a summary:
  • DOCUMENT specifies the document name and title.
  • RESPONSE defines a questionnaire response.
  • PARAMETER defines a characterization variable based on RESPONSE variables and on other PARAMETER variables. PARAMETER variables are loaded from and saved into the database.
  • VARIABLE defines a variable just like PARAMETER. However, VARIABLE variables are not saved into the database.
  • GROUP collects the commands that follow it into a group.
  • LEVEL groups a collection of commands together at a specified level.
  • TEXT specifies content text.
  • GRAPHIC specifies a graphic.
  • TABLE creates data to be displayed in tabular format.
  • CHART creates data to be displayed as a chart.
  • CONTENT synthesizes either text or graphics using Java code.
  • TOPIC is equivalent to "LEVEL 2".
  • SENTENCE is equivalent to TEXT.
  • FUNCTION defines a Java function that may be referenced in subsequent code.
  • JAVA allows raw Java code to be included. This code might define additional variables or Java functions. This is an advanced feature that will often not be used.
  • INCLUDE specifies an additional file to include at the current table position.
  • SCHEDULE allows the use of Java code for determining when a document for a particular enrollee should be tailored.
  • COMMENT defines a comment that will be ignored.
  • Page 3 of 30 • COMMAND and VERSION are similar to COMMENT.
  • COMMAND may be used to place headers at the top of a table to label columns for ease of editing.
  • VERSION may be used to record modifications.
  • Commands may be in any combination of upper and lower case. If a command is not recognized, a warning message is generated.
  • Any command may be prefixed by "//”, e.g. "//INCLUDE”. This will not generate an error but will disable that command, essentially treating it like a comment. This is useful for temporarily disabling a command without otherwise disturbing it.
  • the text in the name cell must be a single "word” in that it can have no spaces. It also must not have a paragraph end 01) within the cell. (You can see these by using the Show/Hide ⁇ command.) The name must also start with a letter. Upper/lower case is significant.
  • the TJBuilder program will detect duplicate names and generate an error message.
  • Some cells contain "snippets" of Java code, i.e. conditions, characterization, etc. This Java code will be inserted into the created Java source file and will then be compiled by the Java compiler. As a result, the Java snippets must legal Java code with one exception.
  • MS Word allows the use of "smart quotes.” As the user types a " character, a " or " is inserted instead, depending on the context. This is very useful for writing content text. Often it is also necessary to use a " in Java code but the use of” and " is not legal. In order to allow the content developer to use smart quotes when writing content and in order to avoid turning the smart quote option on and off, it will be allowable to use " and " in Java code. TJBuilder will automatically replace them with ". Many of the examples in this document use " and " in Java code.
  • the TEXT and SENTENCE commands contain a text cell. Text in this cell may be included in the TCD, depending on the expression in the condition cell. Within the text cell, you may use bold, italic and underline. This formatting is carried through to the final output. Other changes in format may be specified using the embedded style feature described below.
  • MS Word 97 converts directional double-quotes (" and ”) into straight double-quotes when saving to HTML. In order to use directional double-quotes, insert ##ldq## and ##rdqTM in the text for left and right double-quotes. Word 2000 does not have this problem.
  • Double dollar characters may not be used unless it is for Java substitution as defined in the next Java Substitution section on page 6.
  • Double pound characters (##) may not bue used unless it is to pass information to the publication engine, e.g. ##lrq## for left quotation or ##style for embedded styles.
  • Other special characters e.g. C may be used as long as they are in the special characters table on page 24.
  • the LABEL and RESPONSE commands allow the placing of a "label" in column 6. This label is used by the Grinder development tool to label the input user interface. When used on a LABEL command, Grinder displays the label text on a line by itself in the user interface. Grinder also provides a popup menu of all LABEL commands to assist in navigating through the user interface.
  • the label text is displayed next to the input field in the Grinder user interface.
  • Variable text may be substitututed into output by including Java code right in the text by enclosing it in SSjavaSS.
  • the enclosed Java code must evaluate to either a String, boolean or number. For example:
  • the "todayO" function is called and it retums a Date containing the current date. It is converted to a day number by "dateToDayO"- Similarly, the QuitDate variable is converted to a day number and the difference is computed by the subtraction sign "-". The resulting numeric value is automatically converted to a String and inserted into the tailored text. The following might result:
  • the CONTENT command can be used to do simple or complex math. Consider the following example:
  • the VARIABLE command defines a variable named TotalCalories to contain the number of calories. Any combination of the three groups can be selected, depending on the values of IncludeRecipel, IncludeRecipe2 and IncludeRecipe3. In any case, TotalCalories will end up containing the total number of calories.
  • the "Date” type can be used to store a date. This date might be imported from a questionnaire or may be computed. Often it is veiy useful to convert a Date to a day number using the "dateToDayO" function. This function retums an "int” value that is the number of days since January 1, 1970. As it may be negative, dates before January 1, 1970 are handled properly. For example, to compute the number of days since a person has quit smoking:
  • QuitDate is converted to a day number, 14 is added to it and then that value is converted back to a Date.
  • a TList variable contains a list of items, each item described by a text string.
  • the TList variable also contains minimum and maximum limits. While it is possible to place items on the TList outside these limits, the "is Valid" function will return false in this case.
  • Tne min, max and list of item names are defined when the TList variable is created (generally by a RESPONSE, PARAMETER or VARIABLE command). The presence of an item on a TList may vary during execution of the MTD. Functions exist for placing items on the TList and for various tests.
  • the format for a TList in a Java type cell is:
  • TList min,max,iteml,item2,item3,...,itemN where: mm is a number indicating the minimum number of items that can be on the list and still have it considered “valid”. max is a number indicating the maximum number of items that can be on the list and still have it considered “valid”.
  • nameI,...,nameN are names of items that can be placed on the list. Usually these are short names like "Male” or "HBP”. (See below for an extension of this.)
  • the TList "GenderList” must have a minimum and maxium of one item, either "Male” or "Female". Note that it is possible that GenderList will have neither Male or Female, or that it will have both. In these cases, "isValid(GenderList)" will return false.
  • DiseaseList can have 0 to 10 items.
  • Page 7 of 30 remove(DiseaseList, "HBP”); or set ⁇ iseaseList, "HBP", false);
  • TLists Another important function for TLists is "toStringO" hich is used for printing (e.g. in SS substitution).
  • the toString function formats the names on the list using commas and the word "and". The format depends on the number of items on the list:
  • HBP HA HBP and HA
  • HBP HA Stroke HBP, HA, and Stroke
  • HBP HA Stroke TIA HBP, HA, Stroke, and TIA
  • TList definition can be extended to include a "long name" for each item. Instead of writing "HBP", the item can be written "HBP/High Blood Pressure". The short version before the '"/" is used for normal operations. However, when a TList variable is printed (or the toStringO ftmction is used), the long names will be used.
  • DiseaseList contains toStrinefPiseaseList') returns nothing "" (empty string)
  • HBP HA high blood pressure and heart attack
  • HBP HA Stroke "high blood pressure, heart attack, and stroke"
  • HBP HA Stroke TIA "high blood pressure, heart attack, stroke, and TIA"
  • a "layout file” is used to define the format of the published document (in PostScript for printing or HTML for Web).
  • the layout file defines a number of "Styles” which are used throughout the document Generally, these styles are applied to whole sections by the layout file.
  • the MTD format allows the specification of "min” and/or “max” in the options column for GROUP, LEVEL, TEXT, GRAPHIC, CONTENT, TABLE and CHART.
  • Grinder it will be possible to select "min” or “max” and create a document based solely on these setting, ignoring the condition expressions.
  • New commands allow the creation of tailored tabular data that can then be formatted into tables or charts by the appropriate publisher (PostScript or HTML). Note that these commands merely supply the tailored data to be used and the lavout file defines the format of the table or chart.
  • Text with this format will be published appropriately.
  • the bullet character, the bullet indent and the text indent can all be specified in the layout file.
  • the ⁇ UL> and ⁇ LI> tags will be used so that the formatting will be done by the browser.
  • DOCUMENT command There is one DOCUMENT command and it must come before all other commands except INCLUDE, COMMENT and COMMAND.
  • Name is a simple name describing this project MTD. This must be the same name as is used for the Java output file when running Grinder.
  • the MTD format is used to define response information.
  • a simple variable is defined using the new RESPONSE command.
  • Name is a simple name describing this response variable. It becomes a Java variable name that can be referenced in subsequent Java code such as characterization or conditions.
  • Options is a list of keywords that specify optional items. Currently only one is defined for the RESPONSE command: req or required this response is required (may not be left blank)
  • Type is a Java type. Common examples are: int integer (e.g. 1, 2, 3) float floating-point number (e.g. 3.14159) boolean has two values, true and false
  • Date contains date/time information
  • String contains a text string
  • Initialization Validation code is a Java snippet that does initialization after the data is imported and also checks w'hether the response data is valid.
  • the PARAMETER command defines a variable which may be used by other variables and in conditions. Parameters are read from the database at the beginning of tailoring and are written back to the database at the end.
  • Name is a simple name describing this characterization variable. It becomes a Java variable name that can be referenced in subsequent Java code such as characterizations or conditions.
  • Type is a Java type. See the RESPONSE command.
  • Characterization code is a Java snippet that sets the value of the PARAMETER variable. It can reference RESPONSE variables as well as other characterization variables already defined (occurring earlier in the MTD).
  • VARIABLE command is essentially the same as the PARAMETER command. The only difference is that VARIABLE variables are not written to the database in production.
  • This command defines the beginning of a collection of commands that are treated as a group.
  • the condition code applies to all the commands in the group.
  • Groups can contain other groups, either defined using GROUP or LEVEL.
  • the list is terminated by an END command.
  • Name is a simple name describing this group. Publication layout templates use this name. Options is a list of keywords that specify optional information. min this group is part of the "min” configuration max this group is part of the "max” configuration
  • Condition is a Java expression defining whether the group members should be selected.
  • Name is the name of the GROUP that is ending. If present and it does not match the appropriate group, an error is ⁇ enerated.
  • This command is similar to GROUP in that it defines the beginning of a collection of commands that are treated as a group. However, no END command is required. The group is terminated when another LEVEL at the same level or higher is found. (Here, a higher level means a lower level number, e.g. level 1 is higher than level 2.)
  • the condition code applies to all the commands in the group.
  • Groups can contain other groups, either defined using GROUP or LEVEL.
  • Levelnum is a number. Level 1 the top level (beneath the DOCUMENT "level”).
  • Name ⁇ s a simple name describing this group. Publication layout templates use this name.
  • Condition is a Java expression defining whether the group members should be selected.
  • the content developer may use either GROUP or LEVEL.
  • GROUP command allows groups of commands to be moved up or down in the hierarchy without editing level numbers.
  • the LEVEL command is more explicit and does not require the END command.
  • SECTION and TOPIC may be used as synonyms for LEVEL 1 and LEVEL 2.
  • the TEXT command is the primary mechanism for specifying text that may be included in the tailored output.
  • the primary version of the text is placed in the fifth column.
  • Alternative versions e.g. Spanish or numeric data
  • An external mechanism selects which text column to use.
  • Name is a simple name describing this block of text.
  • Options is a list of keywords that specify optional information. min this text is part of the "min” configuration max this text is part of the "max” configuration
  • Text is formatted text as described in the "Text Cells" section on page 5.
  • the GRAPHIC command allows the specification of conditional graphics to be included in the tailored content.
  • the GRAPHIC command conditionally defines the name of a graphic element.
  • the layout document specifies which graphics file is to be used for this name.
  • Name is a simple name describing this graphic. Used by the layout file to specify an actual graphics file. Options are a list of keywords that specify optional information. ' min this text is part of the "min” configuration max this text is part of the "max” configuration
  • CONTENT allows a more general type of content. Like TEXT and GRAPHIC, it has a condition column and is often part of a GROUP. In addition, it has arbitrary Java code which can dynamically generate content.
  • Java code is arbitrary Java code. Generally it will contain calls to "vvriteText'' and “writeGraphic'” resulting in text and graphic content being selected. It might also contain code to math or database access.
  • the TABLE command allows the creation of tailored tabular data that can then be formatted into table form by the appropriate publisher (PostScript or HTML). Note that this command merely supplies the tailored data to be used and the lavout file defines the format of the table.
  • Name is a simple name describing this table. The publisher will use this name to format and position the table.
  • Condition is a Java expression defining whether this table should be selected.
  • Table data is a list of data items, separated by commas and semicolons. Commas separate table cells within a row; semicolons separate rows. The data items must be strings without commas or delimeters. Use SS-SS for
  • Page 14 of 30 Java expression substitution is allowed. Spaces and paragraph breaks are ignored and may be used to make the rows more readable.
  • the CHART command allows the creation of tailored tabular data which can then be displayed in chart form by the appropriate publisher (PostScript or HTML). Note that this command merely supplies the data to be used and the lavout file defines the format of the char
  • the CHART command is essentially identical to the TABLE command and results in the same type of data being passed to the publisher.
  • Name is a simple name describing this chart. The publisher will use this name to format and place the chart. Options is a list of keywords that specify optional information. min this chart is part of the "min” configuration max this chart is part of the "max” configuration
  • Condition is a Java expression defining whether this chart should be selected.
  • Paze 15 of 30 Table data is a list of data items, separated by commas and semicolons. Commas separate table cells within a row; semicolons separate rows. The data items must be strings without commas or delimeters. Use SS-SS for Java expression substitution is allowed. Spaces and paragraph breaks are ignored and may be used to make the rows more readable.
  • the new FUNCTION command allows the definition of a Java function that may be used in subsequent expressions including conditions.
  • Name is a simple name for the function.
  • Options is a list of keywords that specify optional information. Currently, none are defined for this command.
  • Type is a Java type. See the RESPONSE command.
  • Java code is Java code thai defines the function.
  • Java function which returns a boolean value.
  • the JAVA command allows the inclusion of raw Java code. This is an advanced feature and will often not be used.
  • Java code is Java code that will be included in the aenerated source file.
  • the Java code above creates a global variable named "cal” which contains a Calendar object.
  • the function "isTuesday” is also defined and it can be called from any Java code.
  • a MTD file will include subfiles, each of which may be developed separately, perhaps by a different content developer.
  • FilePathName is the pathname of another MTD file in HTML format.
  • the path can be either relative (in the same folder or lower) or absolute (a full pathname).
  • the SCHEDULE command is used to determine when a document is to be executed.
  • the Java code is executed everyday by the production system until it indicates that the document is ready to be run. Once run, the production system will subsequently not call the Java code.
  • This Java code will evaluate to "true” when the "todayO" function returns a date which is greater than 14 days after QuitDate.
  • COMMAND Lines beginning with COMMAND or VERSION are completely ignored.
  • the COMMAND command may be used to label columns.
  • VERSION may be useful for recording modifications to the MTD file.
  • a LABEL command provides a string of text used in a user interface.
  • the Grinder application displays the label when it builds its user interface for inputing responses.
  • Grinder will display "Personal Information" on the line before it prompts for FirstName.
  • Your birthdate is SStoString(BirthDate, DateFormat.LONG)SS.
  • IsSimoker toBoolean(SmokerStr);
  • names contains a comma-separated list of names (e.g. "a,b,d”).
  • any character in the standard "Symbol” font may be used. However, it does not work to simply include the character using the Symbol font in Word. Instead, use “n-s-S YMs#” to switch to the symbol font Then use the corresponding normal character then "??i?STD#&" to switch back to the standard font. For example:
  • TJWriteJavaJob is a job class that writes tailored Java.
  • File javaFile new File(filePath); // verify that it exists and is readable if (javaFile.canReadQ) ⁇
  • TJNode node (TJNode)enum.nextElement(); , if (node.isVariableQ) ⁇
  • StringBuffer converter new StringBuffer(); converter.append("toString("); converter.append(name); converter.append(""); return converter.toStringQ;

Abstract

A system and method for generating computer source code using a document prepared by a non-programmer in a language and in a software application that the non-programmer is familiar with. The system and method parse out the program methodology prepared by the non-programmer and use it, in combination with pre-defined code snippets (30) to generate source code (26). The non-programmer, due to the real-time creation of the computer source code, is able to activate the program almost immediately after creaction and dynamically test and modify the program as necessary (40).

Description

SYSTEM AM) METHOD FOR GENERATING COMPUTER SOURCE CODE
CROSS-REFERENCE TO RELATED APPLICATIONS
This application claims the benefit of U.S. Provisional Application No. 60/195,721, filed April 7, 2000, entitled "System And Method For Behaviorally Tailoring An Individual's Health-Related Behaviors", which is hereby incorporated by reference.
This application is related to U.S. Patent Application Serial No. 09/632,285, filed August 3, 2000, entitled "System And Method For Generating Tailored Media Content To Affect An Individual's Health-Related Behaviors", which is hereby incorporated by reference.
APPENDICES
The application includes computer program related materials in the form of appendices.
COPYRIGHT NOTICE
A portion of the disclosure of the patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure, as it appears in the U.S. Patent and Trademark Office patent files or records, but otherwise reserves all copyright rights whatsoever.
BACKGROUND OF THE INVENTION
Experts, either explicitly or implicitly, no matter what field of endeavor they specialize in, be it health, legal, financial, education, marketing, advertising or numerous others, apply some form of methodology or analysis to analyze a client's problem and determine the best way to address the problem. Much of the time the methodologies and analyses employed are complex, based on the experts' knowledge, training and years of experience and not readily adaptable as a computer program. However, in other instances, the expert applies a clearly defined sequential methodology or analysis to determine the cause of the problem and the best way to resolve it. In these instances, the methodology or analysis employed by the expert and the resulting advice is not much different than what a computer does when it executes an algorithm. This fact has been known for years, and for years, people have tried to turn expert knowledge and methodologies into executable computer algorithms that provide solutions to a client's problems based on the data input by the client. This effort has enjoyed a substantial amount of success, but it has not been without difficulty and need for improvement.
Developing these expert methodology computer programs is difficult and time consuming. This stems mostly from the simple fact that the experts who develop the content and methodologies for the programs are often not computer programmers, and vice versa, the programmers are not experts in the field being addressed. Experts involved in such program development projects, historically, need to flowchart or describe the methodology and the generated output or solution in great detail. This flowchart or description is then provided to a computer programmer to generate source code that executes the flowcharted or described methodology. This system is workable, but it has its inherent limitations. After the programmer programs the algorithm, the code needs to be compiled and tested so the expert can review it to see if the program is working as intended. Often, however, the code is incorrect on the first try for a number of reasons. Many of these problems are caused by bugs that commonly occur in programming a new computer program. Many of these problems, more significantly though, are caused by the programmer misinterpreting the expert's flowchart or notes or the expert not explaining the methodology clearly or in enough detail. In these instances, the expert and the programmer need to meet, usually on numerous occasions, to re-write, re-run and review the code and its operation until it works properly. This is a very time consuming and inefficient, if not impossible, way to prepare computer programs.
As a result of these difficulties, there is a definite need for a system that allows a person to write computer code using language that the non-programmer is familiar with to create the code instead of having to learn complex computer program languages, such as C++ or Java. With such a system, subject matter experts are able to draft computer code directly, eliminating the inefficiencies and frustrations caused by using a middleman programmer to program the code. Some systems have been developed along these lines, but these systems still have numerous drawbacks and require significant training time. In one such system, the non-programmer creates a master content document (MCD) detailing the conditional parameters and their possible inputs and detailing the structure and content of output that will be generated by a separate processing program. In such a system, the processing program, when executed, captures data from a system user and pulls in information from the MCD as necessary, based on these inputs. Such computer program generation systems, though easier and more efficient than prior processes, are still cumbersome and have numerous deficiencies and built-in inefficiencies. In the development of MCD program systems, a processing program still has to be generated by a computer programmer in addition to the MCD prepared by a non-programmer content expert. This processing program still needs to be reviewed and tested by both the programmer and the content expert to ensure that the MCD is compatible with the processing program and that the MCD and processing program are working properly together to generate the appropriate output. This system does not allow the non- programmer to view the results of his programming in real time. As a result, program development in an MCD system remains fairly labor and time intensive and is fairly inefficient. MCD systems also have some very significant production limitations. Because of the structure of having the processing program operate on separately developed MCD, the condition statements that may be written into the processing programs for such MCD systems are fairly limited, and as a result relatively weak. Also, in such systems the output content that can be supported is fairly limited which ultimately restrains the final presentation of tailored output from the system. Also in production, as a result of a processing program operating on a separate MCD, the processing time for MCD systems is relatively slow, resulting in lengthy waits for tailored output.
Due to the shortcomings in prior systems, there is a need for a computer program generation system in which a non-programmer can write the methodology for a computer program in a language and in a software application that the non-programmer is familiar with, such as a word processing program or general text editor, and have this computer program methodology converted into an executable computer program. In conjunction with this need, there is a need for a computer program generation system in which the program developer can review the program in real time so he can ensure it is operating as intended and, if not, make the corrections immediately.
There is also a need for a computer source code generation system that can create programs having very powerful condition statements and having the ability to utilize a wide variety of content (e.g., formatted text, pictures, tables, charts, graphics) from a variety of different sources. There is a further need for a computer source code generation system that can generate computer programs having the qualities discussed above that executes extremely quickly in a production environment.
SUMMARY OF THE INVENTION
According to one aspect of the present invention, a method for generating computer source code includes preparing a master tailoring document which contains logic for a computer program, inputting the master tailoring document into a document structure generator which parses out the computer program logic contained in the input document and builds a document tree structure based on the program logic, and providing a code writer program and a template of pre-defined source code snippets so the code writer program may retrieve the computer program logic from the document tree structure and combine the retrieved program logic with designated source code snippets from the template to generate source code for a computer program. The source code generation method may farther include compiling the generated source code to convert the generated source code into executable code.
The source code generation method may also include providing computer memory and a computer workstation, moving the executable code to the computer memory, activating the executable code which generates a dynamic user interface on the computer workstation, inputting data into the dynamic user interface and submitting the data, processing the input data, and creating an output content document.
The source code generation method may further include formatting the output content document into a formatted file and transmitting the formatted file to the computer workstation for review. The act of formatting the output content document into a formatted file may be done by providing a hypertext markup language (HTML) publisher and an HTML layout file and by inputting the output content document and the HTML layout file into the HTML publisher to format the file into HTML format. The act of formatting the output content document into a formatted file may also be done by providing a print publisher and a print layout file and by inputting the output content document and the print layout file into the print publisher to format the file into a print file format. The act of formatting the output content document into a formatted file may also be done by formatting the output content document into a text file format.
In the source code generation method of the invention, the master tailoring document may also include commands that set document tree structure nodes when parsed by the document structure generator and that create branches from each generated node when parsed by the document stracture generator. The master tailoring document may further include group commands which have subcommands that create branches from each generated node when parsed by the document structure generator.
The template of pre-defined source code snippets of the source code generation method may be written in extensible markup language (XML) and the generated source code may be written in the Java programming language. In another aspect of the present invention, the master tailoring document may include at least one condition statement written to output text content based on the condition statement. The master tailoring document may also include at least one condition statement written to output graphics content based on the condition statement.
According to another aspect of the present invention, a system for generating computer source code from a master tailoring document which contains logic for a computer program includes a code generator having a document structure generator, a memory, a code writer and a template of pre-defined source code snippets in which the document structure generator parses out the computer program logic contained in the master tailoring document and builds a document tree structure in memory based on the program logic and in which the code writer program retrieves the computer program logic from the document tree structure and combines the retrieved program logic with designated source code snippets from the template to generate source code for a computer program.
The source code generation system may further include a code compiler for compiling the generated source code to convert the generated source code into executable code. The master tailoring document of the source code generation system may include commands that set document tree structure nodes when parsed by the document stracture generator and may also include commands that create branches from each generated node when parsed by the document structure generator. The master tailoring document of the source code generation system may also include group commands which have subcommands that create branches from each generated node when parsed by the document structure generator.
The template of pre-defined source code snippets of the source code generation system may be written in extensible markup language (XML), and the generated source code may be written in the Java programming language. According to another aspect of the source code generation system, the master tailoring document may include at least one condition statement written to output text content based on the condition statement. The master tailoring document may include at least one condition statement written to output graphics content based on the condition statement. It is an object of the present invention to provide a computer source code generating system and method in which a non-programmer can write the methodology for a computer program in a language and in a software application that the non-programmer is familiar with which generates source code for a computer program.
It is another object of the present invention to provide a computer source code generation system and method in which the non-programmer may test, review and debug the program he or she has developed in a dynamic fashion.
It is a further object of the present invention to provide a computer source code generation system and method which produces computer source code capable of handling powerful condition statements and capable of supporting a wide variety of content from a wide variety of sources. It is another object of the present invention that the computer source code generation system and method produce computer tailoring programs that execute extremely quickly in a production environment.
BRIEF DESCRIPTION OF THE DRAWINGS These and other features, aspects, and advantages of the present invention will become better understood with regard to the following description, appended claims, and accompanying drawings where:
FIG. 1 depicts an overview of the development process for generating computer source code in the present invention; FIG. 2 depicts an overview of the computer source code generated by the system and method of the present invention in a production environment;
FIG. 3 illustrates an exemplary master tailoring document in an embodiment of the present invention; FIG. 4 illustrates the process within a code generator of the present invention for generating source code from the exemplary master tailoring document;
FIGS. 5A-M depict an exemplary code template used by a code generator of the present invention; FIGS. 6A-G depict exemplary source code generated by the code generator of the present invention;
FIG. 7 depicts an exemplary dynamic user interface developed by executable code generated by the system and method of the present invention;
FIG. 8 depicts an exemplary output content document developed by executable code generated by the system and method of the present invention; and
FIG. 9 illustrates an exemplary display on the workstation of user of a system using the executable code generated by the system and method of the present invention.
DETAILED DESCRIPTION OF THE INVENTION
I. Overview
A. Program Development
Referring to Fig. 1, a content expert 20 interacts, via a computer workstation 22, with a code development computing system 24 to generate computer source code 26 and to test the code 26 to ensure it is working properly. The content expert 20 writes the algorithm content and logic into a text editing tool that he or she is familiar with, such text editing tools may be any text editor including word processing programs like Word or WordPerfect. The algorithm content and logic details the program's needed inputs, the conditions and processes that the program applies and performs and the output information that the program generates after applying and perfoπning these conditions and processes on the captured inputs. The entered program algorithm content and logic is saved as a document called a master tailoring document 28. The master tailoring document 28 maybe saved in a variety of formats, including Hypertext Markup Language (HTML) and Extensible Markup Language (XML). Saving the master tailoring document 28 in either HTML or XML format facilitates processing the information contained in the document.
Once developed, the master tailoring document 28 is input into the code development computing system 24. At that point, a code generator 30 operates on the master tailoring document 28, as described in detail below, to parse the master tailoring document 28 into its component elements and then combine these component elements with templated source code to generate the outputted computer source code 26. The source code 26 generated by the code generator 30 is then compiled by a code compiler 32, resident in the code development computing system 24, which converts the source code 26 into computer executable code 34.
B. Dynamic Program Testing Once compiled, the program can be tested in real time by the content expert 20. The content expert 20 does not have to wait for a programmer to write the code and compile the program before he or she can review it. This feature of the invention reduces program development time exponentially. Dynamic testing is possible because the developed executable code 34 is loaded into the memory 36 of the code development computing system 24 immediately after the executable code 34 is created. The stored program can then be accessed by the content expert 20.
To test the program, the content expert 20 activates the developed program executable code 34. The executable code 34, once activated, creates a dynamic user interface 40 on the content expert's workstation 22, as indicated by line 38. The dynamic user interface 40 prompts the content expert 20 for test input information. Once the content expert 20 enters all the necessary test information, he or she submits it to the program for processing, as indicated by line 42. The program, after receiving the inputs, processes the received information and, if the program executes properly, the program creates an output content document 44, as indicated by line 52. If, on the other hand, the program encounters an error during execution, it posts the error to an error log 54, as indicated by line 56, and generates an error message for the content expert's attention, as indicated by line 58. If the error was an improper data input, the content expert 20 can correct this easily and immediately by properly re-entering the input data and re- submitting it. If the error, however, was identified as a problem in the program code, the content expert 20 needs to review the master tailoring document 28 to determine the error and resolve it. In this situation, once the content expert 20 identifies the problem and corrects it, the content expert 20 needs to re-generate the computer source code 26 and re- compile it as described above.
The output content document 44 created by the program contains raw output data which may be formatted as required. In Fig. 1, the output content document 44 may be formatted in three different ways. One way is through an HTML publisher 46. The HTML publisher 46 calls on an HTML layout file 48 to generate an HTML file 50 using the information from the output content document 44. The HTML layout file 48 is a previously created file developed by a web site developer in conjunction with the content expert 20 which defines the output foπnat for the output content document information and defines and positions any graphics, charts or any other material required by the output content document to be inserted into the published document. As indicated by line 66, the content expert 20 can access the generated HTML file 50 through his workstation browser so he can review the output information and its presentation to determine if changes need to be made.
The output content document 44 may also be formatted as a text file 72 through a text publisher 70. The generated text file 72 may be transmitted to the content expert's workstation 22, as indicated by line 74, where the content expert 20 may spell check the document and perform other text editing functions on it, if necessary. The output content document information may also be formatted as a print file 68, in a format such as PostScript. The print file 68 is generated by a print publisher 60 which calls on a print layout file 62 to generate the print file 68. The print layout file 62, similar to the HTML layout file 48, is a previously created file developed by a print layout artist in conjunction with the content expert 20 which defines the output format for the output content document information and defines and positions any graphics, charts or any other material required by the output content document to be inserted into the printed document. As indicated by line 64, the content expert 20 can access the generated print file 68 for review and correction, if necessary.
C. Program Use in a Production Environment Referring to Fig. 2, once the program has been tested and certified for production, the developed program executable code 34 is moved to a program production system 100. Once in the production system 100, the program operates as it did in testing. As indicated by line 106, to access the program production system 100 and activate a system controller 107 resident in the program production system 100, a user (which may be any individual, including an end user or a system operator) uses a system access device 104. The system access device 104 may be any device capable of interacting with a system controller, such as a computer, a personal digital assistant (PDA), a cellular phone, a pager, a call center system, an interactive voice response ("IVR") system, a system for a data input center, an e-mail system or any type of network access device. As line 108 indicates, the system controller 107 creates a dynamic user interface which prompts the user for user input data. Once the user enters all the necessary input data, he or she submits it to the system controller 107 for processing, as indicated by line 110. The system controller 107, after receiving the inputs, saves the inputs to a user input database 112. The system controller 107 then activates the developed executable code 34. The executable code 34 interacts with the user input database 112, retrieving the pertinent information, and processes it. The executable code 34 processes the input data to generate an output content document 114, as indicated by line 116.
As during testing, the output content document 114 created by the program contains raw output data which may be formatted as required. In Fig. 2, the output content document 114 may be formatted in three different ways. The HTML publisher 46 may call on the HTML layout file 48 to generate an HTML file 118 using the output content document infonnation. The HTML file 118 is transferred to a web server 124 which may interact with a browser on the user's system access device 104 which, as described above, may be any number of devices including a computer, a PDA, a pager or a cell phone to generate an end user web page 125 which displays the processed information for review by the user. The output content document 114 may also be formatted as a text file 120 through a text publisher 70. The generated text file 120 may be transmitted to an e-mail exporter 126 for transference to the user's system access device 104 as an end user e-mail 127. The output content document information may also be formatted as a print file 122, in such a format such as PostScript. The print file 122 is generated by a print publisher 60 which calls on a print layout file 62 to generate the print file 122. The print file 122 is transferred to a File Transfer Protocol (FTP) server 128. The print file 122 may be sent to any recipient 129 that needs the print file 122, such as a print vendor for printing. The print vendor, in turn, may send the printed documents on to an end user 131.
II. Code Generation Details The system of the present invention may be used to develop source code for any type of programming language, such as Java, using a text editor program. In the preferred embodiment, the content expert 20 develops a master tailoring document 28 similar to the one depicted in Fig. 3 using a text editor program. The master tailoring document 28 is a set of tables that specify the program information. The tables specify the program name, the inputs that the program requires and the conditions that are applied to the input data to develop output content. To develop the program, the content expert 20 follows guidelines set for developing the program charts. An example of such guidelines are attached as Appendix A. To make program development simpler, the guidelines specify simple, intuitive, easy to follow commands and field identifiers.
Turning to the first table 150, the first column 152 of this table includes "command" cells. The command in the first cell of the first table is the "Document" command. The "Document" command requires the input of a document/program name in the adjoining cell in the second column. As indicated in cell 154, in this example, the program's name is "SimpleTest".
The next table in this example is the "Response" table 156. The Response table 156 specifies the input data that the program requires. The cells of the Response table may be formatted in any manner as long as they conform to a set of structuring guidelines similar to those attached as Appendix A. In this example, however, each row of the Response table is formatted in a similar manner. The first column 158 of the Response table 156, similar to the first column 152 of the first table 150, is a "command" column. The second column 160 of table 156 is a "name" column. When used with the "response" command, the "name" cell provides a name for the input that is requested by the "response" command. The third column 162 is an "options" column. A cell in the "options" column 162 lists any options required for that entry. For instance, if an input is required for a "response" field, the content expert 20 could ensure that the program would not continue unless data was entered for this field by specifying in the "options" cell that data had to be input for this field for the program to execute. The "options" cells of table 156 are not employed in the example depicted in Fig. 3. The fourth column 164 of table 156 is a "type" column 164. A cell in the "type" column 164 describes the characteristics a response to the query generated by the "Response" command must have. For instance, the "FirstName" variable 171 is a "String" type field as indicated by identifier 170 which means that only character values can be entered for this variable. The last column 166 of the table 156 is the "comment" column. A cell in the "comment" column 166 contains the prompt command that a user sees when he or she uses the program. For the Response field 168, the user is prompted with the comment "First Name:" from cell 172. In the example depicted in Fig. 3, the program requests the user for his first name (field 168), his last name (field 174) and his age (field 176). The "FirstName" and "LastName" response fields both require character data input as indicated by the "String" designation in their respective "type" cells 170, 178. The "Age" response field 176 requires the input of an integer as indicated by the "int" designation in its "type" cell 180.
The next table 182 in this example is the "Content" table. The Content table 182 specifies the conditions and operations that are applied to the data inputs and the resulting outputs that are generated by these conditions and operations. As with the Response table, the cells of the Content table 182 may be formatted in any manner as long as they conform to a set of structuring guidelines similar to those attached as Appendix A. The first column 184 of the Content table 182, similar to the first columns 152, 158 of the first table 150 and the Response table 156, is a "command" column. The second column 186 of table 182 is a "name" column. The third column 188 is an "options" column. A cell in the "options" column 188, as with the Response table "options" cells 162, lists any options required for that entry. The "options" cells for table 182 are not employed in the example depicted in Fig. 3. The fourth column 190 of table 182 is a "condition" column 190. A cell in the "condition" column 190 specifies a boolean expression that, if true, generates a program specified output, such as text or graphics. The boolean expressions specified in a "condition" cell 190, in this embodiment, are written in standard Java language because these boolean expressions are inserted directly into the program source code that is ultimately generated. The fifth column 192 of table 182 has multiple uses depending on the type of command entered in the "command" column 184. As shown and explained in Appendix A, the content expert 20 may employ a variety of different commands in the "command" column 184 depending on what the content expert 20 wants to set a condition for. This format allows a content expert 20 to use very powerful conditions statements. For instance, if the content expert 20 uses the "Graphic" command described in Appendix A, frame 16, the generated program, when executed, will return a designated graphic if the condition statement is satisfied. Further, since Java code may be directly input into the master tailoring document 28 using the "Java" command (Appendix A, frame 20), the resulting program has all the power and capability of a program written directly in Java. This allows programs generated by the present invention to support a wide variety of content, including formatted text, pictures, tables and charts. In the embodiment depicted in Fig. 3, "text" commands are illustrated so the entries in the fifth column 192 in this embodiment all specify text that the program outputs if the boolean expressions in the cells of the column condition 190 are true. Additional columns may be added to table 182 if necessary. Additional columns may include such things as alternate language versions (e.g., the text of column 192 translated into German, French or Spanish) which may be output instead of English if the user selects this alternate language as his or her primary language. (See the explanation of the "text" command, Appendix A, frame 16.)
In the example depicted in Fig. 3, the first programmed row 196 of "Content" table 182 defines a "Group". The "Group" command defines the beginning of a series of commands that are to be grouped together. The "End" command defines the end of the grouped commands. The "Group" defined in the Fig. 3 example is the "Welcome" group as designated by the "name" cell 198. The second programmed row 200 of table 182 is a "text" command row. When this row is executed, the program generates the statement in cell 202, "Welcome $$FirstName$$", where the first name entered by the program user (e.g., John) is output for the variable $$FirstName$$. The third programmed row 204 is also a "text" command row. When this row is executed, the boolean expression in cell 206 (Age<21) is evaluated. If the "Age" data input by the program user is less than 21, then the boolean expression is true and the program generates the statement in cell 208, "You are under 21." The fourth programmed row 210 is a "text" command row with a boolean expression as well. When this line is executed, the boolean expression in cell 212 (Age>==21) is evaluated. If the "Age" data input by the program user is greater than or equal to 21, then the boolean expression is true and the program returns the statement in cell 214, "You are 21 or older." The fifth programmed row 216 is an "End" command row which ends the "Group" designated in the "name" cell 218. In this example, the "End" command designates the end of the "Welcome" group.
Once the content expert 20 has completed the master tailoring document 28, the content expert 20 saves the master tailoring document 28. The master tailoring document 28 may be saved in a variety of formats including HTML or XML. Saving the master tailoring document 28 in either HTML or XML format facilitates further processing of the master tailoring document 28. Referring to Figs. 1 and 4, once saved, the master tailoring document 28 is input into the code generator 30. A document structure generator 250 resident in the code generator 30 operates on the input master tailoring document 28. The document structure generator 250 parses the infonnation contained in the master tailoring document 28 and builds a tree structure representing the master tailoring document structure in memory 252. The document structure generator 250 creates the tree structure based on the commands in the input master tailoring document 28. When a "Document" command is encountered, the document structure generator 250 sets the beginning or "root" of a document tree. As depicted in Fig. 4, for the master tailoring document 28 from the Fig. 3 example, the "Document/Simple Test" node object 254 is generated from the master tailoring document "Document" command 152. The node 254 sets the root for the SimpleTest document tree stracture. For each master tailoring document command encountered by the document stracture generator 250 subsequent to the "Document" command, the document structure generator 250 generates branches and sub-branches from the "Document" node 254 until the end of the master tailoring document 28 is reached. As the document stracture generator 250 operates on the master tailoring document
28 of Fig. 3, it builds nodes for each "response" and "group" command encountered. Certain commands, such as "response", "variable" and "parameter", generate independent nodes off of the "document" node. Other commands, such as "group" and "level", generate root nodes for a sub-branch from the "document" node, and other commands, such as "text", "graphic" and "table", generate object nodes which have the characteristics specified in the master tailoring document 28. In the example depicted in Fig. 4, the "document" node "SimpleTest" 254 has three "response" nodes 256-260 and one "group" node 262 extending from it. The "response" nodes 256-260 have the characteristics specified in the master tailoring document 28. The "group" node 262 sets the node for the "Welcome" group of commands. Extending from the Welcome "group" node 262 are three "text" nodes 264-268 and one group "end" node 270. The "text" nodes 264-268 have the characteristics specified by the master tailoring document 28 depicted in Fig. 3.
Once the tree stracture is developed in memory 252, the code generator 30 generates the source code 26. The code generator 30 generates the source code 26 by invoking a code writer program 272. A sample code writer program 272 is attached as Appendix B. The code writer program 272 generates source code 26 by selectively combining the objects of the generated master tailoring document tree structure with pre- defined, standardized source code snippets from a template 274 to generate a customized program.
Referring to Figs. 4-6, the process by which the code writer 272 generates source code 26 is illustrated. The code writer 272 first generates a common preamble 300 in the generated source code 26 of Fig. 6 A. The common preamble 300 is generated by selecting a series of preamble snippets 302 from the code template 274 of Fig. 5 A. In the preferred embodiment, the code template snippets are formatted in XML. XML is preferable since the XML format is a pure data format that is more amenable to manipulation than languages that combine data with representation characteristics such as HTML. The code writer 272 operates on the pre-defined preamble snippets 302 to insert the proper objects from the master tailoring document tree structure at the appropriate points. For instance, referring to Figs. 5 A and 6A, the code writer 272 inserts the name of the "document" node 254 ("SimpleTest") into the variable "{0}" 304 in the code snippet 302 to create a Java class named "SimpleTest" 306. After creating the preamble, the code writer 272 next writes any Java language that was included directly in the master tailoring document 28, by way of the "Include" command, into the source code. The code writer 272 uses the "include" code snippets 304 (Fig. 5B) from the code template 274 to create this source code, as block 308 indicates (Fig. 6A). The "Include" command was not used in the example depicted in Figs. 3-6, but is explained in the master tailoring document guidelines attached as Appendix A. After inserting any "included" Java language into the generated source code 26, the code writer 272 writes any global Java language that was included directly in the master tailoring document 28, by way of the "Java" or "Function" commands, into the source code. The code writer 272 uses the "Java" or "function" code snippets 306 (Fig. 5B) from the code template 274 to create this source code, as block 310 indicates (Fig. 6A). Neither the "Java" nor the "Function" commands were used in the example depicted in Figs. 3-6, but these commands are explained in the master tailoring document guidelines attached as Appendix A.
After the code writer 272 writes any "Java" or "Function" language that was written in the master tailoring document 28, the code writer 272 writes a series of Java methods using the document tree structure and the code template snippets. As block 312 (Fig. 5C) of the code snippet template 274 and block 314 (Fig. 6 A-B) of the generated source code 26 indicate, the first method written is named "getResponseNames" and it sets the names of the "response" variables in the generated code by retrieving the "response" variable names from the document tree structure and inserting them into the code template snippet 312 at variable "{1}" designated as 316. As illustrated in Fig. 6B, the "response" variables in the Java code of this example are "FirstName" 318, "LastName" 320 and "Age" 322 which come from the three "response" nodes 256-260 of the document tree structure depicted in Fig. 4.
As block 324 of the code snippet template 274 (Fig. 5D) and block 326 of the generated source code 26 (Fig. 6B) indicate, the next method written is named "getlnstrumentNames" and it sets the names of the "instrument" type variables in the generated code by retrieving any "response", "label" or "endlabel" variable names from the document tree structure and inserting them into the code template snippet 324 at variable "{1}" designated as 328 in the code snippet 324. As illustrated in Fig. 6B, the "instrument" variables in the Java code of this example are "FirstName" 330, "LastName" 332 and "Age" 334 which come from the three "response" nodes 256-260 of the document tree structure depicted in Fig. 4. There are no "label" or "endlabel" variables used in the example depicted herein.
As block 336 of the code snippet template 274 (Fig. 5D-E) and block 338 of the generated source code 26 (Fig. 6B) indicate, the next method written is named "validateResponseValue" and it validates that the variable "name" equals the name of the retrieved "response" variables. This code is generated by retrieving the "response" variable names from the document tree stracture and inserting them into the code template snippet 336 at variable "{0}" as indicated at 340. Again, the "response" variables in the Java code of this example are "FirstName" 342, "LastName" 344 and "Age" 346.
As block 348 of the code snippet template 274 (Fig. 5E) and block 350 of the generated source code 26 (Fig. 6B-C) indicate, the next method written is named "getOption". This method retrieves and sets any "option" preferences that were designated for a specified "response" variable in the master tailoring document 28 in cell 162 (e.g., if the content expert 20 in the master tailoring document 28 designated that a "response" variable required an input from the system user, this would be retrieved by the "getOption" method at this point.) This code is generated by retrieving the "response" variable names from the document tree stracture and inserting them into the code template snippet 348 at variable "{0}", indicated at 351. The code writer 272 also retrieves the "option" characteristics for each "response" variable node in the document tree stracture and inserts these "option" characteristics into the code template snippet 348 at variable "{1}", indicated at 352. As illustrated in Fig. 6C, the "response" variables of the example explained herein do not have "option" characteristics so no "options" are set for the "response" variables "FirstName", "LastName" and "Age" as indicated by designators 354-358.
As block 360 of the code snippet template 274 (Fig. 5G) and block 362 of the generated source code 26 (Fig. 6C) indicate, the next method written is named "checkRequired" and it checks, based on the "option" information retrieved above, whether a designated "response" variable requires a response. This code is generated by retrieving the "response" variable names from the document tree stracture and inserting them into the code snippet template 360 at variable "{0}" as indicated at 364. The code writer 272 also sets the boolean expressions, for this example, to false at variable "{1}" as designated by 366 as indicated at 368-372 of the Java source code (Fig. 6C) because an input was not required by the content expert 20 for each of the "response" variables.
As block 374 of the code snippet template 274 (Fig. 5G-H) and block 376 of the generated source code 26 (Fig. 6C) indicate, the next method written is named "getVariableNames". The "getVariableNames" method sets the names of the "variables" designated by the content expert 20 in the generated code by retrieving the "variable" names from the document tree structure and inserting them into the code template snippet 374 at variable "{1}" at 378. The example explained herein does not have any "variables" designated by the content expert 20 so there are no "variables" incorporated into the Java source code as the blank space at 380 indicates.
As block 382 of the code snippet template 274 (Fig. 5H) and block 384 of the generated source code 26 (Fig. 6C) indicate, the next method written is named "getParameterNames". The "getParameterNames" method is very similar to the "getVariableNames" method. The "getParameterNames" method sets the names of the "parameters" designated by the content expert 20 in the generated code by retrieving the "parameter" names from the document tree stracture and inserting them into the code template snippet 382 at variable "{1}" at 386. The example explained herein does not have any "parameters" designated by the content expert 20 so there are no "parameters" incorporated into the Java source code as the blank space at 388 indicates. As block 390 of the code snippet template 274 (Fig. 5H) and block 392 of the generated source code 26 (Fig. 6C-D) indicate, the next method written is named "computeVariable". The "computeVariable" method calculates the value of any "variables" or "parameters" defined in the master tailoring document 28 by the expert 20. The code for this method is generated by retrieving the "variable" names from the document tree structure and inserting them into the code template snippet 390 at variable "{0}" indicated by 394 (Fig. 51). Any "variable" computational characteristics are retrieved from the associated "variable" nodes in the document tree stracture a d inserted into the code template snippet 390 at variable "{1}" indicated by 396. Since the example explained herein does not have any "variables" or "parameters" designated by the content expert 20, there are no "variables" or "parameters" to compute as the blank space in the Java source code at 398 indicates (Fig. 6D).
As block 400 of the code snippet template 274 (Fig. 51) and block 402 of the generated source code 26 (Fig. 6D) indicate, the next method written is named "setVariableValue". The "setVariableValue" method sets the value of a given variable based on a user input. The code for this method is generated by retrieving the "response" variable names from the document tree stracture and inserting them into the code template snippet 400 at variable "{0}" indicated by 404. The result in the source code is that the "response" variables are set to equal the user's inputs for each "response" variable. For instance, the "FirstName" variable 406 equals the "value" 408 input by the user for the First Name; the "LastName" variable 410 equals the "value" 412 input by the user for the Last Name; and the "Age" variable 414 equals the "value" 416 input by the user for his or her age.
The next series of code snippet templates 418-426 and the related generated source code 428-436 define "get" methods that are generated in the same manner. The code writer 272 generates five "get" methods: 1) "getVariableValue", 2) "getVariableType", 3) "getCommand", 4) "getLabel" and 5) "getObject". The "get" methods are generated by retrieving the "variable" names from the document tree stracture and inserting them into the code template snippets 418-426 (5J-K, 5E-G) at variable "{0}" and then defining what the program is to provide in the "return" line at variable " { 1 } ".
The output from the program is generated by a "write" method. As block 438 of the code snippet template 274 (Fig. 5K) and block 440 of the generated source code 26 (Fig. 6F) indicate, the "write" method is named "writeDocument" and.it calls on lower level methods (e.g., "writeSimpleTest" 442) to produce the program output. The "writeDocument" method is generated by retrieving the "document" name from the document tree structure and inserting it into the code template snippet 438 at variable "{0}" indicated by 444. The lower level methods are generated by retrieving "group" objects branching from the "document" node and inserting them in the proper type of code snippet in the code template. Snippet 438a formats a text node. Snippet 438b formats a graphics node. Snippet 438c formats a group node. Snippet 438d formats a content node. Snippet 438e formats a table node. Snippet 438f formats a chart node. Snippet 438g depicts a series of formats for selection nodes. Snippet 438h depicts a group method format snippet.
In the example program, the code writer 272 develops a group method named "SimpleTestWelcome". The first step in generating group method "SimpleTestWelcome" is accomplished by retrieving the name of the "group" being operated on from the document tree stracture (Fig. 4) and inserting the "group" name into the variable "{0}" as indicated at 446 (Fig. 5L), 448 (Fig. 6F). The code writer 272 then finds the next node of the group "Welcome" that needs to be inserted into the group method. In this example, it is the text node 264 ("Welcome $$FirstName$$). The code writer 272 then inserts the text from the text node into the text node formatting snippet 438a (Fig. 5K) to generate a text output line of code as indicated at 450 (Fig. 6F). The code writer 272 then operates on the next node of the group, node 266, a conditional text node ("If Age<21, return: "You are under 21."). The code writer 272 inserts this conditional statement into the appropriate selection node formatting snippet 438g (Fig. 5L) to generate the conditional code found at 452. The code writer 272 then operates on the next node of the group, node 268, another conditional text node ("If Age>=21, return: "You are 21 or older.") The code writer 272 inserts this conditional statement into the appropriate selection node formatting snippet 438g (Fig. 5L) to generate the conditional code found at 454. The code writer 272 then encounters the group "end" node 270 for the "welcome" group which triggers the code writer 272 to finish processing and preparing the SimpleTestWelcome group code. The code writer 272 continues on to write a few more administrative methods that are generated in a manner similar to the ones described above. At this point the code writer 272 has generated a complete Java source code document. Referring again to Fig. 1, the code development computing system 24 then compiles the generated source code 26 in the code compiler 32. The code compiler 32 converts the generated source code 26 into executable code 34. The executable code 34 is moved to memory 36 where the compiled executable code 34 can be tested by the content expert 20. The content expert 20 may test the generated program by requesting the code development program computing system 24 to invoke the compiled executable code 34. The activated executable code 34 develops the dynamic user interface 500 as depicted in Fig. 7. The dynamic user interface 500 is generated by the code development computing system 24 by calling the "get" methods of the generated source code 26 (the "getVariableValue" method 428, the "getVariableType" method 430, the "getCommand" method 432, the "getLabel" method 434, the "getObject" method 436). The dynamic user interface 500 appears on the content expert's workstation 22 and identifies field information for the content expert 20 to fill in. In the source code generated in this example, the dynamic user interface 500 requests the content expert 20 to input a first name in field 502, a last name in field 504 and an age in field 506. In this example, the content expert 20 inputs a first name of "John", a last name of "Doe" and an age of "22". Alternatively, this input data may be called from a stored data file and input into the generated program. The input data is sent from the content expert's workstation 22 to the program executable code 34 for processing. The first thing the program does is validate that the proper type of data was entered for each data field (e.g., only numbers, not characters, were entered for an integer "int" type field). If the input data is not valid, the code development computing system 24 sends an eπor message back to the content expert 20. The content expert 20 then corrects the input data and re-submits it. Once all of the data submitted is valid, the executable code 34 of the generated program passes all of the input data into its respective Java variables (e.g., the first name information (John) is stored in the "FirstName" variable). Once all of the inputs are loaded, the generated program calls the "writeDocument" method which processes the input data and prepares an output content document 44. In the preferred embodiment, the output content document 44 is an XML document which facilitates further processing. The "writeDocument" method first calls the "writeDocumentHeader" method 460 which writes a document header 462 for the output content document 44 depicted in Fig. 8. The "writeDocument" method next calls the "writeSimpleTestWelcome" method at designation 442. The "writeSimpleTestWelcome" method 456 first calls method "writeGroupHeader" 448 which writes the group header 464 to the output content document 44. The "writeSimpleTestWelcome" method 456 then calls the "writeText" method 450 which retrieves the input for the "FirstName" variable, which in this case is "John" and writes the formatted text section 466 of the output content document 44 which contains the statement "Welcome John". The "writeSimpleTestWelcome" method 456 next calls the selection method 452 which retrieves the input for the "Age" variable, which in this case is "22", and determines whether the input age is less than 21. In this case, it is not, so the "writeSimpleTestWelcome" method 456 skips to the next selection method 454 which determines if the input for the "Age" variable is greater than or equal to 21. In this case the "Age" variable is greater than 21, so the selection method 454 writes the formatted text section 468 of the output content document 44 which contains the statement "You are 21 or older." The "writeGroupTrailer" method 470 then writes the trailer 472 for the "group" element in the output content document 44. Finally, the "write Variable Values" method 474 writes and formats all of the variable information to the output content document 44.
The output content document 44, since it is saved in a pure data format such as XML, may be formatted into any presentation fonnat that the system operator wants to put the output information into. Referring again to Fig. 1, the manner in which the output infoπnation in this example may be formatted is depicted. The output information may be saved as a HTML file 50 by conversion through the HTML publisher 46. The HTML file 50 is then sent to content expert's workstation 22 where the workstation's browser opens the HTML file 50 and displays it for the content expert 20 to review. Fig. 9 illustrates what the content expert 20 sees in the example described herein. In a similar manner, the output content document 44 may be sent through the text publisher 70 to generate a text file 72 for the content expert 20 to review or tlirough the print publisher to generate a print file 68 for the content expert 20 to review.
While the invention has been discussed in terms of preferred and specific embodiments, it should be appreciated by those of skill in the art that the invention is not so limited. The embodiments are explained herein by way of example, and there are numerous modifications, variations and other embodiments that may be employed that would still be within the scope of the present invention.
Appendix A
Master Tailoring Document Format
10/28/99
51999 HealthMedia, Inc. Table of Contents
Introduction 3
MTD Format 3
MTD Files 3
Command Cell .'. 3
Name Cells .'. 4
Options Cells 4
Java Type Cells 4
Java Code Cells 5
Condition Cells 5
Text Cells 5
Label Cells 6
Feature Descriptions 6
Java Substitution 6
Math Support 6
Date Variables 7
TList Variables 7
Embedded Styles 8
Miα'Max Options 9
Tables and Charts 9
Bulleted Lists 9
Command Definitions. 9
DOCUMENT Command 9
RESPONSE Command 10
PARAMETER Command 10
VARIABLE Command 11
GROUP Command 11
END Command 11
LEVEL Command 12
TEXT Command 13
GRAPHIC Command 13
CONTENT Command 13
SECTION Command 14
TOPIC Command 14
TABLE Command 14
CHART Command 15
SENTENCE Command 16
FUNCTION Command 17
JAVA Command 17
INCLUDE Command 17
SCHEDULE Command : 18
COMMENT Command 18
COMMAND and VERSION Commands 18
LABEL Command 18
Built-in Functions 20
Special Characters 24
Prototype MTD File 27
Document & Version 27
Java 27
Responses 27
Variables and Parameters 28
Introduction Section 28 Introduction
This document describes the format of a "Master Tailoring Document" or "MTD". The MTD format supports the new Tailored Java (TJ) approach to tailored messaging. An MTD file consolidates many tailoring-related items into a single file, thus eliminating many potential areas of confusion and miscommunication.
MTD files are processed by the new "TJBuilder" application. In fact, TJBuilder is incorporated into the Grinder tool so that content developers may never actually need to run it directly.
MTD Format
MTD Files
MTD files are created using Microsoft Word. Within the MTD file, "tables" are used to contain tailoring information. TJBuilder ignores anything outside of a table. It is a good practice to place commentary text in the MTD file but outside of any table. Any number of tables may be used in the MTD file. There is no significance to ending one table and starting another. The format of the tables is not significant. For example, developers may select any column width that is appropriate.
The MTD files are saved in HTML format for processing in TJBuilder/Grinder. Because MS Word 97 files saved as HTML do not retain all document information, MTDs will be constructed and maintained as ".doc" files and then converted to HTML for processing. Once HMI begins using Word 2000, in which documents saved in HTML format retain all Word information, MTD files will be created and maintained in HTML.
TJBuilder looks for a "command word" in the first cell of each row. This command word determines the format of the rest of the cells in that row.
Command Cell
The first cell on in a row within a table contains the "Command Word." For some commands, additional information may be included after the command word (e.g. "LEVEL 1"). All currently defined commands are further described starting on page 9. Below is a summary:
DOCUMENT specifies the document name and title.
RESPONSE defines a questionnaire response.
PARAMETER defines a characterization variable based on RESPONSE variables and on other PARAMETER variables. PARAMETER variables are loaded from and saved into the database.
VARIABLE defines a variable just like PARAMETER. However, VARIABLE variables are not saved into the database.
GROUP collects the commands that follow it into a group.
END terminates a GROUP.
LEVEL groups a collection of commands together at a specified level.
TEXT specifies content text.
GRAPHIC specifies a graphic.
TABLE creates data to be displayed in tabular format.
CHART creates data to be displayed as a chart.
CONTENT synthesizes either text or graphics using Java code.
SECTION is equivalent to "LEVEL 1".
TOPIC is equivalent to "LEVEL 2".
SENTENCE is equivalent to TEXT.
FUNCTION defines a Java function that may be referenced in subsequent code.
JAVA allows raw Java code to be included. This code might define additional variables or Java functions. This is an advanced feature that will often not be used.
INCLUDE specifies an additional file to include at the current table position.
SCHEDULE allows the use of Java code for determining when a document for a particular enrollee should be tailored.
COMMENT defines a comment that will be ignored.
Page 3 of 30 • COMMAND and VERSION are similar to COMMENT. COMMAND may be used to place headers at the top of a table to label columns for ease of editing. VERSION may be used to record modifications.
• LABEL defines a label used for formatting a user interface (used by Grinder).
Commands may be in any combination of upper and lower case. If a command is not recognized, a warning message is generated.
Any command may be prefixed by "//", e.g. "//INCLUDE". This will not generate an error but will disable that command, essentially treating it like a comment. This is useful for temporarily disabling a command without otherwise disturbing it.
Name Cells
Many commands, such as RESPONSE and TEXT, use the second column to contain a name. For content commands like TEXT, you can leave the name cell blank and TJBuilder will create a name.
The text in the name cell must be a single "word" in that it can have no spaces. It also must not have a paragraph end 01) within the cell. (You can see these by using the Show/Hide ^ command.) The name must also start with a letter. Upper/lower case is significant.
Finally, you cannot reuse the names. The TJBuilder program will detect duplicate names and generate an error message.
Options Cells
Many commands use the third column to contain a list of options. This is generally a list of keywords separated by commas. Some options may also have a value. Example: required, width=10
See the individual commands for more information on options.
Java Type Cells
All the variable definition commands (RESPONSE, PARAMETERNARIABLE) take a Java type in the fourth column. The supported types are:
Figure imgf000029_0001
27 Pase 4 of 30 Java Code Cells
Some cells contain "snippets" of Java code, i.e. conditions, characterization, etc. This Java code will be inserted into the created Java source file and will then be compiled by the Java compiler. As a result, the Java snippets must legal Java code with one exception.
MS Word allows the use of "smart quotes." As the user types a " character, a " or " is inserted instead, depending on the context. This is very useful for writing content text. Often it is also necessary to use a " in Java code but the use of" and " is not legal. In order to allow the content developer to use smart quotes when writing content and in order to avoid turning the smart quote option on and off, it will be allowable to use " and " in Java code. TJBuilder will automatically replace them with ". Many of the examples in this document use " and " in Java code.
Condition Cells
A condition cell contains Java code that controls whether content will be included in the tailored document. If the condition cell is blank, the text will always be included. Otherwise, the condition must be written as a standard Java "expression" that evaluates to a boolean value. For example, a boolean variable by itself is a valid boolean expression. Any comparison (e.g., Age>=21) is also a valid boolean expression.
The following is a brief introduction to the types of boolean expressions possible in conditions. More details on writing Java code are outside the scope of this document.
Figure imgf000030_0001
Text Cells
The TEXT and SENTENCE commands contain a text cell. Text in this cell may be included in the TCD, depending on the expression in the condition cell. Within the text cell, you may use bold, italic and underline. This formatting is carried through to the final output. Other changes in format may be specified using the embedded style feature described below.
Here are the rules for the contents of text cells:
• You mav include paragraph ends (Tl) in the text. These will be carried through to the final output
NOTE: A bug in MS Word causes a H that occurs at the very beginning of a cell to be lost when saving to HTML. Placing a space character in front of the Tl prevents this problem. In other words:
Figure imgf000030_0002
This problem is corrected in Word 2000.
You mav use straight double-quotes (") and single quotes (') anywhere within the text.
MS Word 97 converts directional double-quotes (" and ") into straight double-quotes when saving to HTML. In order to use directional double-quotes, insert ##ldq## and ##rdq™ in the text for left and right double-quotes. Word 2000 does not have this problem.
Double dollar characters (SS) may not be used unless it is for Java substitution as defined in the next Java Substitution section on page 6.
Double pound characters (##) may not bue used unless it is to pass information to the publication engine, e.g. ##lrq## for left quotation or ##style for embedded styles.
Page 5 of 30 • Other special characters (e.g. C) may be used as long as they are in the special characters table on page 24.
• Bulleted lists (see below).
Label Cells
The LABEL and RESPONSE commands allow the placing of a "label" in column 6. This label is used by the Grinder development tool to label the input user interface. When used on a LABEL command, Grinder displays the label text on a line by itself in the user interface. Grinder also provides a popup menu of all LABEL commands to assist in navigating through the user interface.
When use in a RESPONSE, the label text is displayed next to the input field in the Grinder user interface.
Feature Descriptions Java Substitution
Variable text may be substitututed into output by including Java code right in the text by enclosing it in SSjavaSS. The enclosed Java code must evaluate to either a String, boolean or number. For example:
Figure imgf000031_0001
In the first example, the value in Age will be substituted for "SSAgeSS" resulting in something like:
Your age is 39. In the second example, "dateToFullString(BirthDate)" is Java code that converts the Date variable named "BirthDate" to a String. The following might result:
Your birthday is Tuesday, April 12, 1952.
In the third example, the "todayO" function is called and it retums a Date containing the current date. It is converted to a day number by "dateToDayO"- Similarly, the QuitDate variable is converted to a day number and the difference is computed by the subtraction sign "-". The resulting numeric value is automatically converted to a String and inserted into the tailored text. The following might result:
It has been 14 days since you quit smoking. See the section below for more information on Date variables.
Math Support
The CONTENT command can be used to do simple or complex math. Consider the following example:
Figure imgf000031_0002
Page 6 of 30
Figure imgf000032_0001
In the above, the VARIABLE command defines a variable named TotalCalories to contain the number of calories. Any combination of the three groups can be selected, depending on the values of IncludeRecipel, IncludeRecipe2 and IncludeRecipe3. In any case, TotalCalories will end up containing the total number of calories.
Date Variables
In addition to "int", "boolean", etc, the "Date" type can be used to store a date. This date might be imported from a questionnaire or may be computed. Often it is veiy useful to convert a Date to a day number using the "dateToDayO" function. This function retums an "int" value that is the number of days since January 1, 1970. As it may be negative, dates before January 1, 1970 are handled properly. For example, to compute the number of days since a person has quit smoking:
Figure imgf000032_0002
As you might guess, "todayQ" retums a Date with the cuπent date. To compute a date, you can use "dayToDate":
Figure imgf000032_0003
Here QuitDate is converted to a day number, 14 is added to it and then that value is converted back to a Date.
TList Variables
A TList variable contains a list of items, each item described by a text string. The TList variable also contains minimum and maximum limits. While it is possible to place items on the TList outside these limits, the "is Valid" function will return false in this case. Tne min, max and list of item names are defined when the TList variable is created (generally by a RESPONSE, PARAMETER or VARIABLE command). The presence of an item on a TList may vary during execution of the MTD. Functions exist for placing items on the TList and for various tests.
The format for a TList in a Java type cell is:
TList min,max,iteml,item2,item3,...,itemN where: mm is a number indicating the minimum number of items that can be on the list and still have it considered "valid". max is a number indicating the maximum number of items that can be on the list and still have it considered "valid". nameI,...,nameN are names of items that can be placed on the list. Usually these are short names like "Male" or "HBP". (See below for an extension of this.)
Example of TList use:
Figure imgf000032_0004
The TList "GenderList" must have a minimum and maxium of one item, either "Male" or "Female". Note that it is possible that GenderList will have neither Male or Female, or that it will have both. In these cases, "isValid(GenderList)" will return false.
Another example:
Figure imgf000032_0005
DiseaseList can have 0 to 10 items.
There are a number of built-in functions for working with TLists. See the section on page 20. For example, to place HBP on DiseaseList, use: addφiseaseList, "HBP"); Note the quotes. or set(DiseaseList, "HBP", true); To remove an item,
Page 7 of 30 remove(DiseaseList, "HBP"); or setφiseaseList, "HBP", false);
Note that you can pass a "boolean expression" (just like you use in conditions) as the third argument to the setO function. For example: set(DiseaseList, "HBP", DistoIicPressure>140);
Another important function for TLists is "toStringO" hich is used for printing (e.g. in SS substitution). The toString function formats the names on the list using commas and the word "and". The format depends on the number of items on the list:
N value
0 (empty string)
1 a
2 a and b
3 a, b, and c
4 a, b, c, and d etc.
Here are some example using the DiseaseList variable above:
DiseaseList contains toStrinaf DiseaseList returns nothing "" (empty string)
HBP "HBP"
HBP HA "HBP and HA"
HBP HA Stroke "HBP, HA, and Stroke"
HBP HA Stroke TIA "HBP, HA, Stroke, and TIA"
The names on a TList definition can be extended to include a "long name" for each item. Instead of writing "HBP", the item can be written "HBP/High Blood Pressure". The short version before the '"/" is used for normal operations. However, when a TList variable is printed (or the toStringO ftmction is used), the long names will be used. Consider:
Figure imgf000033_0001
In this case:
DiseaseList contains toStrinefPiseaseList') returns nothing "" (empty string)
HBP "high blood pressure"
HBP HA "high blood pressure and heart attack"
HBP HA Stroke "high blood pressure, heart attack, and stroke"
HBP HA Stroke TIA "high blood pressure, heart attack, stroke, and TIA"
Embedded Styles
When a TCD file is "Published", a "layout file" is used to define the format of the published document (in PostScript for printing or HTML for Web). The layout file defines a number of "Styles" which are used throughout the document Generally, these styles are applied to whole sections by the layout file.
As an extension to this, it is possible to specify a layout style in the MTD file text This is very powerful because the style can be specified using a logical name and the actual choice of font size, etc. is specified in the layout file.
To specify that a range of text is to have a particular style, surround it with %%sty!e commands. Start with %%style name%% where name is the style name as defined in the layout file. End with either another style name or %style%% to return to the default style.
This is admittedly clumsy. You may use %%s as an abbreviation for %%style. In addition, it may be possible in the future to support Word styles automatically. (This is not possible using Word 97 as it does not save style information into HTML files.)
Figure imgf000033_0002
Page 8 of 30
Figure imgf000034_0001
Note: The embedded style feature is currently only available for PostScript publishing. Support can be added for HTML in the future if there is a need.
Min/Max Options
It is frequently necessaiy for content developers to estimate length of minimum and maximum versions of a document. The MTD format allows the specification of "min" and/or "max" in the options column for GROUP, LEVEL, TEXT, GRAPHIC, CONTENT, TABLE and CHART. When using Grinder, it will be possible to select "min" or "max" and create a document based solely on these setting, ignoring the condition expressions.
See the TEXT Command section on page 13 for an example of using min and max.
Tables and Charts
New commands allow the creation of tailored tabular data that can then be formatted into tables or charts by the appropriate publisher (PostScript or HTML). Note that these commands merely supply the tailored data to be used and the lavout file defines the format of the table or chart.
See the TABLE and CHART commands for more information.
Bulleted Lists
To create a bulleted list in content text, use the standard MS Word bullet facility. For example:
Figure imgf000034_0002
Text with this format will be published appropriately. In the PostScript case, the bullet character, the bullet indent and the text indent can all be specified in the layout file. In the HTML case, the <UL> and <LI> tags will be used so that the formatting will be done by the browser.
Command Definitions
Each of the commands is more fully explained below.
DOCUMENT Command
There is one DOCUMENT command and it must come before all other commands except INCLUDE, COMMENT and COMMAND.
Figure imgf000034_0003
where:
Name is a simple name describing this project MTD. This must be the same name as is used for the Java output file when running Grinder.
Description is a brief description of the project It can contain spaces. Example:
Figure imgf000034_0004
Page 9 o 30 RESPONSE Command
During the development of a questionnaire, the MTD format is used to define response information. For each discrete response in the questionnaire, a simple variable is defined using the new RESPONSE command.
Figure imgf000035_0001
where:
Name is a simple name describing this response variable. It becomes a Java variable name that can be referenced in subsequent Java code such as characterization or conditions.
Options is a list of keywords that specify optional items. Currently only one is defined for the RESPONSE command: req or required this response is required (may not be left blank)
Type is a Java type. Common examples are: int integer (e.g. 1, 2, 3) float floating-point number (e.g. 3.14159) boolean has two values, true and false
Date contains date/time information
String contains a text string
Initialization Validation code is a Java snippet that does initialization after the data is imported and also checks w'hether the response data is valid.
Label This text is used in the Grinder user interface to prompt the user. If not included, just the response name is used.
Example:
Figure imgf000035_0002
PARAMETER Command
The PARAMETER command defines a variable which may be used by other variables and in conditions. Parameters are read from the database at the beginning of tailoring and are written back to the database at the end.
Figure imgf000035_0003
where:
Name is a simple name describing this characterization variable. It becomes a Java variable name that can be referenced in subsequent Java code such as characterizations or conditions.
Options is a list of keywords that specify optional items. Currently, none are defined for this command.
Type is a Java type. See the RESPONSE command.
Characterization code is a Java snippet that sets the value of the PARAMETER variable. It can reference RESPONSE variables as well as other characterization variables already defined (occurring earlier in the MTD).
Example:
Figure imgf000035_0004
Paεe 10 of 30 KewFeπ≤ieSmkr Ealse;
VARIABLE Command
The new VARIABLE command is essentially the same as the PARAMETER command. The only difference is that VARIABLE variables are not written to the database in production.
Figure imgf000036_0001
where:
(see PARAMETER)
Example:
VARIABLE isFemale 1 1 boolean | isFerr.ale = s rir.gsEq al (Gender, "Fe-ale" )
VARIABLE isMale | | boolean | isMale ■= ϋsFer-iaie;
CROUP Command
This command defines the beginning of a collection of commands that are treated as a group. The condition code applies to all the commands in the group. Groups can contain other groups, either defined using GROUP or LEVEL. The list is terminated by an END command.
Figure imgf000036_0002
where:
Name is a simple name describing this group. Publication layout templates use this name. Options is a list of keywords that specify optional information. min this group is part of the "min" configuration max this group is part of the "max" configuration
Condition is a Java expression defining whether the group members should be selected. Example:
Figure imgf000036_0003
Pase 11 of 30
Figure imgf000037_0001
where:
Name is the name of the GROUP that is ending. If present and it does not match the appropriate group, an error is εenerated.
Options Currently, no options are defined for this command.
Example: See the GROUP command.
LEVEL Command
This command is similar to GROUP in that it defines the beginning of a collection of commands that are treated as a group. However, no END command is required. The group is terminated when another LEVEL at the same level or higher is found. (Here, a higher level means a lower level number, e.g. level 1 is higher than level 2.)
The condition code applies to all the commands in the group. Groups can contain other groups, either defined using GROUP or LEVEL.
Figure imgf000037_0002
where:
Levelnum is a number. Level 1 the top level (beneath the DOCUMENT "level").
Name ϊs a simple name describing this group. Publication layout templates use this name.
Options is a list of keywords that specify optional information. min this group is part of the "min" configuration max this group is part of the "max" configuration
Condition is a Java expression defining whether the group members should be selected. Example:
Figure imgf000037_0003
A Note about GROUP and LEVEL
The content developer may use either GROUP or LEVEL. Each has advantages. The GROUP command allows groups of commands to be moved up or down in the hierarchy without editing level numbers. The LEVEL command is more explicit and does not require the END command. Further, SECTION and TOPIC may be used as synonyms for LEVEL 1 and LEVEL 2.
Pase 12 of 30 TEXT Command
The TEXT command is the primary mechanism for specifying text that may be included in the tailored output. The primary version of the text is placed in the fifth column. Alternative versions (e.g. Spanish or numeric data) may be added in column six and beyond. An external mechanism selects which text column to use.
Figure imgf000038_0001
where:
Name is a simple name describing this block of text. Options is a list of keywords that specify optional information. min this text is part of the "min" configuration max this text is part of the "max" configuration
Condition is a Java expression defining whether this text should be selected, Text is formatted text as described in the "Text Cells" section on page 5. Example:
Figure imgf000038_0002
GRAPHIC Command
The GRAPHIC command allows the specification of conditional graphics to be included in the tailored content. The GRAPHIC command conditionally defines the name of a graphic element. The layout document specifies which graphics file is to be used for this name.
Figure imgf000038_0003
where: Name is a simple name describing this graphic. Used by the layout file to specify an actual graphics file. Options are a list of keywords that specify optional information. ' min this text is part of the "min" configuration max this text is part of the "max" configuration
Condition is a Java expression defining whether this graphic should be selected. Example:
Figure imgf000038_0004
CONTENT Command
CONTENT allows a more general type of content. Like TEXT and GRAPHIC, it has a condition column and is often part of a GROUP. In addition, it has arbitrary Java code which can dynamically generate content.
Command Second column Third Forth column Fifth column Remaining Columns column
CONTENT Name Options Condition Java code Comments where:
P aεe 13 of 30 Name is a simple name describing this content. Options are a list of keywords that specify optional information. min this text is part of the "min" configuration max this text is part of the "max" configuration
Condition is a Java expression defining whether this content should be selected. Java code is arbitrary Java code. Generally it will contain calls to "vvriteText'' and "writeGraphic'" resulting in text and graphic content being selected. It might also contain code to math or database access.
Example:
Figure imgf000039_0001
In the above example, if RecipeNum is not -1, a database function is called to get a recipe in the form of a String. This String is output using the "writeText" function. Similarly, a calorie value is fetched and text is dynamically generated to displavthis value. Finally, the total calories is updated.
Note: The "getDBString" and "getDBInt" functions are used as an example and may not be implemented exactly as shown.
SECTION Command
The SECTION command is completely equivalent to "LEVEL 1"
Figure imgf000039_0002
TABLE Command
The TABLE command allows the creation of tailored tabular data that can then be formatted into table form by the appropriate publisher (PostScript or HTML). Note that this command merely supplies the tailored data to be used and the lavout file defines the format of the table.
Figure imgf000039_0003
where:
Name is a simple name describing this table. The publisher will use this name to format and position the table.
Options is a list of keywords that specify optional information. min this table is part of the "min" configuration max this table is part of the "max" configuration
Condition is a Java expression defining whether this table should be selected.
Table data is a list of data items, separated by commas and semicolons. Commas separate table cells within a row; semicolons separate rows. The data items must be strings without commas or delimeters. Use SS-SS for
Page 14 of 30 Java expression substitution is allowed. Spaces and paragraph breaks are ignored and may be used to make the rows more readable.
Example:
Figure imgf000040_0001
Possible sample output for SingleRowl and SingleRowl (remember, the formaπing is controlled by the layout file):
Figure imgf000040_0002
Possible sample output for ThreeRow:
Figure imgf000040_0003
Possible sample output fot ThreeRowHdr
Figure imgf000040_0004
CHART Command
The CHART command allows the creation of tailored tabular data which can then be displayed in chart form by the appropriate publisher (PostScript or HTML). Note that this command merely supplies the data to be used and the lavout file defines the format of the char
The CHART command is essentially identical to the TABLE command and results in the same type of data being passed to the publisher.
Figure imgf000040_0005
where:
Name is a simple name describing this chart. The publisher will use this name to format and place the chart. Options is a list of keywords that specify optional information. min this chart is part of the "min" configuration max this chart is part of the "max" configuration
Condition is a Java expression defining whether this chart should be selected.
Paze 15 of 30 Table data is a list of data items, separated by commas and semicolons. Commas separate table cells within a row; semicolons separate rows. The data items must be strings without commas or delimeters. Use SS-SS for Java expression substitution is allowed. Spaces and paragraph breaks are ignored and may be used to make the rows more readable.
General strings can be passed as labels in the first item of each row. The rest of the data values must evaluate to a numeric value.
Example:
Figure imgf000041_0003
Possible sample ouφut for SingleSetl and SingleSetl (remember, the formatting is controlled by the layout file):
Figure imgf000041_0001
0 700 800 900
Possible sample output for ThreeRowLabel:
Figure imgf000041_0002
SENTENCE Command
The SENTENCE is completely equivalent to "TEXT".
Paεe 16 of 30
Figure imgf000042_0001
FUNCTION Command
The new FUNCTION command allows the definition of a Java function that may be used in subsequent expressions including conditions.
Figure imgf000042_0002
where:
Name is a simple name for the function. Options is a list of keywords that specify optional information. Currently, none are defined for this command. Type is a Java type. See the RESPONSE command. Java code is Java code thai defines the function.
Example:
Figure imgf000042_0003
In the above example, a Java function is defined which returns a boolean value.
JAVA Command
The JAVA command allows the inclusion of raw Java code. This is an advanced feature and will often not be used.
Figure imgf000042_0004
where:
Options are a list of keywords that specify optional information. Currently, none are defined for this command. Java code is Java code that will be included in the aenerated source file. Example:
Figure imgf000042_0005
The Java code above creates a global variable named "cal" which contains a Calendar object. The function "isTuesday" is also defined and it can be called from any Java code.
INCLUDE Command
This command allows a MTD to be broken up into smaller files. Typically, a primary MTD file will include subfiles, each of which may be developed separately, perhaps by a different content developer.
Figure imgf000042_0006
Page 17 of 30 where:
FilePathName is the pathname of another MTD file in HTML format. The path can be either relative (in the same folder or lower) or absolute (a full pathname).
Options Currently, no options are defined for this command. Example:
Figure imgf000043_0001
SCHEDULE Command
The SCHEDULE command is used to determine when a document is to be executed. The Java code is executed everyday by the production system until it indicates that the document is ready to be run. Once run, the production system will subsequently not call the Java code.
Figure imgf000043_0002
where:
Options Currently, no options are defined for this command.
Condition Java Code Java code that evaluates to a boolean value. Example:
Figure imgf000043_0003
This Java code will evaluate to "true" when the "todayO" function returns a date which is greater than 14 days after QuitDate.
COMMENT Command
Lines beginning with COMMENT are completely ignored.
Figure imgf000043_0004
COMMAND and VERSION Commands
Lines beginning with COMMAND or VERSION are completely ignored. The COMMAND command may be used to label columns. VERSION may be useful for recording modifications to the MTD file.
Figure imgf000043_0005
LABEL Command
A LABEL command provides a string of text used in a user interface. In particular, the Grinder application displays the label when it builds its user interface for inputing responses.
Figure imgf000043_0006
Page 18 of 30 LABEL Ignored Ignored Ignored Ignored Label
Example:
LABEL 1 1 I Personal Information
RESPONSE FirstName 1 String 1 1 Please enter your first name
In this example, Grinder will display "Personal Information" on the line before it prompts for FirstName.
Paae 19 of 30 Built-in Functions
The following is a list of functions available from any Java code. Many more functions will be added.
Some examples marked * because their use is limited and a good example requires more space than provided here.
There are three kinds of examples shown below:
• Content text with SS-SS substitution where a function is used to insert information into the text. E.g.:
Your birthdate is SStoString(BirthDate, DateFormat.LONG)SS.
• Examples with semicolons indicating complete Java statements that could be used to define a VARIABLE. E.g.:
IsSimoker = toBoolean(SmokerStr);
• Examples without semicolons are Java boolean expressions that could be used in a tailoring condition. E.g.: equal(FirstName, "Neil") Preferred String Functions
Figure imgf000045_0001
Preferred Date and and Dav Functions
Figure imgf000045_0002
Page 20 of 30
Figure imgf000046_0001
TList Functions:
Figure imgf000046_0002
Page 21 of 30
Figure imgf000047_0001
In each of the following, "names" contains a comma-separated list of names (e.g. "a,b,d").
Figure imgf000047_0002
Misc Functions
Figure imgf000047_0003
Older Functions:
Figure imgf000047_0004
Page 22 of 30
Figure imgf000048_0001
Page 23 of 30 Special Characters
AH of the characters listed below may be used. The shaded areas indicate characters which require special handling. Standard ASCII Special Characters
Figure imgf000049_0001
Page 24 of 30
Figure imgf000050_0002
Figure imgf000050_0001
Page 25 of 30
Figure imgf000051_0002
Figure imgf000051_0001
Symbol Font Characters Note
Any character in the standard "Symbol" font may be used. However, it does not work to simply include the character using the Symbol font in Word. Instead, use "n-s-S YMs#" to switch to the symbol font Then use the corresponding normal character then "??i?STD#&" to switch back to the standard font. For example:
#?SYM#sD#=STD=#
Here the "D" character selects the "Δ" from the Symbol font.
You can see all the Symbol characters in the standard Windows "Character Map" program "Start/Programs/Accessories/Character Map". Switch back and forth between the Courier and Symbol fonts.
Page 26 of 30 Prototype MTD File
The following is loosely based on part of the OMRON-US ΛMCD document.
Note thai this file uses the MS Word Outline feature. When you view it in "Outline View", you can collapse and expand scgmciils.
Document & Version
Figure imgf000052_0001
Responses
Figure imgf000052_0002
Page 27 of 30
Figure imgf000053_0001
Figure imgf000053_0002
Introduction Section
Figure imgf000053_0003
Pagc28of30
Figure imgf000054_0001
Page 29 of30
Figure imgf000055_0001
<_Λ
Page 30 of30
Appendix B
r
* Copyright 1999 by HealthMedia, Inc.
*
* This software is the confidential and proprietary information of HealthMedia, Inc.
*
*/
TJWriteJavaJob
*
Version 1.0
*
* Created 8/6/99
*
package TJBuilder; import java.io.*; import java.util.*; import HealthMedia.HMICore2.Utils.XMLUtils.*; import java.text.MessageFormat; import org.w3c.dom.*; import com.ibm.xml.parsers.DOMParser; import org.xml.sax.*;
* TJWriteJavaJob is a job class that writes tailored Java.
*
* ©author John Van Roekel *l public class TJWriteJavaJob extends TJJob { protected static String lineSeparator = System.getProperty("line.separator"); protected final int mOptionColumnNum = 2; // Number of column containing options protected int mTextColumnNum = 4; // Number of column containing tailoring text protected static final String fJavaSourceXMLFile = 'TJEngineJava.xml"; // File containing Java source "' protected TJNode mDocNode = null; // Top document node protected Node mJavaTextTopNode = null; // Top XML node from Java source file protected int mNumResp = 0; // Number of RESPONSE variables protected int mNumVars = 0; tt Number of VARIABLE variables protected int mNumParams = 0; // Number of PARAMETER variables protected PrintWriter Writer = null; // Writer to output Java source to protected int mWriterLineNum = 0; // Current line number in mWriter protected LinkedList mContentNames = new LinkedList(); // List of content names protected static final String subPrefϊx = "$$"; // Used to prefix Java substitutions protected static final String subSuffix = "$$"; // Used to suffix Java substitutions r
* Sets the text column to use. */ public void setTextColumn (int col) { mTextColumnNum = col; }
* Write Java source based on HTML tree.
*
* Sets result string and error flag.
*
* @param docNode TJ ode containing the tree's document node
* @param writer PrintWriter for the Java source output 7 public void writeJava(TJNode docNode, PrintWriter writer) { if (docNode==null) throw new HlegalArgumentExceptionfdocNode is null"); if (writer==null) throw new HlegalArgumentException("writer is null");
try { mDocNode = docNode; mWriter = writer; mWriterLineNum = 1;
// Read XML document containing Java source & keep top node.
Document javaXMLDoc = HealthMedia.HMlCore2.Utils.XMLUtils.parseXML (new BufferedReader(new FileReader(fJavaSourceXMLFile))); mJavaTextTopNode = javaXMLDoc.getFirstChild();
// Output the common preamble, including constant definitions and variables.
String docName = mDocNode.getName(); outputFormattedJavaText("Preamble1", new Object[]{docName}, mDocNode); writeConstantsO; outputFormattedJavaText("Preamble2", new Object[]{docName}, mDocNode); writeVariablesO; -' outputFormattedJavaText("Preamble3", new Object[]{docName}, mDocNode);
// Output any included Java (pure pass-through from a Java file). writeIncludedJava();
// Output any user Java (JAVA and FUNCTION commands). writeGlobalUserJava(); writeUserFunctions();
// Output all the required methods. writeGetResponseNames(); writeGetlnstrumentNamesO; writeValidateResponseValueQ; writeGetOptionO; writeCheckRequiredO; writeGetVariableNamesO; writeGetParameterNamesO; writeComputeVariable(); writeSetVariableValueO; writeGetVariableValue(); writeGetVariableTypeO; writeGetCommandO; writeGetLabelO; writeGetObjectQ;
// Output the "writeDocument" method. writeWriteDocumentO; // Now that we have filled the content name list, write the "getContentNames" method. writeGetContentNamesQ;
// Output the "writeVariableValues" method. Useful for debugging. writeWriteVariableValues();
It Finally, output the final common Java code. outputFormattedJavaText("Postamble", null, mDocNode);
} catch (Exception e) { handleException(e); }
} r
* Write the constants.
7 public void writeCoπstantsQ throws Exception {
., for (Enumeration enum = mDocNode.getChildren(); enum.hasMoreElements(); ) { TJNode node = (TJNode)enum.nextElement(); if (node.getType().equals("Response")) mNumResp++; if (node.getType().equals("Variable")) mNumVars++; if (node.getType().equals("Parameter")) mNumParams++;
} outputFormattedJavaTextfConstantString", new
Object[]{"fDocName",mDocNode.getName()}, null); outputFormattedJavaText("Constant", new Object[]{"fNumResp",String.valueOf(mNumResp)}, null); outputFormattedJavaText("Constant", new Objectrj{"fNumVars",String.valueOf(mNumVars)}, null); outputFormattedJavaText("Constant", new Objectfl{"fNumParams",String.valueOf(mNumParams)}, null); } r
* Write the variables. 7 public void writeVariables() throws Exception { for (Enumeration enum = mDocNode.getChildren(); enum.hasMoreElements(); ) { TJNode node = (TJNode)enum.nextElement(); if (node.isVariableO) {
String name = node.getName(); String type = getJavaType(node, 3); int index = type.indexOff "); if (index==-1) {
String value = getDeføultValue(type); outρutFormattedJavaText("Variable1", new Object[]{type,name,value}, node);
} else {
String base = type.substring(0, index); String params = name + ", " + type.substring(index+1); outputFormattedJavaText("Variable2", new Object[]{base, name, params}, node);
} } } }
/**
* Write user Java code - global. 7 public void writeGIobalUserJava() throws Exception {
QUtputFormattedJavaText("UserJava1", null, null); for (Enumeration enum = mDocNode.getChildren(); enum.hasMoreElements(); ) { TJNode node = (TJNode)enum.nextElement(); if (node.getType().equals("Java") && node.checkOption(mOptionColumnNum,"global")) {
String code = getJavaCode(node, 4); outputFormattedJavaText("UserJava2", new Object[]{code}, node); } } } r
* Write user Function code. 7 public void writeUserFunctionsQ throws Exception { for (Enumeration enum = mDocNode.getChildren(); enum.hasMoreElements(); ) { TJNode node = (TJNode)enum.nextElemeπt(); if (node.getType().equals("Function")) {
String name = node.getTrimmedString(l); String type = getJavaType(node, 3); String code = getJavaCode(node, 4); outputFormattedJavaTextfUserFunction", new Object[]{name, type, ' code}, node);
' Write included user Java code. public void writetncludedJavaO throws Exception { outputFormattedJavaText("lncludedJava1", null, null); for (Enumeration enum = mDocNode.getChildren(); enum.hasMoreElements(); ) { TJNode node = (TJNode)enum.nextElement(); if (node.getType().equals("lncludeJava")) {
// retrieve the pathname of the file to include String filePath = TJReadHTMLJob.getTrimmed(node.getRowText(), TJReadHTMLJob.fNameColumnNum);
File javaFile = new File(filePath); // verify that it exists and is readable if (javaFile.canReadQ) {
LineNumberReader reader = new LineNumberReader(new
FileReader(javaFile));
// read each line, writing it to our output file String code = reader.readϋne(); while (code != null) { outputFormattedJavaText("lncludedJava2", new
Object[]{code}, node); code = reader.readϋneO;
}
// cleanup reader.closeO; else throw new lOExceptionfCannot find included Java file: filePath);
* Write writeGetResponseNames method.
7 public void writeGetResponseNames() throws Exception { outputFormattedJavaText("GetResponseNames1", null, null); int i = 0; for (Enumeration enum = mDocNode.getChildren(); enum.hasMoreElements(); ) { TJNode node = (TJNode)enum.nextElement(); if (node.getType().equals("Response")) { String name = node.getName(); outputFormattedJavaText("GetResponseNames2", new Object[]{String.valueOf(i++),name}, node); } } outputFormattedJavaText("GetResponseNames3", null, null); }
* Write getContentNames method. 7 public void writeGetContentNames() throws Exception { int count = mContentNames.size(); outputFormatted JavaText("GetContentNames1 ", new Object[]{String.valueOf(count)}, null); for (int i=0; i<count; i++) { String name = (String)mContentNames.get(i); outputFormattedJavaText("GetContentNames2", new Object[]{String.valueOf(i),name}, null);
} outputFormattedJavaText("GetContentNames3", null, null);
}
/**
* Write writeGetlnstrumentNames method. 7 public void writeGetlnstrumentNames() throws Exception { outputFormattedJavaText("GetlnstrumentNames1", null, null); int i = 0; for (Enumeration enum = mDocNode.getChildren(); enum.hasMoreElements(); ) { TJNode node = (TJNode)enum.nextElement(); if (node.islnstrumentO) {
String name = node.getName(); outputFormatted JavaTextfGetl nstrumentNames2", new Object[]{String.valueOf(i++),name}, node); } } outputFormattedJavaText("GetlnstrumentNames3", null, null);
r
* Write validateResponseValue method.
7 public void writeValidateResponseValue() throws Exception { outputFormatted JavaText("ValidateResponseValue1", null, null); for (Enumeration enum = mDocNode.getChildren(); enum.hasMoreElements(); ) { TJNode node = (TJNode)enum.nextElement(); if (node.getType().equals("Response")) { String name = node.getName(); String code = getJavaCode(node, 4); if (code==null || code.length()==0) outputFormattedJavaText("ValidateResponseValue2", new Object[]{name}, node); else outρutFormattedJavaText("ValidateResponseValue3", new Object[]{name,code}, node); } } outputFormattedJavaText("ValidateResponseValue4", null, null);
*
* Write getOption method. 7 public void writeGetOption() throws Exception {
. outputFormattedJavaText("GetOption1", null, null); for (Enumeration enum = mDocNode.getChildrenQ; enum.hasMoreElements(); ) { TJNode node = (TJNode)enum.nextElement(); if (node.isVariableO || node.isLabel()) { String name = node.getName(); String options = node.getTrimmedString(2); outputFormattedJavaText("GetOption2", new Object[]{name,options}, node); } } outputFormattedJavaText("GetOption3", null, null);
* Write checkRequired method.
7 public void writeCheckRequired() throws Exception {
. outputFormatted JavaText("CheckRequiredValue1", null, null); for (Enumeration enum = mDocNode.getChildrenO; enum.hasMoreElements(); ) { TJNode node = (TJNode)enum.nextElement(); if (node.getType().equals("Response")) { String name = node.getName(); String options = node.getRowText(2); String required = "false"; if (options!=null) { int index = options.indexOf("req"); if (index!=-1) required = "true";
} outputFormattedJavaText("CheckRequiredValue2", new Object[]{name,required}, node); } } outputFormattedJavaText("CheckRequiredValue3", null, null); }
/**
* Write getVariableNames method. 7 public void writeGetVariableNames() throws Exception { outputFormattedJavaText("GetVariableNames1", null, null); int i = 0; for (Enumeration enum = mDocNode.getChildrenO; enum.hasMoreElements(); ) { TJNode node = (TJNode)enum.nextElement(); String type = node.getType(); if (type.equals("Variable") || type.equalsfParameter")) { String name = node.getName(); outputFormattedJavaText("GetVariableNames2", new Object[]{String.valueOf(i++),name}, node); 1 } outputFormattedJavaText("GetVariableNames3", null, null);
}
/**
* Write getParameterNames method. 7 public void writeGetParameterNamesO throws Exception { outputFormattedJavaText("GetParameterNames1", null, null); int i = 0; for (Enumeration enum = mDocNode.getChildrenO; enum.hasMoreElementsO; ) { TJNode node = (TJNode)enum.nextElement(); String type = node.getType(); if (type.equalsfParameter")) {
String name = node.getName(); ' ' outputFormattedJavaText("GetParameterNames2", new Objectfl{String.valueOf(i++),name}, node);
} } outputFormattedJavaText("GetParameterNames3", null, null); } r
* Write computeVariable method. 7 public void writeComputeVariable() throws Exception { outputFormattedJavaText("ComputeVariable1", null, null); int i = 0; for (Enumeration enum = mDocNode.getChildrenQ; enum.hasMoreElements(); ) { TJNode node = (TJNode)enum.nextElement(); String type = node.getType(); if (type.equalsfVariable") || type.equals("Parameter")) { String name = node.getName(); String code = getJavaCode(node, 4); outputFormattedJavaText("ComputeVariabte2", new Objectπ{name,code}, node); } } outputFormattedJavaText("ComputeVariable3", null, null);
} r*
* Write setVariableValue method.
7 public void writeSetVariableValue() throws Exception { outputFormattedJarøTexi("SetVariabteValue1", null, null); for (Enumeration enum = mDocNode.getChildrenO; enum.hasMoreElementsO; ) { TJNode node = (TJNode)enum.nextElement(); String type = node.getTypeQ; if (type.equalsfResponse") || type.equals("Parameter")) { String name = node.getNameQ; String javaType = getJavaType(node, 3); if (javaType.equals("String")) outputFormattedJavaText("SetVariableValue2", new Objectπ{name}, node); else { int index = javaType.indexOff "); if (index!=-1) // Extended type? javaType = javaType.substriπg(0, index); // Yes, get type name javaType = javaType.substπ'ng(0, 1).toUpperCase() + javaType.substring(1 );
String converter = "to" + javaType; if (index==-1 ) // Extended type? outputFormattedJavaText("SetVariableValue3",// No new Object[]{name,converter}, node); else outputFormattedJavaText("SetVariableValue4",//Yes new Object[]{name,converter}, node);
}
} } outputFormattedJavaText("SetVariableValue5", null, null); }
/** * Write getVariableValue method.
7 public void writeGetVariableValue() throws Exception { outputFormattedJavaText("GetVariableValue1", null, null); for (Enumeration enum = mDocNode.getChildrenO; enum.hasMoreElements(); ) { TJNode node = (TJNode)enum.nextElementQ; String type = node.getTypeQ; if (type.equals("Response") || type.equals("Variable") || type.equals("Parameter"))
String name = node.getName(); String javaType = getJavaType(node, 3); String code = getConvertedVariable(javaType, name); if (isClassTypeOavaType) && !javaType.equals("String")) outputFormattedJavaText("GetVariableValue2", new Object[]{name,code}, node); else outputFormattedJavaText("GetVariableValue3", new Object[]{πame,code}, node); } } outputFormattedJavaText("GetVariableValue4", null, null);
/**
* Write getVariableType method. 7 public void writeGetVariableType() throws Exception { outputFormattedJavaText("GetVariableType1", null, null); for (Enumeration enum = mDocNode.getChildrenQ; enum.hasMoreElementsQ; ) { TJNode node = (TJNode)enum.nextElement(); if (node.isVariableO) {
String name = node.getName();
String javaType = getJavaType(node, 3); outputFormattedJavaText("GetVariableType2", new Object[]{name,javaType}, node); } } outputFormattedJavaText("GetVariableType3", null, null);
}
/**
* Write getCommand method. 7 public void writeGetCommand() throws {Exception { outputFormatted JavaText("GetCommand1", null, null); for (Enumeration enum = mDocNode.getChildrenO; enum.hasMoreElementsO; ) { TJNode node = (TJNode)enum.nextElementQ; if (node.isVariableO || node.isLabelQ) { . String name = node.getNameQ; String command •= node.getTrimmedString(O); outputFormattedJavaText("GetCommand2", new Object[]{name,command}, node); } } outputFormattedJavaText("GetCommand3", null, null);
/**
* Write getLabel method. 7 public void writeGetLabel() throws [Exception { outputFormattedJavaText("GetLabe!1", null, null); for (Enumeration enum = mDocNode.getChildrenQ; enum.hasMoreElementsO; ) { TJNode node = (TJNode)enum.nextElement(); if (node.isVariableQ || node.isLabelQ) { String name = node.getName(); String label = node.getTrimmedString(5); if (label==null || label.length()==0) label = name; label = replaceAII(label,"\"","\\\""); outputFormattedJavaText("GetLabel2", new Object[]{name,label}, node); } } outputFormattedJavaText("GetLabel3", null, null);
}
/**
* Write getObject method. 7 public void writeGetObjectO throws Exception { outputFormattedJavaText("GetObject1", null, null); for (Enumeration enum = mDocNode.getChildrenQ; enum.hasMoreElements(); ) {
TJNode node = (TJNode)enum.nextElement(); , if (node.isVariableQ) {
String objectString = null; String name = node.getName(); String type = getJavaType(node,3); if (isClassType(type)) { objectString = name;
} else if (type.equalsfboolean")) { objectString = "new Booleanf + name + ")";
} else if (type.equalsffloat")) { objectString = "new Floatf + name + ")";
} else if (type.equals("doub!e")) { objectString = "new Double(" + name + ")"; } else if (type.equalsfchar")) { objectString = "new Character(" + name + ")";
} else if (type.equalsfint")) { objectString = "new Integerf + name + ")";
} else if (type.equalsfshort")) { objectString = "new Short(" + name + ")";
} else if (type.equalsflong")) { objectString = "new Long(" + name + ")";
} else if (type.equals("byte")) { objectString = "new Byte(" + name + ")";
} else { objectString = "null";
} outputFormattedJavaText("GetObject2", new Object[j{name,objectString}, node); } } outputFormattedJavaText("GetObject3", null, null);
* Write writeDocument method.
7 public void writeWriteDocument() throws Exception {
String docName = mDocNode.getName(); outputFormatted JavaText("WriteDocument1", new Object[]{docName}, mDocNode); writeSelectionCalls(mDocNode, 1 ); outputFormattedJavaText("WrtteDocument2", null, mDocNode); writeGroupMethods(mDocNode, 1);
}
* Write a series of calls to selection methods. 7 public void writeSelectionCalls(TJNode groupNode, int level) throws Exception {
String groupName = groupNode.getNameQ; for (Enumeration enum = groupNode.getChildrenQ; enum.hasMoreElements(); ) { TJNode node = (TJNode)enum.nextElement(); String type = node.getType(); if (type.equals('Text") || type.equals("Graphic") || type.equals("Group") J| type.equalsC'Content") || type.equalsfTable") || type.equalsC'Chart")
|| (type.equalsfJava") && . !node.checkOption(mOptionColumnNum,"global"))) {
String name = node.getNameQ; String condition = getJavaCode(node, 3); if (condition.endsWithf;")) throw new Exceptionf'Condition ends with \";\":\n"+condition); String call = null; String skip = null; r
Text 7 if (type.equals('Text")) {
String text = getTailoringText(node, mTextColumnNum);
//call = getFormattedJavaText("WriteTextCall",
// new Object[]{name, text}); call = getWriteTextCall(name,text); r
* Graphic 7
} else if (type.equals("Graphic")) { call = getFormattedJavaText("WriteGraphicCall", new Object[]{name}); r
* Group 7
} else if (type.equalsfGroup")) {
String methodName = "write" + name; call = getFormattedJavaText("WriteGroupCall", new Object[]{methodName}); I*
Content 7 } else if (type.equalsfContenf)) {
String code = getJavaCode(node, 4); call = getFormattedJavaText("WriteContentCall", new Object[]{code}); /*
Table 7 } else if (type.equals('Table")) {
String data = getDatafnode, 4); call = getFormattedJavaText("WriteTableCaH", new Object[]{name, data}); /*
Chart 7 } else if (type.equalsfChart")) {
String data = getData(node, 4); call = getFormattedJavaText("WriteChartCall", new Object[]{name, data}); r
* Java 7
} else if (type.equalsfJava")) {
String code = getJavaCode(node, 4); call = getFormattedJavaText("UserJava3", new Object[]{code}); } boolean min = node.checkOption(mOptionColumnNum, "min") || node.checkOption(mOptionColumnNum, "minimum"); boolean max = node.checkOption(mOptionColumnNum, "max") || node.checkOption(mOptionColumnNum,
"maximum"); if (condition==null || condition.length()==0) { outputFormattedJavaText("WriteSelectionCalls1", new ObjectiJ{call}, node); } else if (!min&&Imax) { outputFormattedJavaText("WriteSelectionCalls2", new Objecti {condition, call}, node); } else if (min&&!max) { outputFormattedJavaText("WriteSelectionCalls3", new Object[]{condition, call}, node); } else if (!min&&max) { outputFormattedJavaText("WriteSelectionCalls4", new Objectrj{condition, call}, node); } else if (min&Smax) { outputFormattedJavaText("WriteSelectionCalls5", new Object[]{condition, call}, node);
} mContentNames.add(name);
} } } private String getWriteTextCall(String name, String text) throws Exception {
// break the text into seperate chunks when we write it into the Java file - // this is purely cosmetic, and helps with debugging in JBuilder, which only supports // lines of about 800 characters in the editor String chunkedText = getChunkedText(text);
String call = getFormattedJavaText("WriteTextCaH", new Object[]{name, chunkedText}); return call;
private String getChunkedText(String text) { if (text.length() < 850) return text;
StringBuffer chunkedText = new StringBuffer(); int currentlinelength = 0; boolean inquote = true; char c; for (int i=0;i<text.length();i++) { c = text.charAt(i); if (c =•= "") { if (inquote==false) inquote = true; else inquote = false; chunkedText.append(c);
} else if(c == ") { if (inquote && (currentlinelength > 750)) { chunkedTextappend(c); chunkedText.append("\""); chunkedText.append("+"); chunkedTextappend("\n"); chunkedText.append("r); currentlinelength = 0;
} else chunkedTextappend(c);
} else chunkedTextappend(c); currentiinelength++;
} return chunkedTexttoStringQ;
}
J**
* Write a series of group methods. May recurse. 7 public void writeGroupMethods(TJNode groupNode, int level) throws Exception {
String groupName = groupNode.getName(); for (Enumeration enum = groupNode.getChildrenQ; enum.hasMoreElementsO; ) { TJNode node = (TJNode)enum.nextElement(); String type = node.getTypeQ; if (type.equals("Group")) {
String name = node.getName(); String methodName = "write" + name; outputFormattedJavaText("WriteGroupMethod1", ", : new Objectfl{name, methodName, String.valueOf(level)}, node); writeSelectionCalls(node, level); outputFormattedJavaText("WriteGroupMethod2", new Object[]{name, String.valueOf(level)}, node); writeGroupMethods(node, level+1 );
}
* Write the writeVariableValues method
7 public void writeWriteVariableValuesQ throws Exception { outputFormatted JavaText("WriteVariableValues1", null, null); for (Enumeration enum = mDocNode.getChildrenO; enum.hasMoreElements(); ) { TJNode node = (TJNode)enum.nextElement(); String variableType = node.getTypeQ; if (node.isVariableQ) {
String javaType = geUavaType(node, 3); String name = node.getNameQ; String code = getConvertedVariable(javaType, name); outputFormattedJavaText("WriteVariableValues2", new Object[]{variableType,javaType,πame,code}, node); } } outputFormattedJavaText("WriteVariableValues3", null, null); }
/**
* Get text from node column, trimmed.
*
* @param node TJNode containing node.
* @param column int contianing column.
* ©return String with text. 7 protected String getColumnText(TJNode node, int column) throws Exception {
String text = node.getTrimmedStriπg(column); return text; } r*
* Get Java type from node column.
* @param node TJNode containing node.
* @param column int containing column.
* ©return String with formatted type. 7 protected String getJavaType(TJNode node, int column) throws Exception {
■ String type •= getCoIumnText(node, column); if (type.indexOf("\n")!=-1) throw new ExceptionfJava type contains a line break \""+type+"\""); return type; }
/**
* Get Java code from node column.
*
* @param node TJNode containing node.
* @param column int contianing column.
* ©return String with formatted code. 7 protected String getJavaCode(TJNode node, int column) throws Exception {
String code = getColumnText(node, column); code=fixJavaCode(code); return code;
protected String fixJavaCode(String code) throws Exception { //String code = getColumnText(node, column); code = replaceAII(code, "##par##", lineSeparator); code = replaceAII(code, "##ldq##". "\""); code = replaceAII(code, "##rdq##". "\""); code = replaceAII(code, "##BoldOn##",""); code = replaceAII(code,"##BoldOff##",""); code = replaceAII(code,"##quot##" ""); return code;
} /"
* Get tailoring text from node column.
*
* ©param node TJNode containing node.
* ©param column int contianing column.
* ©return String with formatted text. 7 protected String getTailoringText(TJNode node, int column) throws Exception { String text = node.getRowText(column); text= replaceAII(text, "\n", ""); text= replaceAII(text, "V", "##quot##"); text = replaceAII(text, "\u2022", "##bul##"); text = replaceAII(text, "\\", "\\\\"); // Replace / with // for Java strings text = substituteJavaCalls(text); // Substitute in
Java return text; }
* Get data from node column (for Tables and Charts)
*
* ©param node TJNode containing node.
* ©param column int contianing column.
* ©return String with data. 7 protected String getData(TJNode node, int column) throws Exception {
String data = getCo!umnText(node, column); data = replaceAII(data, "##par##", ""); data = replaceAII(data, T", "\\\""); // Replace " with \" data = substituteJavaCalls(data); return data; }
/**
* Format a string to insert Java calls.
*
* ©param text String to fromat * ©return String with substituted Java calls.
7 protected String substituteJavaCalls(String text) throws Exception {
StringBuffer buf = new StringBuffer(); for (int i=0; i<text.length(); ) { int j = text.indexOf(subPrefix, i); if (j==-D { buf.append(text.substring(i)); break;
} int k = j + subPrefix.length(); int I = text.indexOf(subSunix, k); if (l==-1) throw new Exception ("Closing "+subSuffix+" missing from "+text); buf.append(textsubstring(i, j)); buf.append("\"+(");
// now put the real quotes (") back in the javacall String javacall = text.substring(k, I);
// Need to replace more special characters for the word 2000 to work.
// javacall = replaceAII 'avacall,"##quoW",'V"'); javacall = fixJavaCodeQ'avacall);
// and append it buf.append(javacall); buf.append(")+V"'); i = I + subSuffix.length();
} return buf.toStringQ;
r
* Get as Java code containing converted string of a variable.
*
* ©param javaType String containing Java type.
* ©param name String containing variable name.
* ©return String with Java code to convert variable to String. 7 protected String getConvertedVariable(String javaType, String name) { if (javaType.equals("String")) return name; else {
StringBuffer converter = new StringBuffer(); converter.append("toString("); converter.append(name); converter.append(")"); return converter.toStringQ;
} }
/"Get a named piece of Java text.7 protected String getJavaText (String name) throws Exception { String str = HealthMedia.HMICore2.Utils.XMLUtils.getNodeValueByName(mJavaTextTopNode, name, 'TEXT'); if (str==null) throw new ExceptionfCanπot find Java text for name "+name); stir = fixLineSeparators (str); return str; }
Λ*Get formatted Java text.7 protected String getFormattedJavaText (String name, ObjectQ args) throws Exception { String pattern = getJavaText(name); String text = null; try { text = MessageFormatformat(pattern, args); } catch (lllegalArgumentException e) { throw new lllegalArgumentException (e.toString()+", \""+pattern+'V");
} return text;
}
/"Output Java text with argument substitution.7 protected void outputFormattedJavaText (String name, Object!] args, TJNode node) throws Exception {
String output = getFormattedJavaText(name, args); mWriter.print(output); int start = mWriterLineNum; for (int index=output.indexOf(lineSeparator,0); index!=-1; index=output.indexOf(lineSeparator,index)) { mWriterLineNum++; index++;
} if (node!=null && i(node.getType().equals("lncludeJava"))) node.addLineNums(start, mWriterLineNum); }
/"Replace all oc'curences of one string with another. 7 protected String replaceAII(String str, String from, String to) { StringBuffer buf = new StringBuffer(); for (int start=0; ;) { int index = str.indexOf(from, start); // Search for "from" string if (index==-1) { buf.append(str.substring(start)); // No more occurences, copy the rest of str break;
} buf.append(str.substring (start, index)); //Append text up to "from" string buf.append(to); // Append "to" string start = index + from.lengthQ;
} return buf.toStringQ; }
/"Fix line separators.7 protected String fixLineSeparators(String str) { if (str.indexOf(lineSeparator)!=-1 ) // Already has line separators return str; return replaceAII (str, "\n", lineSeparator); }
/"Determine whether type is numeric.7 protected boolean isNumericType(String fype) { return type.equals("byte") || type.equals("short") || type.equals("int") || type.equals("long") || type.equalsf'char") || type.equals("float") || type.equalsfdouble"); }
/"Determine whether type is a class.7 protected boolean isClassType(String type) { return ϋsNumericType(type) && !type.equals("boolean"); }
/"Given a type, return a default value.7 protected String getDefaultValue(String type) { if (isNumericType(type)) return "-1"; else if (type.equalsf'boolean")) return "false"; else return "null"; }

Claims

CLAIMS What is claimed is: 1. A method for generating computer source code, comprising: preparing a master tailoring document which contains logic for a computer program; inputting the master tailoring document into a document structure generator, wherein the document stracture generator parses out the computer program logic contained in the input document and builds a document tree stracture based on the program logic; and providing a code writer program and a template of pre-defined source code snippets, wherein the code writer program retrieves the computer program logic from the document tree structure and combines the retrieved program logic with designated source code snippets from the template to generate source code for a computer program.
2. The source code generation method of claim 1, further comprismg compiling the generated source code to convert the generated source code into executable code.
3. The source code generation method of claim 2, further comprising: providing computer memory and a computer workstation; moving the executable code to the computer memory; activating the executable code, which generates a dynamic user interface on the computer workstation; inputting data into the dynamic user interface and submitting the data; processing the input data; and creating an output content document.
4. The source code generation method of claim 3, further comprising: formatting the output content document into a formatted file; and transmitting the formatted file to the computer workstation for review.
5. The source code generation method of claim 4, wherein formatting the output content document into a formatted file includes: providing a hypertext markup language (HTML) publisher and an HTML layout file; and inputting the output content document and the HTML layout file into the
HTML publisher to format the formatted file in HTML.
6. The source code generation method of claim 4, wherein formatting the output content document into a formatted file includes: providing a print publisher and a print layout file; and inputting the output content document and the print layout file into the print publisher to format the formatted file in a print file format.
7. The source code generation method of claim 4, wherein formatting the output content document into a formatted file includes formatting the output content document into a text file format.
8. The source code generation method of claim 1, wherein: the master tailoring document includes commands that set document tree structure nodes when parsed by the document structure generator.
9. The source code generation method of claim 8, wherein: the master tailoring document includes commands that create branches from each generated node when parsed by the document stracture generator.
10. The source code generation method of claim 8, wherein: the master tailoring document includes group commands having subcommands that create branches from each generated node when parsed by the document structure generator.
11. The source code generation method of claim 1 , wherein the template of predefined source code snippets is written in extensible markup language (XML).
12. The source code generation method of claim 1, wherein the generated source code is written in the Java programming language.
13. The source code generation method of claim 1, wherein the master tailoring document includes at least one condition statement written to output text content based on the condition statement.
14. The source code generation method of claim 1, wherein the master tailoring document includes at least one condition statement written to output graphics content based on the condition statement.
15. A system for generating computer source code from a master tailoring document which contains logic for a computer program, comprising: a code generator having: a document stracture generator; a memory; a code writer; and a template of pre-defined source code snippets, wherein the document structure generator parses out the computer program logic contained in the master tailoring document and builds a document tree stracture in memory based on the program logic and wherein the code writer program retrieves the computer program logic from the document tree stracture and combines the retrieved program logic with designated source code snippets from the template to generate source code for a computer program.
16. The source code generation system of claim 15, further comprising a code compiler for compiling the generated source code to convert the generated source code into executable code.
17. The source code generation system of claim 15,wherein: the master tailoring document includes commands that set document tree structure nodes when parsed by the document structure generator.
18. The source code generation system of claim 17, wherein: the master tailoring document includes commands that create branches from each generated node when parsed by the document structure generator.
19. The source code generation system of claim 17, wherein: the master tailoring document includes group commands having subcommands that create' branches from each generated node when parsed by the document structure generator.
20. The source code generation system of claim 15, wherein the template of pre-defined source code snippets is written in extensible markup language (XML).
21. The source code generation system of claim 15, wherein the generated source code is written in the Java programming language.
22. The source code generation method of claim 1, wherein the master tailoring document includes at least one condition statement written to output text content based on the condition statement.
23. The source code generation method of claim 1 , wherein the master tailoring document includes at least one condition statement written to output graphics content based on the condition statement.
PCT/US2001/010860 2000-04-07 2001-04-03 System and method for generating computer source code WO2001077882A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
AU2001253122A AU2001253122A1 (en) 2000-04-07 2001-04-03 System and method for generating computer source code

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
US19572100P 2000-04-07 2000-04-07
US60/195,721 2000-04-07
US63228500A 2000-08-03 2000-08-03
US63150500A 2000-08-03 2000-08-03
US09/631,505 2000-08-03
US09/632,285 2000-08-03

Publications (1)

Publication Number Publication Date
WO2001077882A1 true WO2001077882A1 (en) 2001-10-18

Family

ID=27393494

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2001/010860 WO2001077882A1 (en) 2000-04-07 2001-04-03 System and method for generating computer source code

Country Status (2)

Country Link
AU (1) AU2001253122A1 (en)
WO (1) WO2001077882A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9965256B2 (en) 2015-06-18 2018-05-08 The Joan and Irwin Jacobs Technion-Cornell Institute Method and system for evaluating computational algorithms described in printed publications
US10353539B2 (en) * 2011-09-26 2019-07-16 Paypal, Inc. Easy creation of mobile code
US10755590B2 (en) 2015-06-18 2020-08-25 The Joan and Irwin Jacobs Technion-Cornell Institute Method and system for automatically providing graphical user interfaces for computational algorithms described in printed publications
US11681504B1 (en) 2019-04-26 2023-06-20 Opturo, Inc. Automated application builder using configuration files

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5860073A (en) * 1995-07-17 1999-01-12 Microsoft Corporation Style sheets for publishing system
US5895476A (en) * 1996-09-09 1999-04-20 Design Intelligence, Inc. Design engine for automatic reformatting for design and media
US6012098A (en) * 1998-02-23 2000-01-04 International Business Machines Corp. Servlet pairing for isolation of the retrieval and rendering of data
US6023714A (en) * 1997-04-24 2000-02-08 Microsoft Corporation Method and system for dynamically adapting the layout of a document to an output device
US6161114A (en) * 1996-09-09 2000-12-12 Design Intelligence, Inc. Design engine for fitting content to a medium
US6167409A (en) * 1996-03-01 2000-12-26 Enigma Information Systems Ltd. Computer system and method for customizing context information sent with document fragments across a computer network
US6199082B1 (en) * 1995-07-17 2001-03-06 Microsoft Corporation Method for delivering separate design and content in a multimedia publishing system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5860073A (en) * 1995-07-17 1999-01-12 Microsoft Corporation Style sheets for publishing system
US6199082B1 (en) * 1995-07-17 2001-03-06 Microsoft Corporation Method for delivering separate design and content in a multimedia publishing system
US6167409A (en) * 1996-03-01 2000-12-26 Enigma Information Systems Ltd. Computer system and method for customizing context information sent with document fragments across a computer network
US5895476A (en) * 1996-09-09 1999-04-20 Design Intelligence, Inc. Design engine for automatic reformatting for design and media
US6161114A (en) * 1996-09-09 2000-12-12 Design Intelligence, Inc. Design engine for fitting content to a medium
US6023714A (en) * 1997-04-24 2000-02-08 Microsoft Corporation Method and system for dynamically adapting the layout of a document to an output device
US6012098A (en) * 1998-02-23 2000-01-04 International Business Machines Corp. Servlet pairing for isolation of the retrieval and rendering of data

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10353539B2 (en) * 2011-09-26 2019-07-16 Paypal, Inc. Easy creation of mobile code
US11080682B2 (en) 2011-09-26 2021-08-03 Paypal, Inc. Easy creation of mobile code
US20210357902A1 (en) * 2011-09-26 2021-11-18 Paypal, Inc. Easy creation of mobile code
US11875333B2 (en) 2011-09-26 2024-01-16 Paypal, Inc. Easy creation of mobile code
US9965256B2 (en) 2015-06-18 2018-05-08 The Joan and Irwin Jacobs Technion-Cornell Institute Method and system for evaluating computational algorithms described in printed publications
US9971573B2 (en) 2015-06-18 2018-05-15 The Joan and Irwin Jacobs Technion-Cornell Institute Computing platform and method thereof for searching, executing, and evaluating computational algorithms
US10489124B2 (en) 2015-06-18 2019-11-26 The Joan and Irwin Jacobs Technion-Cornell Institute Method and system for providing software containers supporting executable code created from computational algorithms described in printed publications
US10496380B2 (en) 2015-06-18 2019-12-03 The Joan and Irwin Jacobs Technion-Cornell Institute Cache-based system and method for executing instances of a computational algorithm
US10755590B2 (en) 2015-06-18 2020-08-25 The Joan and Irwin Jacobs Technion-Cornell Institute Method and system for automatically providing graphical user interfaces for computational algorithms described in printed publications
US11315436B2 (en) 2015-06-18 2022-04-26 The Joan and Irwin Jacobs Technion-Cornell Institute Method and system for automatically providing graphical user interfaces for computational algorithms described in printed publications
US11681504B1 (en) 2019-04-26 2023-06-20 Opturo, Inc. Automated application builder using configuration files

Also Published As

Publication number Publication date
AU2001253122A1 (en) 2001-10-23

Similar Documents

Publication Publication Date Title
US10002116B2 (en) System and method for citation processing presentation, and transport
US7761787B2 (en) Document generation system and user interface for producing a user desired document
US20190220504A1 (en) Method and system for editing text with a find and replace function leveraging derivations of the find and replace input
CA2764012C (en) Computer-implemented method, system and computer program product for displaying a user interface component
US7191395B2 (en) Method and system for stylesheet-centric editing
US20040268229A1 (en) Markup language editing with an electronic form
KR100661393B1 (en) Web site management system and method applying web programming environment
JP3905179B2 (en) Document translation apparatus and machine-readable medium
Ko et al. Barista: An implementation framework for enabling new tools, interaction techniques and views in code editors
US20050193330A1 (en) Methods and systems for eBook storage and presentation
JP4007562B2 (en) Programming support method and apparatus
KR20050056123A (en) Programmable object model for namespace or schema library support in a sofrware application
KR100745530B1 (en) Browser-independent pop-up windows
US20040237036A1 (en) Methods and systems for generating supporting files for commands
US10180931B2 (en) Using a template processor to determine context nodes
US7657869B2 (en) Integration of external tools into an existing design environment
US20040117776A1 (en) Type-specific objects from markup and web-oriented languages, and systems and methods therefor
WO2001077882A1 (en) System and method for generating computer source code
US7020683B2 (en) Method, server and system for dynamic server application adjustment
JPH11353189A (en) Method and device for implementing tag-based display language using procedure instruction language
Joshi Beginning XML with C# 2008: from novice to professional
JP2003108369A (en) Autocreation of program that receives request from web and performs outputting of result
Stayton DocBook—xsl
CN117687620A (en) File generation method and device, terminal equipment and computer readable storage medium
CN116384346A (en) Text replacement method, device, terminal and medium based on HTML format

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EE ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NO NZ PL PT RO RU SD SE SG SI SK SL TJ TM TR TT TZ UA UG UZ VN YU ZA ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): GH GM KE LS MW MZ SD SL SZ TZ UG ZW AM AZ BY KG KZ MD RU TJ TM AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE TR BF BJ CF CG CI CM GA GN GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
122 Ep: pct application non-entry in european phase
NENP Non-entry into the national phase

Ref country code: JP