|
|||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
AttributeModel.java | - | - | - | - |
|
1 | // Copyright 2004, 2005 The Apache Software Foundation | |
2 | // | |
3 | // Licensed under the Apache License, Version 2.0 (the "License"); | |
4 | // you may not use this file except in compliance with the License. | |
5 | // You may obtain a copy of the License at | |
6 | // | |
7 | // http://www.apache.org/licenses/LICENSE-2.0 | |
8 | // | |
9 | // Unless required by applicable law or agreed to in writing, software | |
10 | // distributed under the License is distributed on an "AS IS" BASIS, | |
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 | // See the License for the specific language governing permissions and | |
13 | // limitations under the License. | |
14 | ||
15 | package org.apache.hivemind.schema; | |
16 | ||
17 | import org.apache.hivemind.Locatable; | |
18 | import org.apache.hivemind.parse.AnnotationHolder; | |
19 | ||
20 | ||
21 | /** | |
22 | * Part of a {@link Schema}, used to specify an attribute allowed within | |
23 | * an {@link org.apache.hivemind.schema.ElementModel}. | |
24 | * | |
25 | * @author Howard Lewis Ship | |
26 | */ | |
27 | public interface AttributeModel extends Locatable, AnnotationHolder | |
28 | { | |
29 | /** | |
30 | * The name of the attribute. | |
31 | */ | |
32 | public String getName(); | |
33 | ||
34 | /** | |
35 | * Returns true if the attribute is required (must be specified). Otherwise, | |
36 | * the attribute is optional and may be omitted. | |
37 | */ | |
38 | public boolean isRequired(); | |
39 | ||
40 | /** | |
41 | * Returns the translator used to convert the attribute value. This is used | |
42 | * to locate a {@link org.apache.hivemind.schema.Translator}. | |
43 | */ | |
44 | public String getTranslator(); | |
45 | ||
46 | /** | |
47 | * Returns true if the attribute is supposed to be considered unique in relation to the configuration point. | |
48 | * @return True if the attribute must be unique with respect to it's xpath, otherwise false | |
49 | */ | |
50 | public boolean isUnique(); | |
51 | ||
52 | } |
|