1
|
|
/*
|
2
|
|
* JBind
|
3
|
|
*
|
4
|
|
* Copyright (c) by Stefan Wachter. All rights reserved.
|
5
|
|
*
|
6
|
|
* Usage, modification, and redistribution is subject to license terms that are
|
7
|
|
* available at 'http://www.jbind.org'. The JBind license is like the
|
8
|
|
* 'Apache Software License V 1.1'.
|
9
|
|
*/
|
10
|
|
package org.jbind.xml.schema.element;
|
11
|
|
|
12
|
|
import java.util.Iterator;
|
13
|
|
|
14
|
|
import org.jbind.xml.base.INamespaces;
|
15
|
|
import org.jbind.xml.base.IRef;
|
16
|
|
import org.jbind.xml.base.ISymbolspaces;
|
17
|
|
import org.jbind.xml.base.Ref;
|
18
|
|
import org.jbind.xml.schema.instantiation.IJobRefs;
|
19
|
|
|
20
|
|
public class AbbreviatedContentModel extends Annotated implements IComplexContentModelDesc {
|
21
|
|
|
22
|
|
private static class AbbreviatedDerivation extends Annotated implements IComplexRestrictionDerivation {
|
23
|
|
|
24
|
|
private IModelGroup myModelGroup = null;
|
25
|
|
private IModelGroupRef myModelGroupRef = null;
|
26
|
|
|
27
|
306
|
public AbbreviatedDerivation(CreationParams aCreationParams, IModelGroup aModelGroup, IModelGroupRef aModelGroupRef) {
|
28
|
306
|
super(aCreationParams);
|
29
|
306
|
myModelGroup = aModelGroup;
|
30
|
306
|
myModelGroupRef = aModelGroupRef;
|
31
|
|
}
|
32
|
|
|
33
|
|
|
34
|
2228
|
public IRef getBaseAttribute() {
|
35
|
2228
|
return new Ref(INamespaces.XML_SCHEMA, ISymbolspaces.TYPE, "anyType");
|
36
|
|
}
|
37
|
|
|
38
|
0
|
public void setBaseAttribute(IRef aRef) {
|
39
|
|
assert false;
|
40
|
|
}
|
41
|
|
|
42
|
0
|
public IRef getInlinedBaseAttribute() {
|
43
|
0
|
return null;
|
44
|
|
}
|
45
|
|
|
46
|
290
|
public IRef getEffectiveBaseAttribute() {
|
47
|
290
|
return getBaseAttribute();
|
48
|
|
}
|
49
|
|
|
50
|
|
|
51
|
306
|
public boolean getIsExtension() {
|
52
|
|
// restriction of the ur-type.
|
53
|
306
|
return false;
|
54
|
|
}
|
55
|
|
|
56
|
|
|
57
|
0
|
public IAttributeInfos getAttributeInfos() {
|
58
|
0
|
return null;
|
59
|
|
}
|
60
|
|
|
61
|
|
|
62
|
0
|
public IModelGroup getModelGroup() {
|
63
|
0
|
return myModelGroup;
|
64
|
|
}
|
65
|
|
|
66
|
0
|
public IModelGroupRef getModelGroupRef() {
|
67
|
0
|
return myModelGroupRef;
|
68
|
|
}
|
69
|
|
|
70
|
0
|
public ISimpleTypeDef getSimpleTypeDef() {
|
71
|
0
|
return null;
|
72
|
|
}
|
73
|
|
|
74
|
0
|
public void collectRefsForCreation(IJobRefs aJobRefs) {}
|
75
|
|
|
76
|
0
|
public Iterator iterFacets() {
|
77
|
|
assert false :
|
78
|
|
"method must not be called on a complex content derivation";
|
79
|
0
|
return null;
|
80
|
|
}
|
81
|
|
|
82
|
|
}
|
83
|
|
|
84
|
|
|
85
|
|
private IDerivation myDerivation = null;
|
86
|
|
|
87
|
|
|
88
|
306
|
public AbbreviatedContentModel(CreationParams aCreationParams, IModelGroup aModelGroup, IModelGroupRef aModelGroupRef) {
|
89
|
306
|
super(aCreationParams);
|
90
|
306
|
myDerivation = new AbbreviatedDerivation(aCreationParams, aModelGroup, aModelGroupRef);
|
91
|
|
}
|
92
|
|
|
93
|
|
|
94
|
290
|
public Boolean isMixed() {
|
95
|
290
|
return null;
|
96
|
|
}
|
97
|
|
|
98
|
|
|
99
|
3892
|
public IDerivation getDerivation() {
|
100
|
3892
|
return myDerivation;
|
101
|
|
}
|
102
|
|
|
103
|
|
|
104
|
2783
|
public boolean isComplex() {
|
105
|
2783
|
return true;
|
106
|
|
}
|
107
|
|
|
108
|
0
|
public void collectRefsForCreation(IJobRefs aJobRefs) {}
|
109
|
|
}
|
110
|
|
|