|
|||||||||||||||||||
This license of Clover is provided to support the development of JBind only. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover. | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
Content.java | - | 100% | 100% | 100% |
|
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 org.jbind.xml.base.IRange; |
|
13 |
import org.jbind.xml.core.cmp.ISourceInfo; |
|
14 |
import org.jbind.xml.core.content.IContentDesc; |
|
15 |
|
|
16 |
public abstract class Content extends Component implements IContentDesc { |
|
17 |
|
|
18 |
private IRange myRange; |
|
19 |
|
|
20 | 4013 |
public Content(ISourceInfo aSourceInfo, String aNamespace, String aName, IRange aRange) { |
21 | 4013 |
super(aSourceInfo, aNamespace, aName); |
22 | 4013 |
myRange = aRange; |
23 |
} |
|
24 |
|
|
25 | 71510 |
public IRange getRange() { |
26 | 71510 |
return myRange; |
27 |
} |
|
28 | 2605 |
public int getMinOccurs() { |
29 | 2605 |
return myRange.getMinOccurs(); |
30 |
} |
|
31 | 1026 |
public int getMaxOccurs() { |
32 | 1026 |
return myRange.getMaxOccurs(); |
33 |
} |
|
34 | 3069 |
public boolean isUnbounded() { |
35 | 3069 |
return myRange.isUnbounded(); |
36 |
} |
|
37 |
|
|
38 | 1578 |
public final boolean isEmptiable() { |
39 | 1578 |
return getRange(null).getMinOccurs() == 0; |
40 |
} |
|
41 |
|
|
42 |
} |
|
43 |
|
|