01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/metaobj/tags/sakai_2-4-1/metaobj-api/api/src/java/org/sakaiproject/metaobj/utils/xml/ElementType.java $
03: * $Id: ElementType.java 8052 2006-04-20 18:16:21Z ggolden@umich.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2004, 2005, 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.metaobj.utils.xml;
21:
22: import java.util.List;
23: import java.util.regex.Pattern;
24:
25: /**
26: * Created by IntelliJ IDEA.
27: * User: John Ellis
28: * Date: Jul 25, 2004
29: * Time: 3:26:24 PM
30: * To change this template use File | Settings | File Templates.
31: */
32: public interface ElementType {
33: public Class getObjectType();
34:
35: public int getLength();
36:
37: public int getMaxLength();
38:
39: public int getMinLength();
40:
41: public String getDefaultValue();
42:
43: public String getFixedValue();
44:
45: public List getEnumeration();
46:
47: /**
48: * @return A regular expression that expresses a constraint on legal value(s) for the element.
49: */
50: public Pattern getPattern();
51:
52: /**
53: * @return ValueRange object describing the type's range.
54: * Objects within this range will be of the class
55: * getObjectType(). This is null if there is no restriction
56: * on the value's range
57: */
58: public ValueRange getRange();
59:
60: /**
61: * @return the base xml type of the associated node
62: */
63: public String getBaseType();
64:
65: }
|