KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > axi > impl > AbstractModelBuilder


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19 package org.netbeans.modules.xml.axi.impl;
20
21 import org.netbeans.modules.xml.schema.model.All;
22 import org.netbeans.modules.xml.schema.model.AnyAttribute;
23 import org.netbeans.modules.xml.schema.model.AnyElement;
24 import org.netbeans.modules.xml.schema.model.AttributeGroupReference;
25 import org.netbeans.modules.xml.schema.model.AttributeReference;
26 import org.netbeans.modules.xml.schema.model.Choice;
27 import org.netbeans.modules.xml.schema.model.ComplexContent;
28 import org.netbeans.modules.xml.schema.model.ComplexExtension;
29 import org.netbeans.modules.xml.schema.model.ElementReference;
30 import org.netbeans.modules.xml.schema.model.GlobalAttribute;
31 import org.netbeans.modules.xml.schema.model.GlobalAttributeGroup;
32 import org.netbeans.modules.xml.schema.model.GlobalComplexType;
33 import org.netbeans.modules.xml.schema.model.GlobalElement;
34 import org.netbeans.modules.xml.schema.model.GlobalGroup;
35 import org.netbeans.modules.xml.schema.model.GroupReference;
36 import org.netbeans.modules.xml.schema.model.LocalAttribute;
37 import org.netbeans.modules.xml.schema.model.LocalComplexType;
38 import org.netbeans.modules.xml.schema.model.LocalElement;
39 import org.netbeans.modules.xml.schema.model.Schema;
40 import org.netbeans.modules.xml.schema.model.Sequence;
41 import org.netbeans.modules.xml.schema.model.SimpleContent;
42 import org.netbeans.modules.xml.schema.model.SimpleExtension;
43 import org.netbeans.modules.xml.schema.model.visitor.DeepSchemaVisitor;
44
45 /**
46  * An AXI model can be created with few schema componnets. This class must
47  * define a set of visit methods for those components and all the builder
48  * implementation must implement those.
49  *
50  * @author Samaresh (Samaresh.Panda@Sun.Com)
51  */

52 public abstract class AbstractModelBuilder extends DeepSchemaVisitor {
53     
54     public AbstractModelBuilder(AXIModelImpl model) {
55         this.model = model;
56     }
57     
58     public AXIModelImpl getModel() {
59         return model;
60     }
61     
62     public abstract void visit(Schema schema);
63     
64     public abstract void visit(AnyElement schemaComponent);
65     
66     public abstract void visit(AnyAttribute schemaComponent);
67     
68     public abstract void visit(GlobalElement schemaComponent);
69     
70     public abstract void visit(LocalElement component);
71     
72     public abstract void visit(ElementReference component);
73     
74     public abstract void visit(GlobalAttribute schemaComponent);
75     
76     public abstract void visit(LocalAttribute component);
77     
78     public abstract void visit(AttributeReference component);
79     
80     public abstract void visit(Sequence component);
81     
82     public abstract void visit(Choice component);
83     
84     public abstract void visit(All component);
85     
86     public abstract void visit(GlobalGroup schemaComponent);
87     
88     public abstract void visit(GroupReference component);
89     
90     public abstract void visit(GlobalAttributeGroup schemaComponent);
91     
92     public abstract void visit(AttributeGroupReference component);
93     
94     public abstract void visit(GlobalComplexType schemaComponent);
95     
96     public abstract void visit(LocalComplexType component);
97     
98     public abstract void visit(ComplexContent component);
99     
100     public abstract void visit(SimpleContent component);
101     
102     public abstract void visit(SimpleExtension component);
103     
104     public abstract void visit(ComplexExtension component);
105
106     ////////////////////////////////////////////////////////////////////
107
////////////////////////// member variables ////////////////////////
108
////////////////////////////////////////////////////////////////////
109
protected AXIModelImpl model;
110 }
111
Popular Tags