# OpenGMSDiagramModel
**Repository Path**: geomodeling/OpenGMSDiagramModel
## Basic Information
- **Project Name**: OpenGMSDiagramModel
- **Description**: Diagram Model for OpenGMS
- **Primary Language**: Unknown
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2018-07-30
- **Last Updated**: 2020-12-18
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# OpenGMS Diagram Model
[](http://geomodeling.njnu.edu.cn/)
#### Introduction
This project is used for diagram model building and showing in Open Graphical Modeling and Simulation platform (OpenGMS). Use [mxGraph](https://www.jgraph.com/) for visualization component, [Bootstrap](https://getbootstrap.com/) for style of dialog and [jQuery](https://jquery.com/) for basic operation.
#### Structure
#### Installation
[Download this js file](https://gitee.com/geomodeling/OpenGMSDiagramModel/blob/master/js/ogmsDiagram.js) and include in your project.
#### Usage
Initialization
```
```
##### API
1. Get graph information. Draw diagram below and get structure json data and use `format2JSON` .

```
var json = diagram.format2JSON();
```
JSON structure show below
```
json = {
//! State information
"states": [{
"id": "806beceb-0998-492e-8389-770a4822bad5",
"name": "State1",
"type": "basic",
"description": "",
"events": []
}, {
"id": "d48d8287-61c7-4fc0-8f0a-01ee16cc06e8",
"name": "State2",
"type": "basic",
"description": "",
"events": []
}, {
"id": "1033ce77-5ee6-4139-9448-01747f05ddba",
"name": "State3",
"type": "basic",
"description": "",
"events": []
}],
//! Links information
"transition": [{
"from": "806beceb-0998-492e-8389-770a4822bad5",
"to": "d48d8287-61c7-4fc0-8f0a-01ee16cc06e8"
}, {
"from": "806beceb-0998-492e-8389-770a4822bad5",
"to": "1033ce77-5ee6-4139-9448-01747f05ddba"
}],
//! Data reference in events
"dataRef": []
}
```
#### Contributors
##### Founder
Min Chen ()
Yongning Wen ()
Songshan Yue ()
Fengyuan Zhang ()
##### Coder
Fengyuan Zhang ()
All codes are used in [OpenGMS](http://geomodeling.njnu.edu.cn/) platform