KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > schema > model > Schema


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-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.xml.schema.model;
21
22 import java.util.Collection JavaDoc;
23 import java.util.Map JavaDoc;
24 import java.util.Set JavaDoc;
25 import org.netbeans.modules.xml.schema.model.Derivation.Type;
26 import org.netbeans.modules.xml.xam.EmbeddableRoot;
27
28 /**
29  * This interface represents the schema element.
30  * @author Chris Webster
31  */

32 public interface Schema extends SchemaComponent, EmbeddableRoot {
33     public static final String JavaDoc TARGET_NAMESPACE_PROPERTY = "targetNamespace";
34     public static final String JavaDoc BLOCK_DEFAULT_PROPERTY = "blockDefault";
35     public static final String JavaDoc ATTRIBUTE_FORM_DEFAULT_PROPERTY = "attributeFormDefault";
36     public static final String JavaDoc FINAL_DEFAULT_PROPERTY = "finalDefault";
37     public static final String JavaDoc LANGUAGE_PROPERTY = "language";
38     public static final String JavaDoc ELEMENT_FORM_DEFAULT_PROPERTY = "elementFormDefault";
39     public static final String JavaDoc VERSION_PROPERTY = "version";
40     public static final String JavaDoc SCHEMA_REFERENCES_PROPERTY = "schemaReferences";
41     public static final String JavaDoc ATTRIBUTES_PROPERTY = "attributes";
42     public static final String JavaDoc ELEMENTS_PROPERTY = "elements";
43     public static final String JavaDoc ATTRIBUTE_GROUPS_PROPERTY = "attributeGroups";
44     public static final String JavaDoc SIMPLE_TYPES_PROPERTY = "simpleTypes";
45     public static final String JavaDoc COMPLEX_TYPES_PROPERTY = "complexTypes";
46     public static final String JavaDoc GROUPS_PROPERTY = "groups";
47     public static final String JavaDoc NOTATIONS_PROPERTY = "notations";
48     
49     Form getAttributeFormDefault();
50     void setAttributeFormDefault(Form form);
51         /**
52          * @return default for schema global default value for 'form' property on attributes.
53          */

54     Form getAttributeFormDefaultDefault();
55         Form getAttributeFormDefaultEffective();
56
57         public enum Block implements Derivation {
58             ALL(Type.ALL), RESTRICTION(Type.RESTRICTION), EXTENSION(Type.EXTENSION), SUBSTITUTION(Type.SUBSTITUTION), EMPTY(Type.EMPTY);
59             private Derivation.Type value;
60             Block(Derivation.Type v) { value = v; }
61             public String JavaDoc toString() { return value.toString(); }
62         }
63     Set JavaDoc<Block> getBlockDefault();
64     void setBlockDefault(Set JavaDoc<Block> blockDefault);
65         /**
66          * @return default for schema global default value for 'block' property.
67          */

68     Set JavaDoc<Block> getBlockDefaultDefault();
69         Set JavaDoc<Block> getBlockDefaultEffective();
70     
71     Form getElementFormDefault();
72     void setElementFormDefault(Form form);
73         /**
74          * @return default for schema global default value for 'form' property on elements.
75          */

76     Form getElementFormDefaultDefault();
77         Form getElementFormDefaultEffective();
78     
79         public enum Final implements Derivation {
80             ALL(Type.ALL), RESTRICTION(Type.RESTRICTION), EXTENSION(Type.EXTENSION), LIST(Type.LIST), UNION(Type.UNION), EMPTY(Type.EMPTY);
81             private Derivation.Type value;
82             Final(Derivation.Type v) { value = v; }
83             public String JavaDoc toString() { return value.toString(); }
84         }
85     Set JavaDoc<Final> getFinalDefault();
86     void setFinalDefault(Set JavaDoc<Final> finalDefault);
87         /**
88          * @return default for schema global default value for 'final' property.
89          */

90     Set JavaDoc<Final> getFinalDefaultDefault();
91         Set JavaDoc<Final> getFinalDefaultEffective();
92     
93     String JavaDoc getTargetNamespace();
94     void setTargetNamespace(String JavaDoc uri);
95     
96     String JavaDoc getVersion();
97     void setVersion(String JavaDoc ver);
98     
99     String JavaDoc getLanguage();
100     void setLanguage(String JavaDoc language);
101     
102     // Content
103
// import, include, redefine
104
Collection JavaDoc<SchemaModelReference> getSchemaReferences();
105     Collection JavaDoc<Import> getImports();
106     Collection JavaDoc<Include> getIncludes();
107     Collection JavaDoc<Redefine> getRedefines();
108     void addExternalReference(SchemaModelReference ref);
109     void removeExternalReference(SchemaModelReference ref);
110     
111     Collection JavaDoc<GlobalAttribute> getAttributes();
112     void addAttribute(GlobalAttribute attr);
113     void removeAttribute(GlobalAttribute attr);
114     
115     Collection JavaDoc<GlobalElement> getElements();
116     void addElement(GlobalElement element);
117     void removeElement(GlobalElement element);
118         
119         Collection JavaDoc<GlobalElement> findAllGlobalElements();
120     
121     Collection JavaDoc<GlobalAttributeGroup> getAttributeGroups();
122     void addAttributeGroup(GlobalAttributeGroup group);
123     void removeAttributeGroup(GlobalAttributeGroup group);
124     
125     Collection JavaDoc<GlobalSimpleType> getSimpleTypes();
126     void addSimpleType(GlobalSimpleType type);
127     void removeSimpleType(GlobalSimpleType type);
128     
129     Collection JavaDoc<GlobalComplexType> getComplexTypes();
130     void addComplexType(GlobalComplexType type);
131     void removeComplexType(GlobalComplexType type);
132         
133         Collection JavaDoc<GlobalType> findAllGlobalTypes();
134     
135     Collection JavaDoc<GlobalGroup> getGroups();
136     void addGroup(GlobalGroup group);
137     void removeGroup(GlobalGroup group);
138     
139     Collection JavaDoc<Notation> getNotations();
140     void addNotation(Notation notation);
141     void removeNotation(Notation notation);
142     
143     Map JavaDoc<String JavaDoc, String JavaDoc> getPrefixes();
144     void addPrefix(String JavaDoc prefix, String JavaDoc namespace);
145     void removePrefix(String JavaDoc prefix);
146 }
147
Popular Tags