{"id":20655818,"url":"https://github.com/nfantoni/uml-to-code","last_synced_at":"2025-09-07T11:44:24.705Z","repository":{"id":218933769,"uuid":"205526678","full_name":"nfantoni/uml-to-code","owner":"nfantoni","description":"Generate java code from xml uml description","archived":false,"fork":false,"pushed_at":"2021-04-26T19:30:55.000Z","size":1466,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-06-04T08:02:45.277Z","etag":null,"topics":["code-generator","java-8","uml","xml"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nfantoni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-08-31T09:55:22.000Z","updated_at":"2020-10-13T16:09:16.000Z","dependencies_parsed_at":"2024-01-24T16:05:04.026Z","dependency_job_id":null,"html_url":"https://github.com/nfantoni/uml-to-code","commit_stats":null,"previous_names":["nfantoni/uml-to-code"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nfantoni/uml-to-code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfantoni%2Fuml-to-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfantoni%2Fuml-to-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfantoni%2Fuml-to-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfantoni%2Fuml-to-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nfantoni","download_url":"https://codeload.github.com/nfantoni/uml-to-code/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nfantoni%2Fuml-to-code/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274032056,"owners_count":25210784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-generator","java-8","uml","xml"],"created_at":"2024-11-16T18:12:49.304Z","updated_at":"2025-09-07T11:44:24.681Z","avatar_url":"https://github.com/nfantoni.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# uml-to-code\n\n## Generate java code from xml uml description\n\nBased on the \"Mapping UML diagram to XML\" work by Jitender Singh for JNU that you can find \non [docs/utx_doc.pdf](docs/utx_doc.pdf).  \nThe purpose of this project is take the xml rapresentation of uml diagram and generate \nthe relative java code that implement the CRUD access for various database pattern access.\n\n### The mapping\n\nTo map a Uml we need to descripbe the output in a settings section and map the entity in a entities section.  \nThe setting section is composed of:\n\n- _defaultPackage_ : package to use in the java code jenerated \n- _outputType_ : string that select the output type to generate for (DAO, HYBERNATE, BRUTE_FORCE)\n- _outputPath_ : path where write the output code\n- _useSurrogatesId_ : boolean value indacate to use or not surrugate ids\n\nThe entities block have to collect the entity description composed with:\n\n- _ entyty_ :\n    - _name_ attribute : the calss name in camel case (`\u003centity name=\"Teatro\"\u003e`)\n    - _attribute_ childrens : the class attributes with :\n        - _name_ attribute : the name of the attribute\n        - _sqlType_ attribute : sql type of the attribute\n        - _null_ attribute : boolean value indicate the associated column allow null value or not\n        - _primaryKey_ attribute : boolean value indicate the associated column is primary key for the table\n\n## Pattern DAO\n\nWith this example diagram:\n\n![DAO EXAMPLE DIAGRAM](docs/dao_spettacoli.png)\n\nit's enought write the xml rappresentation:\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"utf-8\"?\u003e\n\u003cuml\u003e\n\t\u003csettings\u003e\n\t\t\u003cdefaultPackage\u003eit.nfantoni.dao.test\u003c/defaultPackage\u003e\n\t\t\u003coutputType\u003eDAO\u003c/outputType\u003e\n\t\t\u003coutputPath\u003etarget/dao\u003c/outputPath\u003e\n\t\t\u003cuseSurrogatesId\u003efalse\u003c/useSurrogatesId\u003e\n\t\u003c/settings\u003e\n\t\u003centities\u003e\n\t\t\u003centity name=\"Teatro\"\u003e\n\t\t\t\u003cattribute name=\"Nome\" sqlType=\"VARCHAR(255)\" null=\"false\" primaryKey=\"true\" /\u003e\n\t\t\t\u003cattribute name=\"Indirizzo\" sqlType=\"VARCHAR(255)\" /\u003e\n\t\t\t\u003cattribute name=\"Capienza\" sqlType=\"INT\" /\u003e\n            \u003cassociation multiplicity=\"1\" className=\"Spettacolo\" /\u003e\n\t\t\u003c/entity\u003e\n\t\t\u003centity name=\"Spettacolo\"\u003e\n\t\t\t\u003cattribute name=\"CodiceSpettacolo\" sqlType=\"VARCHAR(255)\" null=\"false\" primaryKey=\"true\" /\u003e\n\t\t\t\u003cattribute name=\"NomeArtista\" sqlType=\"VARCHAR(255)\" /\u003e\n\t\t\t\u003cattribute name=\"Data\" sqlType=\"DATE\" /\u003e\n\t\t\t\u003cattribute name=\"Genere\" sqlType=\"VARCHAR(255)\" /\u003e\n            \u003cassociation multiplicity=\"*\" className=\"Teatro\" /\u003e\n\t\t\u003c/entity\u003e\n\t\u003c/entities\u003e\n\u003c/uml\u003e\n```\n\nand run the program to generate all java classes for crud operation based on Dao Pattern.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfantoni%2Fuml-to-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnfantoni%2Fuml-to-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnfantoni%2Fuml-to-code/lists"}