1 package org.nuiton.eugene.plugin.writer;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 import org.codehaus.plexus.component.annotations.Component;
26 import org.nuiton.eugene.writer.ChainedFileWriter;
27
28
29
30
31
32
33
34 @Component(role = ChainedFileWriter.class, hint = "yamlModel2Memory")
35 public class YamlModelChainedFileWriter extends BaseChainedFileWriterToMemoryModel {
36
37 public YamlModelChainedFileWriter() {
38 super();
39 }
40
41 @Override
42 protected String getInputType() {
43 return "yaml";
44 }
45
46 @Override
47 public String getInputProtocol() {
48 return "yamlmodel";
49 }
50
51 @Override
52 public boolean acceptInclude(String include) {
53 return include.startsWith("yaml:") ||
54 include.endsWith(".yamlobjectmodel") ||
55 include.endsWith(".yamlstatemodel");
56 }
57
58 @Override
59 public String getDefaultIncludes() {
60 return "**/*.yaml*model";
61 }
62
63 @Override
64 public String getDefaultInputDirectory() {
65 return "src/main/models";
66 }
67
68 @Override
69 public String getDefaultOutputDirectory() {
70 return "java";
71 }
72
73 @Override
74 public String getDefaultTestInputDirectory() {
75 return "src/test/models";
76 }
77
78 @Override
79 public String getDefaultTestOutputDirectory() {
80 return "test-java";
81 }
82 }