Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
JavaSchemaGenerator |
|
| 1.0;1 |
1 | /** | |
2 | * Copyright 2005-2011 Steve McDuff d-duff@users.sourceforge.net | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | */ | |
16 | package org.deduced.generator.java; | |
17 | ||
18 | import java.io.IOException; | |
19 | ||
20 | import org.deduced.PropertyCollection; | |
21 | ||
22 | /** | |
23 | * Interface that abstracts the function to generate java files for a schema | |
24 | * | |
25 | * @author Steve McDuff | |
26 | */ | |
27 | public interface JavaSchemaGenerator | |
28 | { | |
29 | /** | |
30 | * generate the Java Schema files from a DeducedModelLayer. Any schema | |
31 | * contained in the base property collection list on the model will be | |
32 | * generated | |
33 | * | |
34 | * @param outputFolderName the folder where Java files will be created | |
35 | * @param schemaModelToGenerate the DeducedModelLayer containing some | |
36 | * DeducedSchemaLayer objects | |
37 | * @throws IOException any error that occurs while writing the files | |
38 | */ | |
39 | public void generateSchemaFromModel( | |
40 | String outputFolderName, PropertyCollection<?, ?> schemaModelToGenerate) | |
41 | throws IOException; | |
42 | ||
43 | /** | |
44 | * generate all the files required to use the specified schema. This method | |
45 | * will generate the framework, all the interfaces and implementations of | |
46 | * types within the schema. | |
47 | * | |
48 | * @param model the model hosting the schema | |
49 | * @param schema the schema to generate | |
50 | * @param outputFolderName the output folder to use | |
51 | * @throws IOException any exception that occurs while attempting to write | |
52 | * the file | |
53 | */ | |
54 | public void generateFilesForSchema( | |
55 | PropertyCollection<?, ?> model, PropertyCollection<?, ?> schema, | |
56 | String outputFolderName) throws IOException; | |
57 | } |