A knowledge graph extractor for Java projects.
javapers can extract knowledge graph instances of the following two graph types.
$ java -jar javapers.jar <args>
Argument | Description |
---|---|
-i [path] |
Input: path to the source directory of the Java project. Default value is the current working directory. |
-o [path] |
Output: path to the directory where output file(s) will be created. Default value is the current working directory. |
-f [json|csv] |
The output format. Default value is csv. |
-n [name] |
Output file basename. For example, when output type is json, the output file name will be [name].json. Default value is JavaProject. |
-c |
When this argument is provided, generate an abstracted knowledge graph. Otherwise, generate a detailed one. |
Consult the sample_output
directory to get a feel of what the resulting knowledge graph looks like.
Check out classviz, a project that uses an output of javapers as input for visualizing class relationships. Specifically, it takes the json-formatted output of the abstract graph type.
You can play around with the JHotDraw example here.
You can visualize the detailed graph as well using classviz (example). However, the interaction tools does not currently support the node and edge types of the detailed graph type.
@software{rukmono2023javapers,
author = {Satrio Adi Rukmono},
title = {rsatrioadi/javapers: javapers 1.0},
month = jan,
year = 2023,
publisher = {Zenodo},
version = {v1.0},
doi = {10.5281/zenodo.7568438},
url = {https://doi.org/10.5281/zenodo.7568438}
}