KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cocoon > woody > datatype > DatatypeManager


1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16 package org.apache.cocoon.woody.datatype;
17
18 import org.w3c.dom.Element JavaDoc;
19 import org.apache.cocoon.woody.datatype.convertor.Convertor;
20
21 /**
22  * Work interface for the component that manages the datatypes.
23  *
24  * <p>See also {@link Datatype} and {@link DefaultDatatypeManager}.
25  *
26  * @version $Id: DatatypeManager.java 30932 2004-07-29 17:35:38Z vgritsenko $
27  */

28 public interface DatatypeManager {
29     
30     String JavaDoc ROLE = DatatypeManager.class.getName();
31
32     /**
33      * Creates a datatype from an XML description.
34      */

35     Datatype createDatatype(Element JavaDoc datatypeElement, boolean arrayType) throws Exception JavaDoc;
36
37     /**
38      * Creates a validation rule from an XML description. This will usually be used by the
39      * {@link DatatypeBuilder}s while building a {@link Datatype}.
40      */

41     ValidationRule createValidationRule(Element JavaDoc validationRuleElement) throws Exception JavaDoc;
42
43     /**
44      * Creates a convertor based on an XML description.
45      */

46     Convertor createConvertor(String JavaDoc dataTypeName, Element JavaDoc convertorElement) throws Exception JavaDoc;
47 }
48
Popular Tags