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.cmp;
|
11
|
|
|
12
|
|
import java.util.Collections;
|
13
|
|
import java.util.Iterator;
|
14
|
|
|
15
|
|
import org.jbind.xml.base.IRange;
|
16
|
|
import org.jbind.xml.base.IRef;
|
17
|
|
import org.jbind.xml.base.Range;
|
18
|
|
import org.jbind.xml.core.cmp.ISimpleContentModel;
|
19
|
|
import org.jbind.xml.core.cmp.IUseStateIterator;
|
20
|
|
import org.jbind.xml.core.content.IElemDesc;
|
21
|
|
import org.jbind.xml.instance.use.EmptyUseStateIterator;
|
22
|
|
import org.jbind.xml.msg.IConstraintViolations;
|
23
|
|
|
24
|
|
public class SimpleContentModel extends ContentModel implements ISimpleContentModel {
|
25
|
|
|
26
|
422
|
public SimpleContentModel() {}
|
27
|
|
|
28
|
0
|
public boolean isSimple() {
|
29
|
0
|
return true;
|
30
|
|
}
|
31
|
|
|
32
|
10
|
public boolean isComplex() {
|
33
|
10
|
return false;
|
34
|
|
}
|
35
|
|
|
36
|
0
|
public boolean isEmpty() {
|
37
|
0
|
return false;
|
38
|
|
}
|
39
|
|
|
40
|
0
|
public boolean isMixed() {
|
41
|
0
|
return false;
|
42
|
|
}
|
43
|
|
|
44
|
1412
|
public Iterator iterElements() {
|
45
|
1412
|
return Collections.EMPTY_LIST.iterator();
|
46
|
|
}
|
47
|
|
|
48
|
0
|
public int getMaxOccurs(IRef aRef) {
|
49
|
0
|
return 0;
|
50
|
|
}
|
51
|
|
|
52
|
283
|
public void validate(IConstraintViolations aViolations) {}
|
53
|
|
|
54
|
320
|
public IUseStateIterator createUseIterator() {
|
55
|
320
|
return EmptyUseStateIterator.INSTANCE;
|
56
|
|
}
|
57
|
|
|
58
|
0
|
public IRange getRange(IRef aRef) {
|
59
|
0
|
return Range.ZERO;
|
60
|
|
}
|
61
|
|
|
62
|
0
|
public IElemDesc getElemDesc(String aNamespace, String aName) {
|
63
|
0
|
return null;
|
64
|
|
}
|
65
|
|
|
66
|
277
|
public boolean canContainText() {
|
67
|
277
|
return true;
|
68
|
|
}
|
69
|
|
|
70
|
0
|
public Iterator iterElemWildcards() {
|
71
|
0
|
return Collections.EMPTY_LIST.iterator();
|
72
|
|
}
|
73
|
|
}
|
74
|
|
|