CN107145540A - The diagram file textual conversion equipment and method of the version control function of class uml diagram - Google Patents
The diagram file textual conversion equipment and method of the version control function of class uml diagram Download PDFInfo
- Publication number
- CN107145540A CN107145540A CN201710269647.8A CN201710269647A CN107145540A CN 107145540 A CN107145540 A CN 107145540A CN 201710269647 A CN201710269647 A CN 201710269647A CN 107145540 A CN107145540 A CN 107145540A
- Authority
- CN
- China
- Prior art keywords
- file
- diagram
- intermediate file
- information
- graphiti
- 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.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/258—Data format conversion from or to a database
Abstract
Diagram file textual conversion equipment and method in a kind of version control function for supporting class uml diagram, text conversion equipment are provided with:Diagram file uniform format converter, link process device, modal processor, version control information processor and platform relevant information processor totally five building blocks, it is using a kind of method for expressing for innovating general class UML diagram body of an instrument, different types of diagram file is carried out after abstract processing, different types of diagram file is stated with intermediate file (a kind of chart descriptor format of textual), so as to realize the mutual conversion between the class uml diagram list file of multi-platform multiple types and intermediate file, so that developer need not repeat the adaptation work of server end, reduce the degree of coupling of version control server and diagram file, improve development efficiency.
Description
Technical field
The new technology of class uml diagram is stored in the form of textual the present invention relates to a kind of, exactly, is related to a kind of branch
The diagram file textual conversion equipment and method of the version control function of class uml diagram are held, belongs to the technology of Data Format Transform
Field.
Background technology
Introduce and define first relevant technical terms used in technical solution of the present invention:
Unitive search (Unified Modeling Language) be it is a kind of can be by the design of system with one
The language that the programming that the visual form of the standard of kind is showed is used.UML is to be accorded with by UML representations for figure
Number and text grammer use provide standard.
Class uml diagram be constituted based on the graphical symbol in UML, for the figure in interaction design and demand analysis
Table, such as exemplary plot, vision dictionary, line frame graph.Both differences of class uml diagram and uml diagram in the present invention are:Uml diagram is main
For system modelling, and class uml diagram is then to have used UML graphical symbol, be exclusively used in interaction design and feasibility analysis procedure
Chart.
Version control function be typically for file provide version submission, version rollback function.And be then in the present invention
Refer in particular to the Version Control of diagram file, i.e., using the graphical nodes in class uml diagram as minimum particle size, for complete the submission of version with
Retract, and during the submission of version, merging, collision detection between support chart, the function of comparison in difference.
Diagram file textual represents it is to be indicated class uml diagram in the form of textual, for back-end server pair
It carries out the processing of version control function.
JSON (JavaScript Object Notation) is a kind of data interchange format of lightweight, is also a kind of text
This form, is based on c-family pacts known to programmer including C, C++, C#, java, JavaScript, Perl,
Many programming languages such as Python, so that it turns into preferable data interchange language.JSON is set up in name/value pair
In two structures of set and value list, data storage is carried out in the form of key-value pair.
Graphiti is a Open Framework on Eclipse platform, supports quickly one bar chart editor of exploitation.This hair
Bright technical scheme is implemented and verified using Graphiti frameworks.
In the mobile Internet epoch, many application software products are all using the exploitation of iteratively faster formula, the change of version
It is very frequent.Therefore, during exploitation, substantial amounts of different designs version can be produced, interaction design personnel are had to him
The diagram file of people's design is frequently changed.And from unlike program code developer, in the market does not have also so far
A Version Control software specifically designed for graphical diagrams document, this adds increased the management cost of interaction design personnel and communication
Cost.Program code developer can be used such as distributed version control system Git, open source code version control system
The Version Control softwares such as SVN (i.e. Subversion abbreviation), to the project implementation submission of many people's joint developments, merging, retract
Or the processing operation of conflict.Similar, interaction design personnel are also required to a Version Control software for interaction design chart,
Each graphic element is minimum particle size using in chart, submission, merging, the processing behaviour for retracting or conflicting for completing diagram file
Make, handled automatically so as to the chart of being drawn several designers, completed under several designer's cooperations
Version Control task, just can greatly reduce the management cost of interaction design personnel like that, improve designer and assist mutually
The efficiency of work, and then shorten the design cycle, accelerate the speed that product is reached the standard grade.
Although UML drawing tools different at present have the storage mode of oneself, also no a kind of unification so far
Textual represents standard.Therefore, version control server is in the processing for class uml diagram, just has to be adapted to numerous
Class uml diagram method for expressing, cause the repetitive rate of code high, inefficiency.So developing a kind of support class uml diagram as early as possible
Version control function diagram file textual conversion equipment and method, just turn into that scientific and technical personnel one in the industry are urgent to be appointed
Business.
The content of the invention
In view of this, it is an object of the invention to provide a kind of diagram file text of version control function for supporting class uml diagram
This change conversion equipment and method, it is not apposition under suitable for multi-platform, multiple types UML drawing tool environment that the present invention, which is,
The class uml diagram of formula provides the unified apparatus and method mutually changed with intermediate file in the diagram file of Graphiti frameworks,
So that developer need not repeat the adaptation work of server end;Textual conversion equipment and the side of the present invention need to only be used
Method so that Graphiti frameworks can access chart version control system, using the Version Control service of chart, so as to reduce version
The degree of coupling of this control server and specific graph representation file, reduces the workload of application developer, effectively improves application
The efficiency of business development.
In order to achieve the above object, the invention provides a kind of diagram file for the version control function for supporting class uml diagram
Textual conversion equipment, it is characterised in that:Text conversion equipment is using a kind of general class UML diagram body of an instrument
Method for expressing, is carried out after abstract processing to different types of diagram file, with intermediate file, i.e., the chart of a kind of textual is described
Form states different types of diagram file, so as to realize between the class uml diagram list file of multi-platform multiple types and intermediate file
Mutual conversion so that developer need not repeat the adaptation work of server end, reduction version control server and figure
The degree of coupling of list file, improves development efficiency;The device is provided with:Diagram file uniform format converter, link process device, node
Processor, version control information processor and platform relevant information processor totally five building blocks;Wherein:Diagram file form
Unified converter is responsible for performing most basic form conversion preprocessing process:By the extensible markup language of Graphiti chart formats
Speech XML (Extensible Markup Language) file be converted into intermediate file, i.e. JSON formatted files, be it is follow-up other
Part provides the data input of unified form;Link process device is responsible for the line form modifying of diagram file is middle literary to meet
The link information of part form;Modal processor is responsible for being revised as meeting by the node format of diagram file the section of intermediate file format
Point information;It is to meet intermediate file lattice that version control information processor, which is responsible for the related control information form modifying of Version Control,
The control information of formula;Platform relevant information processor is responsible for performing replacement operation to the special key words in Graphiti platforms.
In order to achieve the above object, present invention also offers the chart in a kind of version control function for supporting class uml diagram
The method of work of body of an instrument conversion equipment, it is characterised in that:In the forward direction from Graphiti diagram files to intermediate file
In transfer process, including following operative step:
Step 1, diagram file uniform format converter reads in original Graphiti diagram files, and original diagram file is pre-
Processing is converted to intermediate file, and the chart letter of JSON key-value pair forms will be revised as with the chart-information of XML tag form
After the intermediate file of breath, link information processor is output to;
Step 2, link information processor receives the intermediate file for completing tentatively to change, wherein all line letters of traversal
Breath, obtains the Origin And Destination of all lines, the node identification ID of Origin And Destination is stitched together, with " starting point ID- terminals
Line ID and is stored in the link information of the intermediate file by ID " form again as the ID of each line, and generation possesses
After the intermediate file of link information, export and give nodal information processor;
Step 3, nodal information processor receives the intermediate file for having generated link information, and all nodes are carried out
After breadth first traversal, the domain model data for obtaining node, the instance name in the domain model is stored in intermediate file
In " link " key of JSON objects, to protect the domain model data in Graphiti diagram files;Then the company of node is handled
Line:Obtain all of each node to go out line and to enter line, the line ID that link information processor is generated is inserted in this again
Between the nodal information of file go out line and enter line storage region, generation possesses the intermediate file of nodal information, then export to
Version control information processor;
Step 4, version control information processor receives the intermediate file for having generated nodal information, extracts figure therein
It is stored in the version control information of the intermediate file by table editor, edit session again as version control information, raw
Into after the intermediate file for possessing version control information, export and give platform relevant information processor;
Step 5, platform relevant information processor receives the intermediate file of build version control information, in the middle of this
In the object for the JSON formatted files that file is generated in flow path switch include " children ",
“graphicsAlgorithm”、“pi:Diagram”、“xmi:XMI " and " link " all keywords are carried out replacement operation,
" node ", " style ", "-diagram ", " description " and " navi " is replaced with respectively, avoided and Version Control system
The keyword used during system server parsing is clashed;So far complete particular diagram file being converted into the complete of intermediate file
Portion is operated, and generation possesses the intermediate file of complete information, is input in version control system server, is performed with completing version control
The operation of system.
In order to achieve the above object, invention further provides the chart in a kind of version control function for supporting class uml diagram
The method of work of body of an instrument conversion equipment, it is characterised in that:From intermediate file to the reverse of Graphiti diagram files
In transfer process, including following operative step:
Step 1, after the reading of platform relevant information processor is handled via the completion of version control system server, visitor is returned to
The intermediate file for possessing complete information at family end, the object for the JSON formatted files that the intermediate file is generated in flow path switch
In include all keywords of " node ", " style ", "-diagram ", " description " and " navi ", it is all right respectively
" children ", " graphicsAlgorithm ", " pi should be replaced with:Diagram”、“xmi:XMI " and " link ", it is ensured that
Graphiti platforms can correctly parse diagram file, ultimately generate with the original chart format storage platform correlation letters of Graphiti
The intermediate file of breath, and it is sent to version control information processor progress subsequent treatment;
Step 2, version control information processor receives the intermediate file for having completed keyword replacement, obtains therein
The information whether whether editor, edit session, chart element clash, merge, and to its information format at
Reason, is revised as meeting after the tabular version control information of Graphiti original graphs, is generated with the original charts of Graphiti
The intermediate file of form storage version control information, then export give modal processor carry out subsequent treatment;
Step 3, nodal information processor preferentially performs range time to all nodes in the intermediate file that receives first
Go through, conversion process is carried out to wherein each nodal information form, is revised as meeting the tabular section of Graphiti original graphs
Point information:The line mark ID for going out line and entering in line is first changed to the line ID shapes in Graphiti format sheet files
Formula, then the link model data to be used in current node generation Graphiti formatted files, ultimately generate with
The intermediate file of the original chart format memory node information of Graphiti, exports and gives link information processor;
Step 4, link information processor travels through all lines therein to the intermediate file received, and to every line
Information format carries out conversion process, is revised as meeting the tabular link information of Graphiti original graphs, i.e., by its starting point
Replacement is performed with the value of terminal, the hierarchy description information of node is replaced with by the ID of node, is ultimately generated original with Graphiti
After the intermediate file of chart format storage link information, export and give diagram file uniform format converter;
Step 5, when diagram file uniform format converter receives the intermediate file, to wherein including with Graphiti
The input content of platform relevant information, version control information, nodal information and link information that chart format is stored all is converted into
For XML file, the intermediate file format overall transformation that will include complete information is the original diagram file forms of Graphiti,
With all operationss for the diagram file for completing intermediate file being converted into specific form, finally by the original charts of the Graphiti
All graphic elements in file are intuitively shown in client.
The present invention supports diagram file textual conversion equipment and its conversion method in the version control function of class uml diagram
Innovative technology advantage and effect be:
Version control system server is handled the diagram file that textual is represented using intermediate file so that version
Control system server need not be adapted to the diagram file of a variety of different platforms, reduce the coupling between server and diagram file
Degree, decreases the code redundancy of server end.All parts function phase in diagram file textual conversion equipment of the present invention
Mutual correlation and mutually independence, with stronger application flexibility, moreover, structure composition is simple and practical, it is easy to realize.The chart
The textual conversion method of body of an instrument conversion equipment ensure that after diagram file is converted into intermediate file, reconvert
When returning original diagram file, the information of original diagram file is not lost;And vice versa.The operating procedure of this method is also letter
Single convenient, practical, prospect of the invention is expected to be widely applied.
Brief description of the drawings
Fig. 1 is the version control system overall structure composition schematic diagram of existing unused intermediate file.
Fig. 2 is version control system overall structure composition schematic diagram of the present invention using intermediate file.
Fig. 3 is the structure group of the diagram file textual conversion equipment for the version control function that the present invention supports class uml diagram
Into schematic diagram.
When Fig. 4 is the method for work interaction of the conversion diagram file textual of diagram file textual conversion equipment of the present invention
Sequence figure.
Fig. 5 is the positive process picture sheet file translation activity figure of textual conversion equipment conversion method of the present invention.
Fig. 6 is the reverse process diagram file translation activity figure of textual conversion equipment conversion method of the present invention.
Fig. 7 is one embodiment of the invention schematic diagram.
Embodiment
To make the object, technical solutions and advantages of the present invention clearer, with reference to the accompanying drawings and examples to the present invention
It is described in further detail.
The innovation main points of the present invention are to introduce a kind of textual method for expressing of general class uml diagram list file, that is,
Different types of diagram file is subjected to abstract processing, innovation proposes a kind of chart descriptor format of textual, i.e. intermediate file,
Then different types of diagram file is stated using the descriptor format.
The diagram file textual conversion equipment and its conversion method of the present invention, can be applied to different types of chart
The processing procedure that file is mutually changed with intermediate file.
Referring to Fig. 3, the general structure composition of diagram file textual conversion equipment of the present invention is introduced, and its to Graphiti
Diagram file is by generating flow and method that intermediate file is changed.It should be noted that Fig. 3 and other accompanying drawings are all provided
It is positive process from Graphiti diagram files to the transfer process of intermediate file, intermediate file is to Graphiti diagram files
Transfer process is reverse process.
Textual conversion equipment of the present invention is provided with 5 different building blocks:Diagram file uniform format converter, line
Processor, modal processor, version control information processor, platform relevant information processor;Each part is independently handled
Respective corresponding function.Wherein, diagram file uniform format converter provides most basic form transfer process, by Graphiti
Expandable mark language XML (Extensible Markup Language) file of chart format is converted into intermediate file, i.e.,
JSON formatted files, the data input of unified form is provided for follow-up miscellaneous part.Link process device is responsible for diagram file
Line form modifying is the link information for meeting intermediate file format.Modal processor is responsible for repairing the node format of diagram file
It is changed to meet the nodal information of intermediate file format, and the nodal information of the different diagram files of respective handling, by its uniform format
It is revised as meeting the nodal information of specific intermediate file format.Version control information processor is responsible for the related control of Version Control
Information format processed is revised as meeting the control information of intermediate file format.Platform relevant information processor is responsible for flat to Graphiti
Special key words in platform perform replacement operation.Wherein:
Diagram file uniform format converter, is responsible for providing the process of most basic form conversion (or being pretreatment),
The data input of unified form is provided for follow-up part, entered Graphiti chart formats and intermediate file format for performing
The function that row is mutually changed:Each tag format information in Graphiti charts is revised as to the information of key-value pair form, i.e.,
Be converted to the chart data of intermediate file format;There is service logic because the transfer process does not include, therefore there must be other parts
Coordinate, it is ensured that information integrity and format specification in whole transfer process;During forward conversion, its input is
Graphiti diagram files, are output as the intermediate file for not possessing complete information;And in reverse transformational process, it is inputted as tool
The intermediate file of standby complete information, is output as Graphiti diagram files.
Link process device, be responsible for traversal diagram file uniform format converter complete processing, do not possess complete information
The label substance of link information in intermediate file, obtains the Origin And Destination of all lines, by its form modifying in meeting
Between after file format, then the starting point of line, endpoint information be stored in the respective labels of this document again;In forward conversion mistake
Cheng Zhong, it is the intermediate file for not possessing complete information that it, which is inputted, is output as the intermediate file with link process information;And inverse
Into transfer process, it is the intermediate file for possessing complete information that it, which is inputted, is output as intermediate file and with original diagram file lattice
The link information of formula storage.
Modal processor, be responsible for by level travel through link process device complete it is handling, with link process information
Between each nodal information in file label substance, the hierarchical relationship of all nodes is obtained and comprising nest relation, by its lattice
Formula is revised as meeting after intermediate file format, then with comprising nested relation the level between node is stored in into this document again
In respective labels;During forward conversion, it is the intermediate file with link process information that it, which is inputted, is output as carrying node
Level and the intermediate file for including nest relation information;And in reverse transformational process, it inputs to possess in complete information
Between file, be output as intermediate file and with original diagram file form store nodal information.
Version control information processor, for handling the editor that includes chart during Version Control, edit session
Control information:After version control information is extracted, it is stored in setting label in file;During forward conversion, its
Input with node level and to include the intermediate file of nest relation information, be output as with version control information in the middle of text
Part;And in reverse transformational process, it is the intermediate file for possessing complete information that it, which is inputted, intermediate file is output as and with original graph
The version control information of list file form storage.
Platform relevant information processor, for the special key words in Graphiti platforms to be performed into replacement operation, is prevented
Version control system server is clashed when extracting the keyword;During forward conversion, it is with version that it, which is inputted,
The intermediate file of control information, is output as the intermediate file by filing processing, that is, possesses the intermediate file of complete information;And it is inverse
Into transfer process, it is the intermediate file for possessing complete information that it, which is inputted, is output as intermediate file and by processing, with original graph
The customizing messages of sheet format storage.
Referring to Fig. 4, turn the figure shows the diagram file textual that diagram file textual conversion equipment of the present invention is performed
The sequential that the process and various operations for changing the text conversion interaction of method are performed.With reference to two accompanying drawings, this hair is introduced respectively
Forward conversion process of the bright diagram file textual conversion equipment from Graphiti diagram files to intermediate file and by middle text
Specific steps from part to two operating process of the reverse transformational process of Graphiti diagram files.
Referring to Fig. 5, the diagram file conversion operation step during diagram file forward conversion is introduced:
Step 1, diagram file uniform format converter reads in original Graphiti diagram files, and original diagram file is pre-
Processing is converted to intermediate file, and the chart letter of JSON key-value pair forms will be revised as with the chart-information of XML tag form
After the intermediate file of breath, link information processor is output to.In step 1, this is by the chart-information with XML tag form
The operation for being revised as the intermediate file process of the chart-information of JSON key-value pair forms is one-to-one:Mark in XML file
It is " key " in JSON files to sign corresponding conversion;Tag attributes in XML file are converted to the object in JSON files, but to add
Plus "@" symbol is as the prefix of " key ", to distinguish the attribute in XML file;Subtab corresponding conversion in XML file turns into
Son " key " in JSON.
Step 2, link information processor receives the intermediate file for completing tentatively to change, wherein all line letters of traversal
Breath, obtains the Origin And Destination of all lines, the node identification ID of Origin And Destination is stitched together, with " starting point ID- terminals
Line ID and is stored in the link information of the intermediate file by ID " form again as the ID of each line, and generation possesses
After the intermediate file of link information, export and give nodal information processor.
Step 3, nodal information processor receives the intermediate file for having generated link information, and all nodes are carried out
After breadth first traversal, the domain model data for obtaining node, the instance name in the domain model is stored in intermediate file
In " link " key of JSON objects, to protect the domain model data in Graphiti diagram files.Then the company of node is handled
Line:Obtain all of each node to go out line and to enter line, the line ID that link information processor is generated is inserted in this again
Between the nodal information of file go out line and enter line storage region, generation possesses the intermediate file of nodal information, then export to
Version control information processor;
Step 4, version control information processor receives the intermediate file for having generated nodal information, extracts figure therein
Table editor, edit session is stored in the version control information of the intermediate file again as version control information, and by it,
Generation possesses after the intermediate file of version control information, exports and gives platform relevant information processor.
Step 5, platform relevant information processor receives the intermediate file of build version control information, in the middle of this
In the object for the JSON formatted files that file is generated in flow path switch include " children ",
“graphicsAlgorithm”、“pi:Diagram”、“xmi:XMI " and " link " all keywords are carried out replacement operation,
" node ", " style ", "-diagram ", " description " and " navi " is replaced with respectively, avoided and Version Control system
The keyword used during system server parsing is clashed;So far complete particular diagram file being converted into the complete of intermediate file
Portion is operated, and generation possesses the intermediate file of complete information, is input in version control system server, is continued executing with completing version
The operation of this control.
Referring to Fig. 6, the diagram file conversion operation step during diagram file reverse conversion is introduced:
Step 1, after the reading of platform relevant information processor is handled via the completion of version control system server, visitor is returned to
The intermediate file for possessing complete information at family end, the object for the JSON formatted files that the intermediate file is generated in flow path switch
In include all keywords of " node ", " style ", "-diagram ", " description " and " navi ", it is all right respectively
" children ", " graphicsAlgorithm ", " pi should be replaced with:Diagram”、“xmi:XMI " and " link ", it is ensured that
Graphiti platforms can correctly parse diagram file, ultimately generate with the original chart format storage platform correlation letters of Graphiti
The intermediate file of breath, and it is sent to version control information processor progress subsequent treatment.
Step 2, version control information processor receives the intermediate file for having completed keyword replacement, obtains therein
The information whether whether editor, edit session, chart element clash, merge, and to its information format at
Reason, is revised as meeting after the tabular version control information of Graphiti original graphs, is generated with the original charts of Graphiti
The intermediate file of form storage version control information, then export give modal processor carry out subsequent treatment.
Step 3, nodal information processor preferentially performs range time to all nodes in the intermediate file that receives first
Go through, conversion process is carried out to wherein each nodal information form, is revised as meeting the tabular section of Graphiti original graphs
Point information:The line mark ID for going out line and entering in line is first changed to the line ID shapes in Graphiti format sheet files
Formula (as "/0/@connections.0 ");Again the link model used in Graphiti formatted files is generated for current node
Data (as "/0/ children.0/ link "), ultimately generate with the original chart format memory node information of Graphiti
Intermediate file, exports and gives link information processor.
Step 4, link information processor travels through all lines therein to the intermediate file received, and to every line
Information format carries out conversion process, is revised as meeting the tabular link information of Graphiti original graphs, i.e., by its starting point
Replacement is performed with the value of terminal, the hierarchy description information of node is replaced with by the ID of node, is ultimately generated original with Graphiti
After the intermediate file of chart format storage link information, export and give diagram file uniform format converter.
Step 5, when diagram file uniform format converter receives the intermediate file, to wherein including with Graphiti
The input content of platform relevant information, version control information, nodal information and link information that chart format is stored all is converted into
For XML file, the intermediate file format overall transformation that will include complete information is the original diagram file forms of Graphiti,
With all operationss for the diagram file for completing intermediate file being converted into specific form, finally by the original charts of the Graphiti
All graphic elements in file are intuitively shown in client.
The present invention is carried out experiment via applicant in class UML diagram version control system, whole experiment system
The framework of system includes the graph making client based on Graphiti and the server of version control system.User is in the client
Class UML interaction design chart is drawn, Graphiti diagram file is converted into the intermediate file of the present invention by client, and
The intermediate file is sent to the server of version control system, system server identifies node and company in intermediate file
Line, using the intermediate file as a version newly submitted, and two versions of the legacy version with having previously filed are compared
Relatively match, after obtaining a result, return again to client, then result is parsed by client, and by the intermediate file of return
Graphiti diagram file is converted into, result is presented to user.The test example of the present invention is with the exhibition of Fig. 6 institutes
The illustration shown realizes the transfer process of intermediate file as case.
Referring to Fig. 7, another embodiment of the present invention schematic diagram is introduced:First by the original Graphiti charts text of the embodiment
Part uniform format is converted to the form of the intermediate file defined, i.e. JSON formatted files, then reprocesses the company of User nodes
Line and nodal information, it is inserted in the file of intermediate file format again.Wherein, the processing of link information includes three category
Property:Unique identifier conn_id, line starting end start and the line of line terminate to hold end.With User to Usercase1's
Exemplified by line, the unique identifier of the line is defined as the unique identifier of the end node of line two, is connected with " # " in the middle of it,
As User-1479436921903#Usecase-1479437120712, line starting end User unique identifier is
User-1479436921903, line terminates to hold Usercase1 unique identifier to be Usecase-1479437120712.Its
Remaining link information is by that analogy.Then the processing of nodal information is carried out, the processing of nodal information is also comprising three attributes:Node
Unique identifier shape_id, go out line outgoingConnections and enter line incomingConnections.With
Exemplified by User nodes, the node does not enter line, but has three to go out line, goes out method for expressing of the method for expressing with line of line
It is identical, it is the unique identifier of the end node of line two, middle " # " is connected, i.e. the line that goes out of User to Usercase1 is meant that
For User-1479436921903#Usecase-1479437120712.The information of remaining node is all by that analogy.Again in life
Into intermediate file in add editor author and the edit session of the upper diagram file, carry out Version Control, finally will middle text
Each keyword " children ", " graphicsAlgorithm ", " pi in part:Diagram”、“xmi:XMI " and " link "
Replacement is corresponded to respectively to be rewritten as after " node ", " style ", "-diagram ", " description " and " navi ", just completes complete
Portion's transfer process, what is ultimately generated is to meet pre-defined intermediate file format.
In a word, the experimental result of embodiment is successful, realizes goal of the invention.
Claims (9)
1. the diagram file textual conversion equipment in a kind of version control function for supporting class uml diagram, it is characterised in that:This article
This change conversion equipment uses a kind of method for expressing of general class UML diagram body of an instrument, to different types of diagram file
Carry out after abstract processing, with intermediate file, i.e., the chart descriptor format of a kind of textual states different types of diagram file, from
And the mutual conversion between the class uml diagram list file of multi-platform multiple types and intermediate file is realized, so that developer is without weight
The degree of coupling of the adaptation work at multiple execute server end, reduction version control server and diagram file, improves development efficiency;Should
Device is provided with:Diagram file uniform format converter, link process device, modal processor, version control information processor peace
Platform relevant information processor totally five building blocks;Wherein:
Diagram file uniform format converter is responsible for performing most basic form conversion preprocessing process:By Graphiti chart lattice
Expandable mark language XML (Extensible Markup Language) file of formula is converted into intermediate file, i.e. JSON lattice
Formula file, the data input of unified form is provided for follow-up miscellaneous part;Link process device is responsible for the line lattice of diagram file
Formula is revised as meeting the link information of intermediate file format;Modal processor is responsible for the node format of diagram file being revised as symbol
Close the nodal information of intermediate file format;Version control information processor is responsible for repairing the related control information form of Version Control
It is changed to meet the control information of intermediate file format;Platform relevant information processor is responsible for the specific pass in Graphiti platforms
Key word performs replacement operation.
2. device according to claim 1, it is characterised in that:The diagram file uniform format converter be used for perform general
The function that Graphiti chart formats are mutually changed with intermediate file format:By each label lattice in Graphiti charts
Formula information is revised as the information of key-value pair form, that is, is converted to the chart data of intermediate file format;Because the transfer process is not wrapped
Containing service logic, therefore there must be the cooperation of other parts, it is ensured that information integrity and format specification in whole transfer process
Property;During from Graphiti diagram files to the forward conversion of intermediate file, it is Graphiti diagram files that it, which is inputted, defeated
Go out not possess the intermediate file of complete information;And in reverse transformational process of the intermediate file to Graphiti diagram files,
It is the intermediate file for possessing complete information that it, which is inputted, is output as Graphiti diagram files.
3. device according to claim 1, it is characterised in that:The link process device is responsible for traversal diagram file form system
One converter completes the label substance of link information handle, in intermediate file not possessing complete information, obtains all companies
The Origin And Destination of line, is to meet after intermediate file format by its form modifying, then the starting point of line, endpoint information are deposited again
It is stored in the respective labels of this document;During from Graphiti diagram files to the forward conversion of intermediate file, it is inputted
Not possess the intermediate file of complete information, the intermediate file with link process information is output as;And intermediate file to
In the reverse transformational process of Graphiti diagram files, it is the intermediate file for possessing complete information that it, which is inputted, is output as middle text
Part and the link information stored with original diagram file form.
4. device according to claim 1, it is characterised in that:The modal processor is responsible for traveling through at line by level
The label substance that device completes each nodal information in intermediate file handle, with link process information is managed, is obtained all
The hierarchical relationship of node and comprising nest relation, by its form modifying to meet after intermediate file format, then by the layer between node
It is secondary to be stored in again in the respective labels of this document with comprising nested relation;From Graphiti diagram files to intermediate file
Forward conversion during, its input be the intermediate file with link process information, be output as with node level and comprising
The intermediate file of nest relation information;And in reverse transformational process of the intermediate file to Graphiti diagram files, it is inputted
To possess the intermediate file of complete information, intermediate file and the nodal information stored with original diagram file form are output as.
5. device according to claim 1, it is characterised in that:The version control information processor is used to handle version control
Editor including chart, the control information of edit session during system:After version control information is extracted, to set mark
Label are stored in file;During from Graphiti diagram files to the forward conversion of intermediate file, it is with section that it, which is inputted,
Point level and the intermediate file for including nest relation information, are output as the intermediate file with version control information;And in centre
File is into the reverse transformational process of Graphiti diagram files, and it is the intermediate file for possessing complete information that it, which is inputted, is output as
Intermediate file and the version control information stored with original diagram file form.
6. device according to claim 1, it is characterised in that:The platform relevant information processor is used for Graphiti
Special key words in platform perform replacement operation, prevent version control system server from being rushed when extracting the keyword
It is prominent;During from Graphiti diagram files to the forward conversion of intermediate file, it is with version control information that it, which is inputted,
Intermediate file, is output as the intermediate file by filing processing, that is, possesses the intermediate file of complete information;And intermediate file to
In the reverse transformational process of Graphiti diagram files, it is the intermediate file for possessing complete information that it, which is inputted, is output as middle text
Part and the customizing messages stored by processing, with original chart format.
7. a kind of method of work of the diagram file textual conversion equipment in version control function for supporting class uml diagram, it is special
Levy and be:During from Graphiti diagram files to the forward conversion of intermediate file, including following operative step:
Step 1, diagram file uniform format converter reads in original Graphiti diagram files, and original diagram file is pre-processed
Intermediate file is converted to, the chart-information of JSON key-value pair forms will be revised as with the chart-information of XML tag form
After intermediate file, link information processor is output to;
Step 2, link information processor receives the intermediate file for completing tentatively to change, and travels through wherein all link informations, obtains
The Origin And Destination of all lines is taken, the node identification ID of Origin And Destination is stitched together, with " starting point ID- terminals ID " lattice
Line ID and is stored in the link information of the intermediate file by formula again as the ID of each line, and generation possesses line letter
After the intermediate file of breath, export and give nodal information processor;
Step 3, nodal information processor receives the intermediate file for having generated link information, and range is carried out to all nodes
After first traversal, the domain model data for obtaining node, the instance name in the domain model is stored in intermediate file JSON
In " link " key of object, to protect the domain model data in Graphiti diagram files;Then the line of node is handled:Obtain
Take all of each node to go out line and to enter line, the line ID that link information processor is generated is inserted into the intermediate file again
Nodal information go out line and enter line storage region, generation possesses the intermediate file of nodal information, then exports and give version control
Message handler processed;
Step 4, version control information processor receives the intermediate file for having generated nodal information, extracts chart therein and compiles
It is stored in the version control information of the intermediate file, generation tool by volume person, edit session again as version control information
After the intermediate file of standby version control information, export and give platform relevant information processor;
Step 5, platform relevant information processor receives the intermediate file of build version control information, to the intermediate file
In the object of the JSON formatted files generated in flow path switch include " children ", " graphicsAlgorithm ",
“pi:Diagram”、“xmi:XMI " and " link " all keywords are carried out replacement operation, i.e., replace with respectively " node ",
" style ", "-diagram ", " description " and " navi ", avoid what is used when being parsed with version control system server
Keyword is clashed;So far complete particular diagram file being converted into all operationss of intermediate file, generation possesses complete
The intermediate file of information, is input in version control system server, performs the operation with completing Version Control.
8. method according to claim 7, it is characterised in that:In the step 1, diagram file uniform format converter will
The operation that chart-information with XML tag form is revised as the intermediate file process of the chart-information of JSON key-value pair forms is
Correspondingly:Label corresponding conversion in XML file is " key " in JSON files;Tag attributes conversion in XML file
For the object in JSON files, but "@" symbol is added as the prefix of " key ", to distinguish the attribute in XML file;XML texts
Subtab corresponding conversion in part turns into the son " key " in JSON.
9. a kind of method of work of the diagram file textual conversion equipment in version control function for supporting class uml diagram, it is special
Levy and be:From intermediate file into the reverse transformational process of Graphiti diagram files, including following operative step:
Step 1, after the reading of platform relevant information processor is handled via the completion of version control system server, client is returned to
The intermediate file for possessing complete information, in the object for the JSON formatted files that the intermediate file is generated in flow path switch
Include all keywords of " node ", " style ", "-diagram ", " description " and " navi ", all correspond to and replace respectively
It is changed to " children ", " graphicsAlgorithm ", " pi:Diagram”、“xmi:XMI " and " link ", it is ensured that
Graphiti platforms can correctly parse diagram file, ultimately generate with the original chart format storage platform correlation letters of Graphiti
The intermediate file of breath, and it is sent to version control information processor progress subsequent treatment;
Step 2, version control information processor receives the intermediate file for having completed keyword replacement, obtains editor therein
The information whether whether person, edit session, chart element clash, merge, and its information format is handled, will
It is revised as meeting after the tabular version control information of Graphiti original graphs, and generation is deposited with the original chart formats of Graphiti
Store up version control information intermediate file, then export give modal processor carry out subsequent treatment;
Step 3, nodal information processor preferentially performs breadth traversal to all nodes in the intermediate file that receives first, right
Wherein each nodal information form carries out conversion process, is revised as meeting the tabular node letter of Graphiti original graphs
Breath:The line mark ID for going out line and entering in line is first changed to the line ID forms in Graphiti format sheet files,
It is again the link model data used in current node generation Graphiti formatted files, what is ultimately generated is former with Graphiti
The intermediate file of beginning chart format memory node information, exports and gives link information processor;
Step 4, link information processor travels through all lines therein to the intermediate file received, and to every link information
Form carries out conversion process, is revised as meeting the tabular link information of Graphiti original graphs, i.e., by its starting point and end
The value of point performs replacement, and the hierarchy description information of node is replaced with by the ID of node, is ultimately generated with the original charts of Graphiti
After the intermediate file of form storage link information, export and give diagram file uniform format converter;
Step 5, when diagram file uniform format converter receives the intermediate file, to wherein including with Graphiti charts
The input content of platform relevant information, version control information, nodal information and link information that form is stored all is converted into XML
File, the intermediate file format overall transformation that will include complete information is the original diagram file forms of Graphiti, with complete
Into all operationss for the diagram file that intermediate file is converted into specific form, finally by the original diagram files of the Graphiti
In all graphic elements intuitively shown in client.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710269647.8A CN107145540A (en) | 2017-04-24 | 2017-04-24 | The diagram file textual conversion equipment and method of the version control function of class uml diagram |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710269647.8A CN107145540A (en) | 2017-04-24 | 2017-04-24 | The diagram file textual conversion equipment and method of the version control function of class uml diagram |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107145540A true CN107145540A (en) | 2017-09-08 |
Family
ID=59775277
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710269647.8A Withdrawn CN107145540A (en) | 2017-04-24 | 2017-04-24 | The diagram file textual conversion equipment and method of the version control function of class uml diagram |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107145540A (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108256188A (en) * | 2018-01-05 | 2018-07-06 | 广州杰赛科技股份有限公司 | Communication line drawing generating method and system, terminal device, storage medium |
CN109840265A (en) * | 2018-12-26 | 2019-06-04 | 出门问问信息科技有限公司 | JSON structure conversion method, device, equipment and storage medium |
CN109918050A (en) * | 2019-02-01 | 2019-06-21 | 上海交通大学 | A kind of software requirement description rule language and conversion method |
CN111447257A (en) * | 2020-03-09 | 2020-07-24 | 中国建设银行股份有限公司 | Message conversion method and device |
CN111626018A (en) * | 2019-02-28 | 2020-09-04 | 北京数聚鑫云信息技术有限公司 | Method and device for constructing JSON formatted data |
CN111788590A (en) * | 2018-03-02 | 2020-10-16 | 株式会社理光 | Information processing system, information processing method, and recording medium |
CN112597225A (en) * | 2020-12-22 | 2021-04-02 | 南京三眼精灵信息技术有限公司 | Data acquisition method and device based on distributed model |
CN112733370A (en) * | 2021-01-13 | 2021-04-30 | 北京航空航天大学 | Unified modeling method based on image-text conversion |
CN112732643A (en) * | 2021-04-01 | 2021-04-30 | 南京国睿信维软件有限公司 | Method for interconversion of flow chart graphic file data and S1000D standard XML format data |
CN113296816A (en) * | 2021-06-16 | 2021-08-24 | 山东新一代信息产业技术研究院有限公司 | Method for improving reliability and performance of SVN storage |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102446206A (en) * | 2011-08-31 | 2012-05-09 | 北京华电万通科技有限公司 | Cross-platform exchange device and method of three-dimensional data |
CN102819585A (en) * | 2012-07-31 | 2012-12-12 | 上海方正数字出版技术有限公司 | Method for controlling document of extensive makeup language (XML) database |
CN104063446A (en) * | 2014-06-17 | 2014-09-24 | 沈阳龙天科技有限公司 | Multi-user-generated content version control method and implementation method |
CN104615637A (en) * | 2014-11-20 | 2015-05-13 | 广州杰赛互教通信息技术有限公司 | Data exchange method and data exchange intermediate device |
CN104657137A (en) * | 2015-02-10 | 2015-05-27 | 上海创景计算机系统有限公司 | Software model data version management method |
CN105824621A (en) * | 2016-03-11 | 2016-08-03 | 深圳航天科技创新研究院 | Multi-user concurrent modeling method and system based on embedded software for graphical modeling |
-
2017
- 2017-04-24 CN CN201710269647.8A patent/CN107145540A/en not_active Withdrawn
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102446206A (en) * | 2011-08-31 | 2012-05-09 | 北京华电万通科技有限公司 | Cross-platform exchange device and method of three-dimensional data |
CN102819585A (en) * | 2012-07-31 | 2012-12-12 | 上海方正数字出版技术有限公司 | Method for controlling document of extensive makeup language (XML) database |
CN104063446A (en) * | 2014-06-17 | 2014-09-24 | 沈阳龙天科技有限公司 | Multi-user-generated content version control method and implementation method |
CN104615637A (en) * | 2014-11-20 | 2015-05-13 | 广州杰赛互教通信息技术有限公司 | Data exchange method and data exchange intermediate device |
CN104657137A (en) * | 2015-02-10 | 2015-05-27 | 上海创景计算机系统有限公司 | Software model data version management method |
CN105824621A (en) * | 2016-03-11 | 2016-08-03 | 深圳航天科技创新研究院 | Multi-user concurrent modeling method and system based on embedded software for graphical modeling |
Non-Patent Citations (3)
Title |
---|
蔡琪 等: "VLSI布图中基于XML中间数据源的数据表示", 《计算机工程与应用》 * |
覃士蘅 等: "基于Graphiti的图形化交互设计工具的设计与实现", 《中国科技论文在线HTTP://WWW.PAPER.EDU.CN/RELEASEPAPER/CONTENT/201612-416》 * |
陈玮 等: "利用JSON 降低XML 数据冗余的研究", 《计算机应用与软件》 * |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108256188A (en) * | 2018-01-05 | 2018-07-06 | 广州杰赛科技股份有限公司 | Communication line drawing generating method and system, terminal device, storage medium |
CN111788590A (en) * | 2018-03-02 | 2020-10-16 | 株式会社理光 | Information processing system, information processing method, and recording medium |
CN109840265A (en) * | 2018-12-26 | 2019-06-04 | 出门问问信息科技有限公司 | JSON structure conversion method, device, equipment and storage medium |
CN109840265B (en) * | 2018-12-26 | 2020-11-10 | 出门问问信息科技有限公司 | JSON structure conversion method, device, equipment and storage medium |
CN109918050B (en) * | 2019-02-01 | 2021-10-26 | 上海交通大学 | Software requirement description rule language and conversion method |
CN109918050A (en) * | 2019-02-01 | 2019-06-21 | 上海交通大学 | A kind of software requirement description rule language and conversion method |
CN111626018A (en) * | 2019-02-28 | 2020-09-04 | 北京数聚鑫云信息技术有限公司 | Method and device for constructing JSON formatted data |
CN111447257A (en) * | 2020-03-09 | 2020-07-24 | 中国建设银行股份有限公司 | Message conversion method and device |
CN112597225A (en) * | 2020-12-22 | 2021-04-02 | 南京三眼精灵信息技术有限公司 | Data acquisition method and device based on distributed model |
CN112733370A (en) * | 2021-01-13 | 2021-04-30 | 北京航空航天大学 | Unified modeling method based on image-text conversion |
CN112732643A (en) * | 2021-04-01 | 2021-04-30 | 南京国睿信维软件有限公司 | Method for interconversion of flow chart graphic file data and S1000D standard XML format data |
CN112732643B (en) * | 2021-04-01 | 2021-07-20 | 南京国睿信维软件有限公司 | Method for interconversion of flow chart graphic file data and S1000D standard XML format data |
CN113296816A (en) * | 2021-06-16 | 2021-08-24 | 山东新一代信息产业技术研究院有限公司 | Method for improving reliability and performance of SVN storage |
CN113296816B (en) * | 2021-06-16 | 2022-10-14 | 山东新一代信息产业技术研究院有限公司 | Method for improving reliability and performance of SVN storage |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107145540A (en) | The diagram file textual conversion equipment and method of the version control function of class uml diagram | |
Collard et al. | srcml: An infrastructure for the exploration, analysis, and manipulation of source code: A tool demonstration | |
Cho et al. | Creating visual domain-specific modeling languages from end-user demonstration | |
US9971577B2 (en) | Method and apparatus for code conversion | |
US20100088676A1 (en) | Comparing and merging structured documents syntactically and semantically | |
US8589877B2 (en) | Modeling and linking documents for packaged software application configuration | |
Bragança et al. | Automating mappings between use case diagrams and feature models for software product lines | |
CN107992476B (en) | Corpus generation method and system for sentence-level biological relation network extraction | |
Sharma et al. | Automated generation of activity and sequence diagrams from natural language requirements | |
Drath | AutomationML: the industrial cookbook | |
CN107526717B (en) | Method for automatically generating natural language text by structured process model | |
Romanovsky et al. | Refactoring the documentation of software product lines | |
CN109524071B (en) | Chinese electronic medical record text structured analysis-oriented labeling method | |
Feng et al. | SIMON: A grammar-based transformation system for structured documents | |
CN104331288B (en) | A kind of configurationization shows the method and system of dynamic page | |
CN113421657A (en) | Construction method and device of knowledge representation model of clinical practice guideline | |
Betari et al. | Model transformations in the MOF meta-modeling architecture: from UML to codeIgniter PHP framework | |
Gribova et al. | Implementation of a model of a metainformation-controlled editor of information units with a complex structure | |
Guerrieri | Software document reuse with XML | |
Paulus et al. | PLASMA: A Semantic Modeling Tool for Domain Experts | |
Meitz et al. | An Approach to Support Process Model Validation based on Text Generation. | |
Sabraoui et al. | Metamodel extension approach applied to the model-driven development of mobile applications | |
Anwar et al. | Blended metamodeling for seamless development of domain-specific modeling languages across multiple workbenches | |
Steel et al. | Generating human-usable textual notations for information models | |
Goldschmidt et al. | Incremental Updates for Textual Modelling of Large Scale Models |
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 | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20170908 |