01: /*
02: * Created on Feb 24, 2004
03: *
04: * To change the template for this generated file go to
05: * Window>Preferences>Java>Code Generation>Code and Comments
06: */
07: package org.xdev.base.core.compiler.type;
08:
09: import java.util.HashMap;
10: import java.util.List;
11:
12: import org.jdom.Element;
13: import org.xdev.base.core.IPage;
14: import org.xdev.base.core.compiler.validator.AbstractValidator;
15: import org.xdev.base.xssl.XSSLAction;
16: import org.xdev.base.xssl.XSSLComponent;
17:
18: /**
19: * @author AYegorov
20: *
21: * To change the template for this generated type comment go to
22: * Window>Preferences>Java>Code Generation>Code and Comments
23: */
24: public abstract class AbstractType {
25:
26: /* TODO: Add an attribute map implementation
27: * such that will allow for mapping a set of physical attributes
28: * to the property used internaly by the XJC.
29: */
30:
31: private Class type = null;
32:
33: private String typeName = null;
34:
35: public AbstractType() {
36: }
37:
38: public AbstractType(Class type, String typeName) {
39: this .type = type;
40: this .typeName = typeName;
41: }
42:
43: public AbstractType(Class type, String typeName, Class[] validators) {
44: this (type, typeName);
45:
46: for (int i = 0; i < validators.length; i++) {
47:
48: AbstractValidator.addValidator(type, validators[i]);
49: }
50: }
51:
52: public AbstractType(AbstractType type, Class[] validators) {
53: this (type.getType(), type.getTypeName(), validators);
54: }
55:
56: /**
57: * @return Returns the type.
58: */
59: public Class getType() {
60: return type;
61: }
62:
63: /**
64: * @param type The type to set.
65: */
66: public void setType(Class type) {
67: this .type = type;
68: }
69:
70: /**
71: * @return Returns the typeName.
72: */
73: public String getTypeName() {
74: return typeName;
75: }
76:
77: /**
78: * @param typeName The typeName to set.
79: */
80: public void setTypeName(String typeName) {
81: this .typeName = typeName;
82: }
83:
84: public abstract XSSLComponent loadComponent(String id,
85: HashMap properties, Object elm, IPage page,
86: XSSLAction template, XSSLComponent parent, String path)
87: throws Exception;
88:
89: }
|