Commit cfad9ff1 authored by BILLANT's avatar BILLANT

[JavaSourceCodeGenerator] Minor evolution in group path + rename of

output dir
parent bec47b36
......@@ -15,7 +15,7 @@ import fr.ifremer.fr.xsf.generator.model.SCGroupAdapter;
public class JavaSourceCodeGenerator {
private static String OUTPUT_PACKAGE = "fr.ifremer.globe.api.xsf.converter.common.xsf.groups";
private static String OUTPUT_FOLDER_PREDEFINED_LAYER = "predefinedLayer";
private static String OUTPUT_FOLDER_PREDEFINED_LAYER = "predefinedlayers";
private static String OUTPUT_FOLDER_API = "api";
/**
......
......@@ -116,7 +116,7 @@ public class PredefinedLayersGenerator {
private void modelToSourceFiles(List<Group> groups, Path outputFolder) throws Exception {
//create layer objects
List<Layer> layers=new ArrayList<>();
String path="root";
String path="/root";
groups.forEach(g-> {
try {
layers.addAll(parseGroup(g,path));
......@@ -273,12 +273,11 @@ public class PredefinedLayersGenerator {
// Group name
if(groupName.indexOf("/0") != -1)// case of attitude and position sub group: remove last folder
groupName = groupName.substring(0, groupName.indexOf("/0"));
if (groupName.startsWith("/"))
groupName = groupName.replaceFirst("/", "");
String[] splitedGroupName = groupName.split("/");
// Output folder
for (int i = 0; i < splitedGroupName.length - 1 && i < 2; i++)
for (int i = 1; i < splitedGroupName.length - 1 && i < 3; i++)
outputFolder = outputFolder.resolve(splitedGroupName[i]);
// Class Name
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment