Text file interface support in an object oriented application
First Claim
1. A method of processing a text file in a computer application, comprising the steps:
- creating a plurality of templates from samples of the text file, wherein each of the templates has literal fragments of the text file, each of the templates including substitution points that are filled in with application data;
when the format of the text file changes, changing the templates;
providing a macro class to map data from the text file to the computer application;
embedding in one of the templates a pointer to the macro class; and
using said one of the templates as an overlay to parse the text file into segments having data, or as a prototype to generate a segment of an output file;
said using step including the steps of;
i) reaching said pointer in said one of the templates,ii) when said pointer is reached, using said pointer to invoke said macro class and using said macro class to map data from one of the segments of the text file to the computer application,iii) said macro class then invoking another one of the templates to further process the text file, andiv) said macro class handling iterations, conditional logic and preparation of data for said another one of the templates;
wherein;
the templates support variable substitutions and conditional or iterative generation for output files; and
the method comprising the further steps of;
each macro handling iterations, conditional logic and preparation of data for the next template;
using an interface controller to keep track of the macros needed for a particular process so that the macros do not need to be continually reinvoked;
using literal text within the templates to determine the format of the output stream;
storing the templates for each application as a hashtable that is associated to said each application'"'"'s definition class;
providing a specialized macro for supporting the navigation of a complex object structure;
including in each template macros that specify points in the input stream from which data are to be taken and what to do with said data;
providing each template with an extraction point to extract data from the input stream, said each template including the name of the field to be extracted and the name of the database table said field belongs to in the current application;
providing each template with a keyword, said keyword being used for data extraction and specifying the column name and the internal class name for the data to be extracted;
including in each template parsing information that specifies, for each field, which internal class the field is assigned to, and the database column name for the field;
using a format class to translate string data from the input field into a suitable format for internal processing; and
providing an interface file to define an interface template for the application, wherein each record in the interface file is matched to a unique template, wherein the type of input record for the template is specified by starting the template name with a table name.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and system for processing a text file in a computer application. The method comprises the steps of forming a template from fragments of the text file; using the template as an overlay for parsing incoming files, or as a prototype to generate a segment of an output file; and using a macro class to map data from the text file to an application. The macro class is embedded as a keyword within the template, so that when the template reaches the keyword, the template calls the macro class to further process the text file. The macro class may be used to reads in a segment of the text file and to use the segment to initiate application update processing. Also, the macro class may be used to derive data from the application and to format it into the text file. Preferably, an interface controller is provided to prevent structure clashes by placing text data into appropriate places in a complex object structure as the text file is processed.
31 Citations
2 Claims
-
1. A method of processing a text file in a computer application, comprising the steps:
-
creating a plurality of templates from samples of the text file, wherein each of the templates has literal fragments of the text file, each of the templates including substitution points that are filled in with application data; when the format of the text file changes, changing the templates; providing a macro class to map data from the text file to the computer application; embedding in one of the templates a pointer to the macro class; and using said one of the templates as an overlay to parse the text file into segments having data, or as a prototype to generate a segment of an output file; said using step including the steps of; i) reaching said pointer in said one of the templates, ii) when said pointer is reached, using said pointer to invoke said macro class and using said macro class to map data from one of the segments of the text file to the computer application, iii) said macro class then invoking another one of the templates to further process the text file, and iv) said macro class handling iterations, conditional logic and preparation of data for said another one of the templates;
wherein;the templates support variable substitutions and conditional or iterative generation for output files; and the method comprising the further steps of; each macro handling iterations, conditional logic and preparation of data for the next template; using an interface controller to keep track of the macros needed for a particular process so that the macros do not need to be continually reinvoked; using literal text within the templates to determine the format of the output stream; storing the templates for each application as a hashtable that is associated to said each application'"'"'s definition class; providing a specialized macro for supporting the navigation of a complex object structure; including in each template macros that specify points in the input stream from which data are to be taken and what to do with said data; providing each template with an extraction point to extract data from the input stream, said each template including the name of the field to be extracted and the name of the database table said field belongs to in the current application; providing each template with a keyword, said keyword being used for data extraction and specifying the column name and the internal class name for the data to be extracted; including in each template parsing information that specifies, for each field, which internal class the field is assigned to, and the database column name for the field; using a format class to translate string data from the input field into a suitable format for internal processing; and providing an interface file to define an interface template for the application, wherein each record in the interface file is matched to a unique template, wherein the type of input record for the template is specified by starting the template name with a table name.
-
-
2. A method of processing a text file in a computer application, comprising the steps:
-
creating a plurality of templates from samples of the text file, wherein each of the templates has literal fragments of the text file, each of the templates including substitution points that are filled in with application data; when the format of the text file changes, changing the templates; providing a macro class to map data from the text file to the computer application; embedding in one of the templates a pointer to the macro class; and using said one of the templates as an overlay to parse the text file into segments having data, or as a prototype to generate a segment of an output file; said using step including the steps of; i) reaching said pointer in said one of the templates, ii) when said pointer is reached, using said pointer to invoke said macro class and using said macro class to map data from one of the segments of the text file to the computer application, iii) said macro class then invoking another one of the templates to further process the text file, and iv) said macro class handling iterations, conditional logic and preparation of data for said another one of the templates; the method comprising the further steps of; using literal text within the templates to determine the format of the output steam; storing the templates for each application as a hashtable that is associated to said each application'"'"'s definition class; and providing a specialized macro for supporting the navigation of a complex object structure.
-
Specification