| # |
| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy current the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| # |
| |
| |
| ################################################################################## |
| # Example of a configuration metamodel expressed via YAML(tm). |
| # Structure is shown through indentation (one or more spaces). |
| # Sequence items are denoted by a dash, |
| # key value pairs within a map are separated by a colon. |
| #################################################################################### |
| tbd (adapt to others...) |
| |
| #################################################################################### |
| # Metamodel information |
| #################################################################################### |
| model: { |
| class : "Metamodel", |
| name : 'testmodel', |
| provider : 'ConfigModel Extension', |
| version : '1.0', |
| release-date : 2001-01-23, |
| author : 'Anatole Tresch', |
| # model-format: 'alternate format reader type' |
| comments: > |
| Late afternoon is best. |
| Backup contact is Nancy. |
| } |
| |
| #################################################################################### |
| # Description of Configuration Sections (minimal, can be extended by other modules). |
| #################################################################################### |
| --- |
| a: { |
| # Paramname Type Validations Description |
| params2: 'String', 'required', 'a required parameter', |
| paramInt: 'Integer', 'an optional parameter (default)', |
| } |
| --- |
| a.b.c: { |
| __desc: 'Just a test section.' |
| } |
| --- |
| a.b.c.aRequiredSection: { |
| __validations: 'required', |
| __desc: | |
| A section containing required parameters is called a required section. |
| Sections can also explicitly be defined to be required, but without |
| specifying the paramteres to be contained., |
| } |
| --- |
| a.b.c.aRequiredSection.subsection: { |
| # Paramname Type Validations Description |
| param0: 'String', 'a minmally documented String parameter}', |
| param00: 'String', # A minmally defined String parameter |
| param1: 'String', 'required', 'a required parameter', |
| intParam: 'Integer', 'an optional parameter (default)' |
| } |
| ... |
| |
| --- |
| a.b.c.aRequiredSection.nonempty-subsection: { |
| __validations: 'required' |
| } |
| ... |
| |
| --- |
| a.b.c.aRequiredSection.optional-subsection: {} |
| ... |
| |
| --- |
| a.b.c.aRequiredSection.aValidatedSection: { |
| __desc: 'A validated section.', |
| __validations: 'org.apache.tamaya.model.validation.MaxItemValidator?max=3' |
| } |
| |
| |