KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > hivemind > schema > AttributeModel


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 JavaDoc getName();
33     
34     /**
35      * The default value for this attribute.
36      *
37      * @since 1.2
38      */

39     public String JavaDoc getDefault();
40     
41     /**
42      * Returns true if the attribute is required (must be specified). Otherwise,
43      * the attribute is optional and may be omitted.
44      */

45     public boolean isRequired();
46     
47     /**
48      * Returns the translator used to convert the attribute value. This is used
49      * to locate a {@link org.apache.hivemind.schema.Translator}.
50      */

51     public String JavaDoc getTranslator();
52
53     /**
54      * Returns true if the attribute is supposed to be considered unique in relation to the configuration point.
55      * @return True if the attribute must be unique with respect to it's xpath, otherwise false
56      */

57     public boolean isUnique();
58
59 }
60
Popular Tags