CN112631585A - XML-based rapid parameter interface configuration method - Google Patents
XML-based rapid parameter interface configuration method Download PDFInfo
- Publication number
- CN112631585A CN112631585A CN202011527244.7A CN202011527244A CN112631585A CN 112631585 A CN112631585 A CN 112631585A CN 202011527244 A CN202011527244 A CN 202011527244A CN 112631585 A CN112631585 A CN 112631585A
- Authority
- CN
- China
- Prior art keywords
- parameter
- data
- xml
- interface
- class
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The invention relates to a rapid parameter interface configuration method based on XML, which firstly generates an XML parameter description file according to certain rules; then, automatically generating a parameter attribute interface on the basis of the XML parameter description file, and inputting parameter data through the parameter attribute interface by a user; and finally, storing the input data into an XML parameter description file. The method can quickly display the configuration parameters, provide different input interface modes according to corresponding parameter types, and simultaneously process the parameter display and setting with the dependency relationship, thereby providing a quick and simple way for quickly integrating the simulation calculation software module, and a user can generate the parameter interface only by knowing the XML format and the parameter description format without deeply knowing the developer.
Description
Technical Field
The invention relates to a rapid parameter interface configuration method based on XML.
Background
In the last decade, the development of China in the field of numerical simulation of aerospace is very rapid, and a great research result is obtained, which benefits from the development of not only large-scale computer systems, but also various simulation software. The development of core solver software in simulation software is very important for various departments and institutions, and along with the application in engineering departments, the integration of the solver software is more and more concerned.
According to the characteristics of aerospace solver software, an implementation algorithm is mainly used, and developers do not care about how to package the aerospace solver software carelessly. Often, the control parameters are edited in a textual manner and executed under the command line. Although the method can meet the use requirements, the method is not suitable for popularization and application and is not suitable for beginners to use.
Therefore, a simple, convenient, rapid and universal method is needed, parameters are automatically configured in a mode of customizing parameter files and visually generating graphical interfaces, and a means is provided for rapid software integration.
The traditional automatic interface generation technology has various modes, most of the traditional automatic interface generation technologies need special interface configuration tools and specific interface event response methods for development, and logic relations and element functions among interface parameters are realized.
Disclosure of Invention
The invention provides a rapid parameter interface configuration method based on XML (extensive makeup language) in order to solve the technical problems that the traditional automatic interface generation technology requires a user to have deeper understanding on a developer and has a corresponding language programming basis.
The technical scheme of the invention is as follows:
the rapid parameter interface configuration method based on XML is characterized by comprising the following steps:
Editing a parameter description file according to control parameters of user solver software, and defining a unique root node name for the parameter description file; the parameter description file adopts XML language to describe the information of each specific parameter;
Reading the parameter description file and the root node name edited in the step 1, and generating an acquisition and setting class of control parameter data and a parameter input mode class; the method comprises the steps of controlling the acquisition and setting of parameter data to be parameter acquisition and setting methods; the parameter input mode class is the associated information of the parameters and the input modes; the acquisition and setting class of the control parameter data and the parameter input mode class are java classes, and the class names are named based on the read parameter description file names;
Compiling the two java classes generated in the step 2, and loading the java classes after the java classes are successfully compiled to obtain two class objects;
step 4, data control and interface binding
Performing data binding on the two class objects acquired in the step 3, and transmitting data read or written by the acquisition and setting class of control parameter data to the parameter input mode class;
Calling the Shettable control to display parameters in the parameter description file, extracting initial values in the parameter description file, and displaying the initial values in the interface;
step 6, receiving input data of a user
6.1) popping up a corresponding parameter input window, a drop-down list or an edit box defined by the parameters according to the specific parameters clicked by the user in the interface;
6.2) receiving input data of a user through an opened parameter input window, a pull-down list or an edit box, judging whether the data input by the user is the same as the parameter value displayed on the current interface or not, judging whether the parameter is dependent on the parameter or not by the system when the data input by the user is different from the parameter value displayed on the current interface, and if the parameter is dependent on the parameter, refreshing the interface and displaying the parameter again; if no dependent parameter exists, entering step 7; if the user input data is the same as the parameter value displayed on the current interface, directly entering the step 7;
step 7, storing parameter data
And after the parameter value is input, saving operation is carried out according to a user instruction, the parameter values in the acquisition and setting classes of the control parameter data are read and written into the parameter description file, and the data are written into the parameter description file for storage.
Further, the specific method for editing the parameter description file in step 1 is as follows:
1.1) defining a control parameter list for solver software in an XML file, defining a root node for the solver software control parameter, and directly positioning the control parameter of the solver software in the XML file through the name of the root node; a list of control parameters of one or more solver software can be defined in an XML file;
1.2) classifying control parameters of solver software, and defining label nodes under root nodes;
1.3) defining specific parameter nodes under the label nodes.
Further, each parameter node in step 1.3) includes a parameter name, a parameter type, a parameter english name, an enumeration type parameter option, a parameter dependency relationship value, an initial value, and a parameter description.
Further, the parameter types in step 5.2) include text, color values, path values, file values, enumeration values, and one-dimensional or two-dimensional array values.
Further, the text is input by using an edit box; the color value is visually selected by adopting a color selection window; the path value is visually selected by adopting a path selection window; the file value is visually selected by adopting a file selection window; adopting a pull-down option to visually take values for enumeration; and inputting the value of the one-dimensional or two-dimensional array by adopting a rich edit box or a table window.
Further, in step 4, data binding is performed on the two class objects by using the Sheettable.
The invention has the advantages that:
by adopting the method of the invention, the user can generate the parameter interface with front and back logics only by knowing the XML format and the control parameter description format. Through the practice in the software integration process, although interfaces generated by the traditional interface automatic generation technology are not rich, the integration difficulty and efficiency can be greatly saved.
Drawings
FIG. 1 is a flow chart of the method of the present invention.
FIG. 2 is an example of a parameter definition property diagram.
FIG. 3 is an example of a parameter definition XML template.
FIG. 4 is an example parameter configuration interface diagram.
Fig. 5 is an example of a parameter input type diagram.
Detailed Description
The invention is further described below with reference to the accompanying drawings.
As shown in fig. 1, the method for configuring an XML-based fast parameter interface provided by the present invention includes the following steps:
According to the control parameters of the user solver software, a parameter description file (XML) is edited, which describes information of each specific parameter in an XML language (see fig. 2).
Firstly, defining a control parameter list for solver software in an XML file, defining a root node (unique node name) for the solver software control parameter, and directly positioning the control parameter of the solver software through the root node name; a list of control parameters for one or more solver software may be defined in an XML file.
Secondly, control parameters of solver software are classified, and label nodes are defined under the root nodes.
Finally, defining specific parameter nodes under the label nodes, wherein each parameter node comprises: the method comprises the following steps of parameter names, parameter types, parameter English names, enumerated type parameter options, parameter dependency relationship values, initial values, parameter descriptions and other attributes, wherein the defined parameter names can not be of the same name.
And (3) reading the parameter description file (XML) and the root node name defined in the step (1), and automatically generating an acquisition and setting class of control parameter data and a parameter input mode class. The method comprises the steps of controlling the acquisition and setting of parameter data to be parameter acquisition and setting methods; the control parameter input mode class is the information related to the parameter and the input mode, wherein the control parameter is defined to input the parameter value by an input window, a drop-down list or an edit box (the Sheetble control provides the input window, the drop-down list or the edit box realization class, and can also develop the window class of a special mode by self to be related, but the parameter editing interface of the Sheetble must be satisfied); the acquisition and setting class of the control parameter data and the parameter input mode class are java classes, and the class names are named based on the read parameter description file names.
And (3) automatically compiling the two Java classes generated in the step (2), and loading after compiling success to obtain two class objects.
Step 4, data control and interface binding
And (3) carrying out data binding on the two class objects acquired in the step (3) by using an interface provided by the Sheetable control, and transmitting data read or written by the acquisition and setting class of the control parameter data to the parameter input mode class.
Calling the Shettable control to display the parameters in the label nodes and the parameter nodes in the parameter description file (XML), extracting the initial values in the parameter description file (XML) and displaying the initial values in the interface.
Step 6, receiving input data of a user
6.1) popping up a corresponding parameter input window, a drop-down list or an edit box defined by the parameters according to the specific parameter type clicked by the user so as to facilitate the user to input data through different input ways;
6.2) receiving input data of a user through an opened parameter input window, a pull-down list or an edit box, judging whether the input data of the user is the same as a parameter value displayed on a current interface or not, judging whether the parameter is dependent on the parameter or not by a system when the input data of the user is different from the parameter value (an initial value or a parameter value input by the user in the previous time) displayed on the current interface, and if the dependent parameter exists, refreshing the interface and then displaying again; if no dependent parameter exists, entering step 7; if the user input data is the same as the parameter value displayed on the current interface, directly entering the step 7;
step 7, storing parameter data
After the parameter value is input, the system performs storage operation according to a storage instruction input by a user, reads the parameter value in the acquisition and setting class of the control parameter data, writes the read parameter value into a parameter description file (XML), and writes the data into the parameter description file (XML) for storage.
Example (b):
the global parameterization, control equation parameters, physical parameters, and computational control parameter integration examples are described below with reference to FIG. 3, to employ the present invention in a particular pneumatic simulation software integration.
1.1) defining a root node for the pneumatic simulation software, wherein the root node is uniquely marked as CFDSolver, and the parameter description information of the pneumatic simulation software can be quickly and uniquely found through the root node in the integration process.
1.2) carding pneumatic simulation software needs integrated parameters and classifying the parameters. Under the root node, label nodes are defined, and group names are mainly described, wherein the group names comprise global parameterization, control equation parameters, physical parameters and calculation control parameters.
1.3) defining specific parameter nodes under each label node.
In FIG. 3, dependency-on is the dependent parameter defined by the parameter, and the display logic relationship between the parameter and other related parameters can be illustrated;
label is the display name defined by the parameter;
keyname is the key word (unique label) of the parameter;
name is the English name of the parameter;
type is the type of the parameter (numeric, character, path, color, enumeration, etc.);
options are enumeration type options;
value is a default value or an input value of the parameter;
note is interpretation information of the parameter, and is used for displaying parameter description when the parameter is selected in the interface.
Reading the parameter description file (. XML) for describing the parameter data of the pneumatic simulation software defined in the step 1 and the root node name of the pneumatic simulation software, and generating a java class file with the main file name (. x) of the parameter description file (XML) as the name, wherein the java class file comprises a control parameter data acquisition and setting class (class name) (. x), and a parameter input mode class (class name) (. Info). The acquisition and setting class of the control parameter data is a main class, and the parameter input mode class is an internal subclass.
And respectively automatically compiling the java class files generated in the last step to generate two class objects class and class info.
Step 4, data control and interface binding
And carrying out data binding on the two compiled class objects class and class by using a Sheetble, and transmitting data read or written by the control parameter data acquisition and setting class to the parameter input mode class.
And (3) laying out a Sheetable control (as shown in FIG. 4) in the dialog box, displaying the parameters in the label node and the parameter node in the parameter description file (XML), acquiring the initial value of the parameter in the parameter description file (XML), and displaying the initial value in the interface.
Step 6, receiving the input of the user
When a user clicks a specific parameter, a corresponding parameter input box (such as a part of parameter types illustrated in fig. 5) is popped up according to different parameter types, the corresponding parameter types are input through different input paths, and an input value is written into a parameter description file (XML). The parameter types may include: text (input by using an edit box), color value (visual selection value by using a color selection window), path value (visual selection value by using a path selection window), file value (visual selection value by using a file selection window), enumeration value (visual value by using a pull-down option), and one-dimensional or two-dimensional array value (value by using a rich edit box or a table window).
When a user changes the current parameter value through input, the system judges whether the parameters have a dependency relationship, if the parameters have the dependency relationship, namely a certain parameter is the dependency parameter of other parameters, the interface is refreshed to hide or display the parameter depending on the certain parameter according to the value of the dependency parameter, and the step 7 is entered; if no dependency exists, the interface is not refreshed, and the step 7 is directly carried out;
when the user input does not change the current parameter value, step 7 is entered directly.
Step 7, storing parameters
And after the parameter values are input, the system performs storage operation according to the user instruction, reads the parameter values in the acquisition and setting classes of the control parameter data, writes the parameter values into a parameter description file (XML), and writes the data into the parameter description file (XML) for storage.
Claims (6)
1. The quick parameter interface configuration method based on the XML is characterized by comprising the following steps of:
step 1, editing a parameter description file to describe control parameter data of solver software
Editing a parameter description file according to control parameters of user solver software, and defining a unique root node name for the parameter description file; the parameter description file adopts XML language to describe the information of each specific parameter;
step 2, automatic generation of parameter data exchange class
Reading the parameter description file and the root node name edited in the step 1, and generating an acquisition and setting class of control parameter data and a parameter input mode class; the method comprises the steps of controlling the acquisition and setting of parameter data to be parameter acquisition and setting methods; the parameter input mode class is the associated information of the parameters and the input modes; the acquisition and setting class of the control parameter data and the parameter input mode class are java classes, and the class names are named based on the read parameter description file names;
step 3, class compiling and loading
Compiling the two java classes generated in the step 2, and loading the java classes after the java classes are successfully compiled to obtain two class objects;
step 4, data control and interface binding
Performing data binding on the two class objects acquired in the step 3, and transmitting data read or written by the acquisition and setting class of control parameter data to the parameter input mode class;
step 5, interface generation
Calling the Shettable control to display parameters in the parameter description file, extracting initial values in the parameter description file, and displaying the initial values in the interface;
step 6, receiving input data of a user
6.1) popping up a corresponding parameter input window, a drop-down list or an edit box defined by the parameters according to the specific parameters clicked by the user in the interface;
6.2) receiving input data of a user through an opened parameter input window, a pull-down list or an edit box, judging whether the data input by the user is the same as the parameter value displayed on the current interface or not, judging whether the parameter is dependent on the parameter or not by the system when the data input by the user is different from the parameter value displayed on the current interface, and if the parameter is dependent on the parameter, refreshing the interface and displaying the parameter again; if no dependent parameter exists, entering step 7; if the user input data is the same as the parameter value displayed on the current interface, directly entering the step 7;
step 7, storing parameter data
And after the parameter value is input, saving operation is carried out according to a user instruction, the parameter values in the acquisition and setting classes of the control parameter data are read and written into the parameter description file, and the data are written into the parameter description file for storage.
2. The XML-based rapid parameter interface configuration method according to claim 1, wherein the specific method for editing the parameter description file in step 1 is as follows:
1.1) defining a control parameter list for solver software in an XML file, defining a root node for the solver software control parameter, and directly positioning the control parameter of the solver software in the XML file through the name of the root node; a list of control parameters of one or more solver software can be defined in an XML file;
1.2) classifying control parameters of solver software, and defining label nodes under root nodes;
1.3) defining specific parameter nodes under the label nodes.
3. The XML-based fast parameter interface configuration method according to claim 2, wherein: each parameter node in the step 1.3) comprises a parameter name, a parameter type, a parameter English name, an enumeration type parameter option, a parameter dependency relationship value, an initial value and a parameter description.
4. The XML-based fast parameter interface configuration method according to claim 1, wherein: the parameter types in the step 5.2) comprise texts, color values, path values, file values, enumeration values and one-dimensional or two-dimensional array values.
5. The XML-based fast parameter interface configuration method according to claim 4, wherein: the text is input by adopting an edit box; the color value is visually selected by adopting a color selection window; the path value is visually selected by adopting a path selection window; the file value is visually selected by adopting a file selection window; adopting a pull-down option to visually take values for enumeration; and inputting the value of the one-dimensional or two-dimensional array by adopting a rich edit box or a table window.
6. An XML-based fast parameter interface configuration method according to any one of claims 1 to 5, wherein: and 4, performing data binding on the two class objects by using the Sheettable.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011527244.7A CN112631585B (en) | 2020-12-22 | 2020-12-22 | XML-based rapid parameter interface configuration method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011527244.7A CN112631585B (en) | 2020-12-22 | 2020-12-22 | XML-based rapid parameter interface configuration method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112631585A true CN112631585A (en) | 2021-04-09 |
CN112631585B CN112631585B (en) | 2023-03-31 |
Family
ID=75320895
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011527244.7A Active CN112631585B (en) | 2020-12-22 | 2020-12-22 | XML-based rapid parameter interface configuration method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112631585B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114518906A (en) * | 2022-01-25 | 2022-05-20 | 厦门锐谷通信设备有限公司 | XML (extensive markup language) description file-based equipment configuration parameter management system and method |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020066072A1 (en) * | 2000-07-27 | 2002-05-30 | Mario Crevatin | Method and computer program for producing a regulator or controller |
US20060041879A1 (en) * | 2004-08-19 | 2006-02-23 | Bower Shelley K | System and method for changing defined user interface elements in a previously compiled program |
CN1980144A (en) * | 2005-12-09 | 2007-06-13 | 中兴通讯股份有限公司 | Method for quickly configurating large data-quantity network management data |
US20100241252A1 (en) * | 2009-03-17 | 2010-09-23 | Foxnum Technology Co., Ltd. | Parameter setting system and method for programmable logic controller |
CN102693239A (en) * | 2011-03-24 | 2012-09-26 | 北京卡达克科技中心 | Application organization method and system based on XML (extensible markup language) description and static compiling framework |
CN105824684A (en) * | 2016-01-08 | 2016-08-03 | 中国人民解放军63686部队 | Method for realizing multi-mode big data software simulator |
CN106569801A (en) * | 2016-10-18 | 2017-04-19 | 中国运载火箭技术研究院 | Complex parameter-based configuration display control system |
CN109669606A (en) * | 2018-12-19 | 2019-04-23 | 西门子传感器与通讯有限公司 | Device parameter configuration method and its system, computer readable storage medium |
-
2020
- 2020-12-22 CN CN202011527244.7A patent/CN112631585B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020066072A1 (en) * | 2000-07-27 | 2002-05-30 | Mario Crevatin | Method and computer program for producing a regulator or controller |
US20060041879A1 (en) * | 2004-08-19 | 2006-02-23 | Bower Shelley K | System and method for changing defined user interface elements in a previously compiled program |
CN1980144A (en) * | 2005-12-09 | 2007-06-13 | 中兴通讯股份有限公司 | Method for quickly configurating large data-quantity network management data |
US20100241252A1 (en) * | 2009-03-17 | 2010-09-23 | Foxnum Technology Co., Ltd. | Parameter setting system and method for programmable logic controller |
CN102693239A (en) * | 2011-03-24 | 2012-09-26 | 北京卡达克科技中心 | Application organization method and system based on XML (extensible markup language) description and static compiling framework |
CN105824684A (en) * | 2016-01-08 | 2016-08-03 | 中国人民解放军63686部队 | Method for realizing multi-mode big data software simulator |
CN106569801A (en) * | 2016-10-18 | 2017-04-19 | 中国运载火箭技术研究院 | Complex parameter-based configuration display control system |
CN109669606A (en) * | 2018-12-19 | 2019-04-23 | 西门子传感器与通讯有限公司 | Device parameter configuration method and its system, computer readable storage medium |
Non-Patent Citations (3)
Title |
---|
THOMAS BUTTER等: ""Context-aware User Interface Framework for Mobile Applications"", 《27TH INTERNATIONAL CONFERENCE ON DISTRIBUTED COMPUTING SYSTEMS WORKSHOPS (ICDCSW"07)》 * |
李建成等: ""Spring框架在图形用户界面中的应用"", 《计算机与数字工程》 * |
李敏: ""基于struts2-hibernate-spring的Java Web系统国际化设计与实现"", 《软件》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114518906A (en) * | 2022-01-25 | 2022-05-20 | 厦门锐谷通信设备有限公司 | XML (extensive markup language) description file-based equipment configuration parameter management system and method |
CN114518906B (en) * | 2022-01-25 | 2024-05-14 | 厦门锐谷通信设备有限公司 | Device configuration parameter management system and method based on XML description file |
Also Published As
Publication number | Publication date |
---|---|
CN112631585B (en) | 2023-03-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101312867B1 (en) | Markup based extensibility for user interfaces | |
US6993487B2 (en) | Software code comments management method and system supporting speech recognition technology | |
US10379817B2 (en) | Computer-applied method for displaying software-type applications based on design specifications | |
CN110968294B (en) | Business domain model establishing system and method | |
JP2009508268A (en) | Extensible XML format and object model for localization data | |
Meixner et al. | Model-driven useware engineering | |
CN108027721A (en) | For configuring the technology of general program using control | |
US20070038947A1 (en) | Method and device for generation of a parametric model associated with a 3D geometry | |
US10776351B2 (en) | Automatic core data service view generator | |
Akiki | CHAIN: Developing model-driven contextual help for adaptive user interfaces | |
CN114117645B (en) | Ship overall performance forecasting integrated application system | |
Rossi et al. | Model-based web application development | |
CN112631585B (en) | XML-based rapid parameter interface configuration method | |
US8074200B2 (en) | Method and system for providing tooling instructions through parameterization as an aid for software application development | |
Kremer | Toward a multi-user, programmable web concept mapping" shell" to handle multiple formalisms | |
Tran et al. | Generating user interface from task, user and domain models | |
CN112181483A (en) | Plasma control system software development platform and method | |
JP2007094453A (en) | Program development support system, program development support method and program | |
TW552557B (en) | Automatic program generating system and the method thereof | |
Tomić et al. | An explanation facility framework for rule-based systems | |
CN114925520A (en) | Automatic formal modeling method and system for remote sensing data processing flow | |
CN111679822A (en) | System and method for implementing a schema-based user interface presentation model | |
JP2002140653A (en) | Method and device for preparing simulation data and recording medium | |
Libes et al. | An Object-Oriented Tcl/Tk Binding for Interpreted Control of the NIST EXPRESS Toolkit in the NIST STEP Application Protocol Development Environment | |
Stroustrup | Bridging the Gap between “Strings” and the Real World |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |