yuml2svg
Version:
UML diagramming tool based on the yUML syntax
120 lines (119 loc) • 4.69 kB
JSON
{
"Activity": {
"comment": "Example taken from: http://yuml.me/diagram/scruffy/activity/samples",
"description": "UML activity diagram",
"prefix": "activity",
"body": [
"// {type:activity}",
"(start)-><a>[kettle empty]->(Fill Kettle)->|b|",
"<a>[kettle full]->|b|->(Boil Kettle)->|c|",
"|b|->(Add Tea Bag)->(Add Milk)->|c|->(Pour Water)",
"(Pour Water)->(end)"
]
},
"Class": {
"comment": "Example taken from: http://yuml.me/diagram/scruffy/class/samples",
"description": "UML class diagram",
"prefix": "class",
"body": [
"// {type:class}",
"// {direction:topDown}",
"[note: You can stick notes on diagrams too!{bg:cornsilk}]",
"[Customer]<>1-orders 0..*>[Order]",
"[Order]++*-*>[LineItem]",
"[Order]-1>[DeliveryMethod]",
"[Order]*-*>[Product|EAN_Code|promo_price()]",
"[Category]<->[Product]",
"[DeliveryMethod]^[National]",
"[DeliveryMethod]^[International]"
]
},
"State": {
"comment": "Diagram taken from wikipedia",
"description": "UML state diagram",
"prefix": "state",
"body": [
"// {type:state}",
"(start)[Start]->(Simulator running)",
"(Simulator running)[Pause]->(Simulator paused|do / wait)",
"(Simulator running)[Stop]->(end)",
"(Log retrieval)[Continue]->(Simulator running)",
"(Simulator paused)[Unpause]->(Simulator running)",
"(Simulator paused)[Data requested]->(Log retrieval|do / output log)",
"(Log retrieval)->(end)"
]
},
"Deployment": {
"comment": "Simplified diagram taken from wikipedia",
"description": "UML deployment diagram",
"prefix": "deployment",
"body": [
"// {type:deployment}",
"[Presentation Server]-[Policy Server]",
"[Policy Server]-[Document Server]",
"[Product Server]-[Document Server]",
"[Document Server]ASP.Net-[Workstation]",
"[Policy Server]-[Database Server]",
"[Product Server]-[Database Server]",
"[Policy Server]-[note: To be clustered to meet throughput needs{bg:cornsilk}]",
"[Policy Server]-[Directory Server]",
"[Policy Server]-[Underwriting & Rating Server]"
]
},
"Package": {
"comment": "Simplified diagram taken from wikipedia",
"description": "UML package diagram",
"prefix": "package",
"body": [
"// {type:package}",
"[Elegibility & Benefits]->[Elegibility Search]",
"[Remittances]->[Remittance Search]",
"[Notifications]->[Notification Search]",
"[Check Claim Status]->[Claim Search]",
"[Submit a Claim Online]->[Patient Search]",
"[Physician/Provider Directory]",
"[Eligibility Search]->[Search]",
"[Remittance Search]->[Search]",
"[Notification Search]->[Search]",
"[Claim Search]->[Search]",
"[Patient Search]->[Search]"
]
},
"Use-Case": {
"comment": "Example taken from: http://yuml.me/diagram/scruffy/usecase/samples",
"description": "UML use-case diagram",
"prefix": "usecase",
"body": [
"// {type:usecase}",
"// {direction:leftToRight}",
"(note: figure 1.2{bg:beige})",
"[User]-(Login)",
"[Site Maintainer]-(Add User)",
"(Add User)<(Add Company)",
"[Site Maintainer]-(Upload Docs)",
"(Upload Docs)<(Manage Folders)",
"[User]-(Upload Docs)",
"[User]-(Full Text Search Docs)",
"(Full Text Search Docs)>(Preview Doc)",
"(Full Text Search Docs)>(Download Docs)",
"[User]-(Browse Docs)",
"(Browse Docs)>(Preview Doc)",
"(Download Docs)",
"[Site Maintainer]-(Post New Event to the Web Site)",
"[User]-(View Events)"
]
},
"Sequence": {
"comment": "Example taken from wikipedia",
"description": "UML sequence diagram",
"prefix": "sequence",
"body": [
"// {type:sequence}",
"[:Computer]sendUnsentEmail>[:Server]",
"[:Computer]newEmail>[:Server]",
"[:Server]reponse.>[:Computer]",
"[:Computer]downloadEmail>[:Server]",
"[:Computer]deleteOldEmail>[:Server]"
]
}
}