Comments (9)
I don't think it's JHipster-UML's job to be able to parse Java classes, or to even care about Java. However, it would be a pretty good idea that this parsing results in the creation of a JDL file =) (it has been made to represent JHipster entities...).
@CarlKlagba, what do you think about this?
from jhipster-uml.
Well, from its name, Jhipster is a bit about Java ;-).
I think this could be made in complete compatibility with what exists currently : map both BigDecimal dataType and java.math.BigDecimal to JHipster's BigDecimal and have an optional package name (with root as default) in the command line (the notion of package exists in UML, not only in java).
I could help on a PR if you want.
from jhipster-uml.
Great tool BTW ! I was really amazed when I generated a jhipster working REST server from an existing dropwizard project in about 20 minutes !
from jhipster-uml.
Yes, JHipster is about Java, but JHipster-UML is not really about it. JHipster-UML focuses on JHipster and, above all else, its entities.
Could you precise what you mean by map both BigDecimal dataType and java.math.BigDecimal to JHipster's BigDecimal
?
from jhipster-uml.
I mean treat classes inside "java.*" package like PrimitiveType/DataType. Thus if a field has a relationship to java.math.BigDecimal, it is mapped to a JHipster field (instead of a relationship) with fieldType "BigDecimal".
from jhipster-uml.
I continued looking at how to use the xmi produced by modelio's reverse and there are other things that need to be changed such as relationships.
So I guess this is out of scope of jhipster-uml and could maybe be part of another conversion tool.
The steps I had to perform in order to use my reverse if that interests somebody:
- Delete every
#import java.time.LocalDate
,#import java.math.BigDecimal
from the java domain files so that the types don't end up as associations to JDK classes. - Add Java Designer module to the Modelio project
- Configure the rt.jar lib on the Modelio project
- Reverse the java domain files:
- select "complete structural"
- use the project rt.jar during the reverse
- Move the domain generated classes to the root level
- Delete all packages
- Create the DateTime, LocalDate and BigDecimal data types
- Edit the classes that have fields with no type and set the correct data type. This can be done with Modelio or by exporting to xmi, edit the xmi, find the data type xmi:id and put it in the type attribute of the field, then reimporting to Modelio.
- Remove JavaExtensions from the xmi (optional)
- In Modelio, java bidirectional associations create two associations. The many-to-one one must be deleted.
from jhipster-uml.
That may be outside JHipster-UML's scope, but I think of a good way to use this: convert generated Java classes to JDL.
A lot of things can be done if this happens, like converting entites to a JDL file, modifying it instead of the Java classes, and use the modified JDL file to modify the original Java classes in the JHipster app (that could be easier/quicker depending of the user than changing the Java files).
But, concerning your last post, Modelio is to be used to reverse the classes, right? Do you think Modelio is shipped with some kind of API that could enable us to use the reverse?
from jhipster-uml.
Yes this is the reverse function of Modelio. I think the other editors also have these kind of feature so I will probably have a look at what they produce. As for an API for Modelio, it seems possible to write Jython scripts and launch them from the command-line. I don't know if it is possible to use the reverse that way.
from jhipster-uml.
I am closing this thread as it doesn't really concern JHipster-UML as a whole, but could only concern JDL for possible new features (associated or not to JHipster-UML).
from jhipster-uml.
Related Issues (20)
- Is Visual Paradigm Supported by Jhipster-uml? HOT 3
- Doesn't support .jdl and .jh files as input HOT 9
- Incompatible type errors on generated code based on UML file. HOT 6
- Support for Sparxsystem Enterprise Architect HOT 5
- Implement contraint support for UML Designer HOT 1
- Error: Cannot read property 'relationships' of undefined HOT 1
- mongoDB + jhipster UML HOT 5
- Array in MongoDB in JDL file. HOT 1
- Generating all the entities from Microservice in Gateway app HOT 1
- microservicename is json file generated by import-jdl
- Add the jpa filter option
- How to modify existing entity generated with jhipster? HOT 1
- After modify my existing entity I generated chane log and put it in master.xml, but after that I run gradlew command I got following probem HOT 1
- Convert JDL to XMI HOT 2
- Bug in docs HOT 2
- Installation of JHipster-UML terminates with error HOT 2
- Cannot read property '0' of undefined HOT 2
- The type 'Instant' isn't supported by JHipster
- Deprecate this project
- Setting up Jhipster-Core for Azure Pipelines
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jhipster-uml.