CN112732643A - Method for interconversion of flow chart graphic file data and S1000D standard XML format data - Google Patents

Method for interconversion of flow chart graphic file data and S1000D standard XML format data Download PDF

Info

Publication number
CN112732643A
CN112732643A CN202110353192.4A CN202110353192A CN112732643A CN 112732643 A CN112732643 A CN 112732643A CN 202110353192 A CN202110353192 A CN 202110353192A CN 112732643 A CN112732643 A CN 112732643A
Authority
CN
China
Prior art keywords
data
flow chart
node
standard
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110353192.4A
Other languages
Chinese (zh)
Other versions
CN112732643B (en
Inventor
蒋巍
孙国防
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Guorui Xinwei Software Co ltd
Original Assignee
Nanjing Guorui Xinwei Software Co ltd
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 Nanjing Guorui Xinwei Software Co ltd filed Critical Nanjing Guorui Xinwei Software Co ltd
Priority to CN202110353192.4A priority Critical patent/CN112732643B/en
Publication of CN112732643A publication Critical patent/CN112732643A/en
Application granted granted Critical
Publication of CN112732643B publication Critical patent/CN112732643B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/11File system administration, e.g. details of archiving or snapshots
    • G06F16/116Details of conversion of file system types or formats
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/74Reverse engineering; Extracting design information from source code

Abstract

The invention discloses a method for mutually converting flow chart graphic file data and S1000D standard XML format data, which belongs to the field of intelligent data processing and comprises the following steps: (1) and analyzing the local data. (2) And updating data compared with the local cache data. (3) And verifying the data integrity. (4) And reading the local cache data. (5) The flow diagram graph implements an editing function. (6) And analyzing the data of the flow chart graphic file to be converted. (7) And converting the analyzed data of the flow chart graphic file to be converted into standard data. The traditional mode is used for compiling the fault content in a pure text mode, the compiling process is not intuitive enough, the compiling efficiency is low, the method can convert the data into the common flow chart according to the XML format data of the S1000D standard, and simultaneously can convert the flow chart graph into the flow chart XML data which accords with the S1000D standard, so that the correctness of the finally generated content is ensured.

Description

Method for interconversion of flow chart graphic file data and S1000D standard XML format data
Technical Field
The invention relates to a method for mutually converting flow chart graphic file data and S1000D standard XML format data, belonging to the technical field of intelligent data processing.
Background
The S1000D standard DM is defined in XML format. When compiling the S1000D standard manual, all DMs must eventually be saved as XML files. The fault DM data module is mainly used for writing a fault elimination process.
However, for incompletely standardized local data, the prior art does not have a method for efficiently reducing problems and errors, and most methods are complex in steps, time-consuming and labor-consuming methods, so that the accuracy rate is difficult to improve and the cost is difficult to reduce, and a method capable of eliminating errors and saving time and labor is urgently needed.
Disclosure of Invention
In order to solve the above technical problem, the present invention provides a method for interconversion between the data of the flow chart graphic file and the data in the standard XML format of S1000D, and the specific technical solution is as follows:
a method for interconversion of flowchart graphic file data and S1000D standard XML format data, comprising the steps of:
step 1: analyzing the data in the local S1000D standard XML format;
step 2: comparing the local cache data with the data in the S1000D standard XML format, and performing modification and replacement of the data to realize a data updating function;
and step 3: verifying the integrity of the standard XML format data S1000D;
and 4, step 4: reading local cache data, comparing the cache data with the data in the S1000D standard XML format if the cache data currently exists, and modifying, cutting and converting the data in the S1000D standard XML format into a flow chart for display through DOM analysis if the cache data currently does not exist;
and 5: the flow chart graph realizes an editing function;
step 6: analyzing the flow chart graphic file data to be converted;
and 7: converting the analyzed data of the flow chart graphic file to be converted into data in the S1000D standard XML format, specifically:
step 7.1: abstracting each flow graph into a concrete object through an object-oriented idea, wherein the object comprises two attributes which are a parent node and a child node of the object;
step 7.2: converting the bottom XML data of the flow chart into a Document object, respectively acquiring a starting graph and an ending graph of a connecting line by analyzing the connecting line, abstracting the starting graph and the ending graph into a concrete object, obtaining data similar to a binary tree structure type after analyzing all the connecting lines, and upwards searching and finding a starting node through any node data;
step 7.3: after initial node data are obtained, traversing the analysis nodes layer by layer downwards and converting the nodes into XML data in the S1000D standard;
step 7.4: when the data is converted into XML data of S1000D standard, an object for storing the corresponding relationship between the two data is created, and the object of the relationship is stored in the bottom data of the flow chart to mark the relationship between the XML data of S1000D standard and the bottom data of the flow chart.
Further, the specific steps of step 1 are as follows:
step 1.1: analyzing the data in the local S1000D standard XML format and converting the data into a Document object;
step 1.2: analyzing the relationship between the Element node type and the Element node into different graphic data according to different Element nodes in the Document object;
step 1.3: and editing the graphic data on the basis of the graphic data generated in the step 1.2.
Further, the step 2 specifically comprises:
step 2.1: loading local S1000D standard XML format data and the latest correctly stored cache data;
step 2.2: if the cached data is not empty, writing the cached data into a local temporary file for storage through the input output stream io, and comparing the cached data with the XML data of the S1000D standard; and if the cache data is empty, directly reading the XML data of the local S1000D standard in the editor, and writing the XML data into the local temporary file.
Further, the specific process of step 6 is as follows:
step 6.1: reading the data of the flow chart graph file to be converted, analyzing the data into a Document object, reading the flow chart node information in an editor, loading the data to the Document object according to the flow chart relative node type and the id attribute, converting the Document object into a character string and writing the Document into a temporary XML file through the io;
step 6.2: reading non-flow chart related nodes, namely nodes which cannot be displayed through the flow chart, converting the nodes into user-defined node objects, and skipping analysis of the non-flow chart related nodes and not displaying the nodes in the graph when the flow chart is drawn;
step 6.3: if the node information of the flow chart in the editor is empty or cannot form a complete flow chart loop, returning an empty file, and skipping comparison with the step 2.2 for generating the local temporary file;
step 6.4: if the flow chart node in the editor can not be analyzed into a complete flow chart and the local temporary file is not generated in the step 2.2, directly loading the empty flow chart;
step 6.5: converting the local temporary file generated in the step 2.2 into a Document object, and analyzing node data of the corresponding relation between the flow chart node and the local node in the XML;
step 6.6: a conversion step 6.1 of generating an XML file to generate a Document object, analyzing data by taking a node containing an id attribute in a flow chart node as a unit, and storing the data into a Map object by taking a K-V key value pair, wherein key is id, and V is data corresponding to the node;
step 6.7: matching the data generated in the steps 6.5 and 6.6, integrating the data with the same key and id, deleting the data in the document object in the step 6.5, copying and filling the corresponding data in the step 6.6 into the step 6.5, completing the replacement and combination of local data and cache data, converting the replaced data into character strings, and writing the character strings back to the file through an io stream;
step 6.8: and when the number of the relation data in the cache data is inconsistent with the number of the locally analyzed data, the local data is inconsistent with the flow chart data which is stored in the cache at the last time, and a user is prompted by a pop-up box to select to load the cache data file or analyze the locally produced file.
Further, step 4 starts multithreading to analyze data and draw a flowchart interface, which specifically includes:
step 4.1: creating object Application of the drawing view through a reflection mechanism;
step 4.2: initializing a main interface and a toolbar button of a loading flow chart program through a show method in Application;
step 4.3: reading the XML file through io, analyzing the XML file according to a reading mechanism in the model object to obtain different XML node names, and generating different view objects through a reflection mechanism;
step 4.4: each view object comprises a rectangular drawing area object Rectangle2D.double for positioning the drawing area, and the drawing method in the view object is as follows: the shape of the drawing view object modifies the shape color attribute of the image in the view object through drawFill, the border of the drawing view object modifies the border color attribute of the image in the method through drawStroke, and the text object in the drawing view object sets the color font attribute of the text object in the method through drawText;
step 4.5: sequentially storing the analyzed view objects into each object of a tree storage structure for storage;
step 4.6: the drawing view object is a view object stored in the drawing step 4.5 of the paintComponent component, which is rewritten by inheriting Java.swing.JComponent components which are base classes of all Swing components except a top-layer container, and is used for drawing a two-dimensional graph, and finally, the drawing method of each view object is called to finish the drawing of the flow chart.
Further, the function of editing the flow chart graphics in the step 5 is realized by function buttons in a flow chart program page, the function buttons include a common connecting line, a yes connecting line, a no connecting line, a choice connecting line, an action, a query, a procedurene assembly and a save button, the required flow chart is drawn by clicking the buttons and operating a mouse to drag different graphics and lines for drawing, and the specific process is as follows:
step 5.1: setting the type of a component needing to be drawn in the current drawing area by clicking a component button;
step 5.2: through a mouse monitoring event and a keyboard monitoring event added in the drawing area, after a component button is clicked, a mouse is operated to click a dragging operation, after the dragging monitoring event is triggered, a copy object of a view object is bound to a new function button in the current flow chart through a reflection mechanism, and the copy object is added into a flow chart component;
step 5.3: setting coordinates corresponding to the mouse into the newly added view object according to a click event of the mouse, and after the mouse is dragged, setting the offset of the mouse in the dragging event on the x axis and the offset of the mouse on the y axis to the corresponding attribute of the rectangle object in the newly added view object;
step 5.4: triggering a self-defined attribute change monitoring event, calling a rewriting drawing method of a program, and calling a step 4.4 to finish the editing function of the flow chart;
step 5.5: the common connecting line, the yes connecting line, the no connecting line and the choice connecting line are dragged by a mouse to obtain a starting graph and an ending graph, if the starting graph and the ending graph can be obtained, coordinates of a middle point are calculated through drawing areas of the two graphs, the coordinates are transmitted into a row of connecting line objects, and finally the connecting lines are drawn through the starting point coordinates by a method of drawing lines corresponding to java.
Further, the step 5 further includes editing the text content in the flowchart, and the editing method includes: the method comprises the steps of obtaining a clicked view object and a text of the object according to mouse positioning through double-click of a mouse event, adding a text input box in a drawing area of the view object, filling text content into the text box, editing data through the text box, writing the data in the text box back to the view object after the data is edited, and calling a drawing method of an entity object again to finish the text editing function of the flow chart.
Further, the multithread data parsing specifically comprises the following steps: the method comprises the steps of establishing an object of a drawing view through a reflection mechanism, realizing initialization of a main interface and a toolbar button for loading a flow chart program, analyzing XML files according to a reading mechanism in a model object to obtain different XML node names, generating different view objects through the reflection mechanism, enabling each view object to comprise a rectangular drawing area object for positioning a drawing area, sequentially storing the analyzed view objects into objects of a tree storage structure for storage, editing flow chart graphs, and drawing the required flow chart by clicking the button and operating a mouse to drag different graphs and lines.
Further, before step 1, initializing a model object, where the model object includes a program name, version information, and a read-write mechanism for parsing file data.
The invention has the beneficial effects that: the XML data can be converted into a common flow chart presentation according to the flow chart conforming to the S1000D standard. Meanwhile, the flow chart graph can be converted into flow chart XML data which conforms to the S1000D standard. The method has the advantages that the fault content is compiled in a pure text mode in the traditional mode, the compiling process is not visual enough, the compiling efficiency is low, the compiling efficiency is improved in a flow drawing mode, the correctness of the finally generated content is ensured, and the requirement of the S1000D standard is met.
Drawings
FIG. 1 is a schematic flow chart of the present invention;
FIG. 2 is a flow chart of source data for an embodiment of the present invention;
fig. 3 is a detailed flowchart of the embodiment of the present invention converted into S1000D XML standard data.
Detailed Description
The present invention will now be described in further detail with reference to the accompanying drawings.
As shown in fig. 2 and 3, the specific application of the present invention is further demonstrated by the following specific algorithms:
1. according to the steps shown in fig. 2, a flowchart icon in the editor is clicked to start the program.
2. After the program is started, judging whether the current flow chart program has cache data in the computer cache or not, and if so, judging whether the cache data exists. The cache data is loaded and converted into the Document object, so that various information of the cache data can be conveniently read.
3. After the cache data is loaded, the program will continue to determine whether the node data related to the fault class flowchart in the S1000D standard is currently included. If the relevant data is contained, the data load is converted into a Document object as in step 2.
4. If steps 2 and 3 both contain data, the program will perform data comparison and replacement according to the rule. The specific rule is shown in step 5, otherwise, the program skips the data comparison step and directly converts the node data into the data corresponding to the flow chart graph.
5. In order to facilitate the explanation of the comparison rule, the Document object after the cache data is converted is called cache data, and the Document object after the cache data is converted is called local data. The rules for comparing the cached data with the local data are as follows:
5.1. the cache data is contrast metadata and traverses the cache data from the root node downwards.
5.2. It is determined whether the node contains an id attribute.
5.3. And if the id attribute is contained, using the id attribute value as a parameter and searching the corresponding content in the local data through xpath.
5.4. And 5.3, after the corresponding data is found, deleting the data corresponding to the id in the cache data, and then adding the corresponding data in the local data to the cache data.
5.5. And 5.3, the data cannot be found, which indicates that the data quantity of the local data is inconsistent due to editing and modifying the related nodes of the flow chart. One of the data loads needs to be designated for flow chart display.
6. The process of converting the data processed in the previous step into the flowchart and the graph is not described herein again, and the logic is the same as and opposite to the direction of converting the flowchart into the standard data of S1000D, see step 8 for details.
7. Converting XML data into graphic display logic, which is described by the access 1 and query 1 graphic data in FIG. 2:
<figures>
<action id="0" x="320" y="16" w="136" h="56">
<a>
<text>
< string id ='t 1' > confirm that the main console auxiliary pump low pressure alarm continuous lamp flashes and looks over the right auxiliary pump pressure gauge </string >
</text>
</a>
</action>
<isolationStepQuestion id="2" x="288" y="104" w="184"
h="88">
<a>
<text>
< string id ='t 3' > whether the pressure gauge value is in the normal value of 0.8-1 MPa >
</text>
</a>
</isolationStepQuestion>
<isolationProcedureEnd id="4" x="40" y="200" w="240"
h="80">
<a>
<text>
< string id = "t5" > alarm failure, false alarm, check alarm system. </string >
</text>
</a>
</isolationProcedureEnd>
<action id="6" x="475" y="209" w="192" h="56">
<a>
<text>
< string id = "t7" > check right auxiliary pump, exchange left auxiliary pump and right auxiliary pump, start right unit, and check right auxiliary pump pressure gauge. </string >
</text>
</a>
</action>
7.1. Loading the XML data through a template class, generating a corresponding object through a reflection mechanism according to the names of different child nodes under configuration, converting an action node into a TextAreaFigureAction object, and converting an isolationStepQuestion node into a TextAreaFigureQuestion object.
7.2. And setting related attributes such as x, y, w and h in the nodes into the attribute rectangle2D.double of the node object, and determining a rectangular frame of the drawing. Wherein x, y correspond to the coordinates w of the graph in the program, and h is the width and height of the drawing area.
7.3, the graph corresponding to the TextAreaFigureAction is a rectangle, and the graph corresponding to the TextAreaFigureQuestion is a diamond. The shape difference between the two is that the drawing method drawing different from the class object is used for drawing dry fill (Graphics2D g), and the method calls the bottom drawing method in java.
8. In order to interconvert the flow chart data of fig. 3 with the S1000D standard data, a set of interconverting relationship data needs to be defined, namely the following data:
<relationship>
<relation id="s3">
<relationaction id="28"/>
<relationquestion id="2a"/>
</relation>
<relation id="s4">
<relationaction id="4"/>
</relation>
<relation id="s5">
<relationaction id="19"/>
</relation>
<relation id="s6">
<relationaction id="26"/>
</relation>
<relation id="s7">
<relationaction id="24"/>
</relation>
<relation id="s8">
<relationaction id="2c"/>
</relation>
<relation id="s9">
<relationaction id="2e"/>
</relation>
<relation id="s0">
<relationaction id="0"/>
<relationquestion id="2"/>
</relation>
<relation id="s1">
<relationaction id="6"/>
<relationquestion id="15"/>
</relation>
<relation id="s2">
<relationaction id="17"/>
<relationquestion id="30"/>
<relationchoice id="3d"/>
<relationchoice id="38"/>
<relationchoice id="32"/>
</relation>
</relationship>
8.1. and generating a piece of key data for maintaining two kinds of data, wherein the storage description is carried out by using relationship node data.
8.2. the id attribute of the Relationship node in Relationship corresponds to the id attribute of the failure class flow chart node isolationProcedure child node in the S1000D standard, the Relationship in the Relationship node corresponds to the action graph in the graphical interface, and the Relationship queue node corresponds to the queue graph in the graphical interface.
When the data in fig. 2 and fig. 3 are mutually converted, the data are maintained through the relationship node, and the consistency of the data in the two is realized.
Therefore, the invention can achieve the purpose of quickly converting the XML data into the flow chart and the S1000D standard. The tedious steps of data conversion in the prior art are greatly reduced, the steps are simplified, and higher productivity is provided.
In light of the foregoing description of the preferred embodiment of the present invention, many modifications and variations will be apparent to those skilled in the art without departing from the spirit and scope of the invention. The technical scope of the present invention is not limited to the content of the specification, and must be determined according to the scope of the claims.

Claims (9)

1. A method for interconversion between graphic file data of a flowchart and data in standard XML format of S1000D, comprising: the method comprises the following steps:
step 1: analyzing the data in the local S1000D standard XML format;
step 2: comparing the local cache data with the data in the S1000D standard XML format, and performing modification and replacement of the data to realize a data updating function;
and step 3: verifying the integrity of the standard XML format data S1000D;
and 4, step 4: reading local cache data, comparing the cache data with the data in the S1000D standard XML format if the cache data currently exists, and modifying, cutting and converting the data in the S1000D standard XML format into a flow chart for display through DOM analysis if the cache data currently does not exist;
and 5: the flow chart graph realizes an editing function;
step 6: analyzing the flow chart graphic file data to be converted;
and 7: converting the analyzed data of the flow chart graphic file to be converted into data in the S1000D standard XML format, specifically:
step 7.1: abstracting each flow graph into a concrete object through an object-oriented idea, wherein the object comprises two attributes which are a parent node and a child node of the object;
step 7.2: converting the bottom XML data of the flow chart into a Document object, respectively acquiring a starting graph and an ending graph of a connecting line by analyzing the connecting line, abstracting the starting graph and the ending graph into a concrete object, obtaining data similar to a binary tree structure type after analyzing all the connecting lines, and upwards searching and finding a starting node through any node data;
step 7.3: after initial node data are obtained, traversing the analysis nodes layer by layer downwards and converting the nodes into XML data in the S1000D standard;
step 7.4: when the data is converted into XML data of S1000D standard, an object for storing the corresponding relationship between the two data is created, and the object of the relationship is stored in the bottom data of the flow chart to mark the relationship between the XML data of S1000D standard and the bottom data of the flow chart.
2. The method for interconversion of flowchart graphic file data and S1000D standard XML format data according to claim 1, wherein: the specific steps of the step 1 are as follows:
step 1.1: analyzing the data in the local S1000D standard XML format and converting the data into a Document object;
step 1.2: analyzing the relationship between the Element node type and the Element node into different graphic data according to different Element nodes in the Document object;
step 1.3: and editing the graphic data on the basis of the graphic data generated in the step 1.2.
3. The method for interconversion of flowchart graphic file data and S1000D standard XML format data according to claim 2, wherein: the step 2 specifically comprises the following steps:
step 2.1: loading local S1000D standard XML format data and the latest correctly stored cache data;
step 2.2: if the cached data is not empty, writing the cached data into a local temporary file for storage through the input output stream io, and comparing the cached data with the XML data of the S1000D standard; and if the cache data is empty, directly reading the XML data of the local S1000D standard in the editor, and writing the XML data into the local temporary file.
4. The method for interconversion of flowchart graphic file data and S1000D standard XML format data according to claim 3, wherein: the specific process of the step 6 is as follows:
step 6.1: reading the data of the flow chart graph file to be converted, analyzing the data into a Document object, reading the flow chart node information in an editor, loading the data to the Document object according to the flow chart relative node type and the id attribute, converting the Document object into a character string and writing the Document into a temporary XML file through the io;
step 6.2: reading non-flow chart related nodes, namely nodes which cannot be displayed through the flow chart, converting the nodes into user-defined node objects, and skipping analysis of the non-flow chart related nodes and not displaying the nodes in the graph when the flow chart is drawn;
step 6.3: if the node information of the flow chart in the editor is empty or cannot form a complete flow chart loop, returning an empty file, and skipping comparison with the step 2.2 for generating the local temporary file;
step 6.4: if the flow chart node in the editor can not be analyzed into a complete flow chart and the local temporary file is not generated in the step 2.2, directly loading the empty flow chart;
step 6.5: converting the local temporary file generated in the step 2.2 into a Document object, and analyzing node data of the corresponding relation between the flow chart node and the local node in the XML;
step 6.6: a conversion step 6.1 of generating an XML file to generate a Document object, analyzing data by taking a node containing an id attribute in a flow chart node as a unit, and storing the data into a Map object by taking a K-V key value pair, wherein key is id, and V is data corresponding to the node;
step 6.7: matching the data generated in the steps 6.5 and 6.6, integrating the data with the same key and id, deleting the data in the document object in the step 6.5, copying and filling the corresponding data in the step 6.6 into the step 6.5, completing the replacement and combination of local data and cache data, converting the replaced data into character strings, and writing the character strings back to the file through an io stream;
step 6.8: and when the number of the relation data in the cache data is inconsistent with the number of the locally analyzed data, the local data is inconsistent with the flow chart data which is stored in the cache at the last time, and a user is prompted by a pop-up box to select to load the cache data file or analyze the locally produced file.
5. The method for interconversion of flowchart graphic file data and S1000D standard XML format data according to claim 1, wherein: step 4, starting a multithreading data analysis and drawing a flow chart interface, specifically:
step 4.1: creating object Application of the drawing view through a reflection mechanism;
step 4.2: initializing a main interface and a toolbar button of a loading flow chart program through a show method in Application;
step 4.3: reading the XML file through io, analyzing the XML file according to a reading mechanism in the model object to obtain different XML node names, and generating different view objects through a reflection mechanism;
step 4.4: each view object comprises a rectangular drawing area object Rectangle2D.double for positioning the drawing area, and the drawing method in the view object is as follows: the shape of the drawing view object modifies the shape color attribute of the image in the view object through drawFill, the border of the drawing view object modifies the border color attribute of the image in the method through drawStroke, and the text object in the drawing view object sets the color font attribute of the text object in the method through drawText;
step 4.5: sequentially storing the analyzed view objects into each object of a tree storage structure for storage;
step 4.6: the drawing view object is a view object stored in the drawing step 4.5 of the paintComponent component, which is rewritten by inheriting Java.swing.JComponent components which are base classes of all Swing components except a top-layer container, and is used for drawing a two-dimensional graph, and finally, the drawing method of each view object is called to finish the drawing of the flow chart.
6. The method for interconversion of flowchart graphic file data and S1000D standard XML format data according to claim 1, wherein: step 5 the flow chart graphics editing function is realized by function button in the flow chart program page, and function button includes ordinary connecting wire, yes connecting wire, no connecting wire, choice connecting wire, action, comment, procedurene end subassembly and saves the button, draws required flow chart through clicking these buttons and operating mouse drag different figures of drawing and lines, and specific process is:
step 5.1: setting the type of a component needing to be drawn in the current drawing area by clicking a component button;
step 5.2: through a mouse monitoring event and a keyboard monitoring event added in the drawing area, after a component button is clicked, a mouse is operated to click a dragging operation, after the dragging monitoring event is triggered, a copy object of a view object is bound to a new function button in the current flow chart through a reflection mechanism, and the copy object is added into a flow chart component;
step 5.3: setting coordinates corresponding to the mouse into the newly added view object according to a click event of the mouse, and after the mouse is dragged, setting the offset of the mouse in the dragging event on the x axis and the offset of the mouse on the y axis to the corresponding attribute of the rectangle object in the newly added view object;
step 5.4: triggering a self-defined attribute change monitoring event, calling a rewriting drawing method of a program, and calling a step 4.4 to finish the editing function of the flow chart;
step 5.5: the common connecting line, the yes connecting line, the no connecting line and the choice connecting line are dragged by a mouse to obtain a starting graph and an ending graph, if the starting graph and the ending graph can be obtained, coordinates of a middle point are calculated through drawing areas of the two graphs, the coordinates are transmitted into a row of connecting line objects, and finally the connecting lines are drawn through the starting point coordinates by a method of drawing lines corresponding to java.
7. The method for interconversion of flowchart graphic file data and S1000D standard XML format data according to claim 1, wherein: the step 5 further includes editing the text content in the flowchart, and the editing method includes: the method comprises the steps of obtaining a clicked view object and a text of the object according to mouse positioning through double-click of a mouse event, adding a text input box in a drawing area of the view object, filling text content into the text box, editing data through the text box, writing the data in the text box back to the view object after the data is edited, and calling a drawing method of an entity object again to finish the text editing function of the flow chart.
8. The method for interconversion of flowchart graphic file data and S1000D standard XML format data according to claim 6, wherein: the specific steps of the multithread data analysis are as follows: the method comprises the steps of establishing an object of a drawing view through a reflection mechanism, realizing initialization of a main interface and a toolbar button for loading a flow chart program, analyzing XML files according to a reading mechanism in a model object to obtain different XML node names, generating different view objects through the reflection mechanism, enabling each view object to comprise a rectangular drawing area object for positioning a drawing area, sequentially storing the analyzed view objects into objects of a tree storage structure for storage, editing flow chart graphs, and drawing the required flow chart by clicking the button and operating a mouse to drag different graphs and lines.
9. The method for interconversion of flowchart graphic file data and S1000D standard XML format data according to claim 1, wherein: before step 1, initializing a model object, wherein the model object comprises a program name, version information and a read-write mechanism for analyzing file data.
CN202110353192.4A 2021-04-01 2021-04-01 Method for interconversion of flow chart graphic file data and S1000D standard XML format data Active CN112732643B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110353192.4A CN112732643B (en) 2021-04-01 2021-04-01 Method for interconversion of flow chart graphic file data and S1000D standard XML format data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110353192.4A CN112732643B (en) 2021-04-01 2021-04-01 Method for interconversion of flow chart graphic file data and S1000D standard XML format data

Publications (2)

Publication Number Publication Date
CN112732643A true CN112732643A (en) 2021-04-30
CN112732643B CN112732643B (en) 2021-07-20

Family

ID=75596275

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110353192.4A Active CN112732643B (en) 2021-04-01 2021-04-01 Method for interconversion of flow chart graphic file data and S1000D standard XML format data

Country Status (1)

Country Link
CN (1) CN112732643B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116127922A (en) * 2023-04-19 2023-05-16 北京路浩知识产权集团有限公司 Intellectual property file processing method and device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140195891A1 (en) * 2013-01-04 2014-07-10 Cognizant Technology Solutions India Pvt. Ltd. System and method for automatically extracting multi-format data from documents and converting into xml
CN104049959A (en) * 2013-03-15 2014-09-17 苏州精易会信息技术有限公司 Method for converting flow chart into executable language
CN106651992A (en) * 2016-11-18 2017-05-10 武汉斗鱼网络科技有限公司 Method and system for optimizing Android resource picture
CN106649428A (en) * 2016-08-09 2017-05-10 广州视睿电子科技有限公司 Analyzing method and apparatus of storage files
CN107145540A (en) * 2017-04-24 2017-09-08 北京邮电大学 The diagram file textual conversion equipment and method of the version control function of class uml diagram
CN107423270A (en) * 2017-07-27 2017-12-01 国云科技股份有限公司 The implementation method that a kind of online flow chart and code mutually turn in real time
CN107632831A (en) * 2017-09-22 2018-01-26 厦门集微科技有限公司 The method and device of Express specification front-end code
CN110750254A (en) * 2019-10-18 2020-02-04 浪潮云信息技术有限公司 Flowchart editor implementation method based on Angular
CN111241349A (en) * 2019-12-31 2020-06-05 中国电力科学研究院有限公司 Wiring diagram data display method and system based on graph conversion

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140195891A1 (en) * 2013-01-04 2014-07-10 Cognizant Technology Solutions India Pvt. Ltd. System and method for automatically extracting multi-format data from documents and converting into xml
CN104049959A (en) * 2013-03-15 2014-09-17 苏州精易会信息技术有限公司 Method for converting flow chart into executable language
CN106649428A (en) * 2016-08-09 2017-05-10 广州视睿电子科技有限公司 Analyzing method and apparatus of storage files
CN106651992A (en) * 2016-11-18 2017-05-10 武汉斗鱼网络科技有限公司 Method and system for optimizing Android resource picture
CN107145540A (en) * 2017-04-24 2017-09-08 北京邮电大学 The diagram file textual conversion equipment and method of the version control function of class uml diagram
CN107423270A (en) * 2017-07-27 2017-12-01 国云科技股份有限公司 The implementation method that a kind of online flow chart and code mutually turn in real time
CN107632831A (en) * 2017-09-22 2018-01-26 厦门集微科技有限公司 The method and device of Express specification front-end code
CN110750254A (en) * 2019-10-18 2020-02-04 浪潮云信息技术有限公司 Flowchart editor implementation method based on Angular
CN111241349A (en) * 2019-12-31 2020-06-05 中国电力科学研究院有限公司 Wiring diagram data display method and system based on graph conversion

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MARTIN NEČASKÝ等: "Reverse engineering of XML schemas to conceptual diagrams", 《APCCM"09: PROCEEDINGS OF THE SIXTH ASIA-PACIFIC CONFERENCE ON CONCEPTUAL MODELING》 *
陈飞: "基于S1000D规范的IETM关键技术研究", 《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116127922A (en) * 2023-04-19 2023-05-16 北京路浩知识产权集团有限公司 Intellectual property file processing method and device
CN116127922B (en) * 2023-04-19 2023-07-04 北京路浩知识产权集团有限公司 Intellectual property file processing method and device

Also Published As

Publication number Publication date
CN112732643B (en) 2021-07-20

Similar Documents

Publication Publication Date Title
US5752245A (en) Object-oriented system for configuration history management with a project workspace and project history database for draft identification
US7340745B2 (en) Systems and methods for mapping API calls
US5659735A (en) Object-oriented system for program version and history database management system for various program components
US5553282A (en) Software project history database and method of operation
US7196712B2 (en) Dynamic, live surface and model elements for visualization and modeling
US6986120B2 (en) System and apparatus for programming system views in an object oriented environment
EP1679587A1 (en) Object model tree diagram
CN108762743B (en) Data table operation code generation method and device
JP2008509477A (en) Document processing and management method for reflecting changes in one expression of a document in another expression
JP2006107478A (en) Extensible flamework for designing work flow
JPWO2006085455A1 (en) Document processing apparatus and document processing method
JPWO2006051715A1 (en) Document processing apparatus and document processing method
JP2007534045A (en) Apparatus for processing documents using a markup language
US20090132906A1 (en) Document processing device and document processing method
JPWO2006051713A1 (en) Document processing apparatus and document processing method
US20070061349A1 (en) Hierarchically describing shapes
CN112732643B (en) Method for interconversion of flow chart graphic file data and S1000D standard XML format data
JPWO2007081017A1 (en) Document processing device
US9250925B2 (en) Adding inheritance support to a computer programming language
JPWO2006051712A1 (en) Document processing apparatus and document processing method
JPWO2006051716A1 (en) Document processing apparatus and document processing method
US20080320412A1 (en) Document Processing Device and Document Processing Method
US20090235156A1 (en) Document processing device and document processing method
JP4724387B2 (en) Program conversion program, program conversion apparatus, and program conversion method
US20100077295A1 (en) Document processing device and document processing module

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
CB03 Change of inventor or designer information

Inventor after: Jiang Wei

Inventor after: Wu Hongqin

Inventor after: Wang Can

Inventor after: Sun Guofang

Inventor after: Yan Xiaoming

Inventor before: Jiang Wei

Inventor before: Sun Guofang

CB03 Change of inventor or designer information