| /* |
| * 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. |
| //################################################################################## |
| |
| //################################################################################## |
| // Metamodel information |
| //################################################################################## |
| { |
| "model": { |
| "class": "Metamodel", |
| "name": "testmodel", |
| "provider": "ConfigModel Extension", |
| "version": "1.0", |
| "release-date": "2001-01-23", |
| "author": "Anatole Tresch", |
| // "modelformat": "alternate format reader type" |
| "comments": "Late afternoon is best. Backup contact is Nancy." |
| }, |
| // reusable parameter definition |
| "MyNumber": { |
| "class": "Parameter", |
| "type": "Integer", |
| "description": "an (reusable) number type parameter (optional)" |
| }, |
| //################################################################################## |
| // Description of Configuration Sections (minimal, can be extended by other modules). |
| //################################################################################## |
| "a": { |
| "class": "Section", |
| // required, default is parameter! |
| "params2": { |
| "required": true, |
| "description": "a required parameter" |
| }, |
| "paramInt": { |
| // references a shared parameter definition. |
| "ref": "MyNumber", |
| "description": "an optional parameter (default)" |
| }, |
| "_number": { |
| "type": "Integer", |
| "deprecated": true, |
| // references a deprecated parameter, now mapped to 'a.paramInt'. |
| "mappedto": "a.paramInt" |
| } |
| }, |
| "a.b.c": { |
| "class": "Section", |
| "description": "Just a test section." |
| // a subsection, directly configured as child element. |
| "aRequiredSection": { |
| "class": "Section", |
| "required": true, |
| "description": "A section containing required parameters is called a required section." |
| } |
| }, |
| // a subsection, configured in its own section. |
| "a.b.c.aRequiredSection.subsection": { |
| "class": "Section", |
| "param0": { |
| "type": "String", |
| "description": "a minmally documented String parameter" |
| }, |
| // A minmally defined String parameter |
| "param00": {}, |
| "param1": { |
| "type": "String", |
| "required": true, |
| "description": "a required parameter" |
| }, |
| "intParam": { |
| "type": "Integer", |
| "required": true, |
| "description": "an optional parameter (default)" |
| } |
| }, |
| "a.b.c.aRequiredSection.nonempty-subsection": { |
| "class": "Section", |
| "required": true |
| }, |
| "a.b.c.aRequiredSection.optional-subsection": { |
| "class": "Section" |
| }, |
| "a.b.c.aRequiredSection.aValidatedSection": { |
| "class": "Section", |
| "description": "A validated section.", |
| "validations": |
| "org.apache.tamaya.model.validation.MaxItemValidator?max=3" |
| } |
| } |
| |
| |