|
|||||||||||||||||||
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 | |||||||||||||||
GlobalCheckContext.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.constraint; |
|
11 |
|
|
12 |
import org.jbind.xml.core.constraint.ICheckContext; |
|
13 |
import org.jbind.xml.core.constraint.IConstraint; |
|
14 |
import org.jbind.xml.core.data.IAnyTypeData; |
|
15 |
import org.jbind.xml.core.data.IDataContext; |
|
16 |
import org.jbind.xml.msg.IConstraintViolations; |
|
17 |
|
|
18 |
public class GlobalCheckContext extends CheckContext { |
|
19 |
|
|
20 |
private IDataContext myContext = null; |
|
21 |
protected IAnyTypeData myEnclosingData = null; |
|
22 |
|
|
23 | 2109 |
public GlobalCheckContext(IDataContext aContext, IAnyTypeData aData, IConstraintViolations aViolations) { |
24 | 2109 |
super(aData, aViolations); |
25 | 2109 |
myContext = aContext; |
26 |
} |
|
27 |
|
|
28 | 1848 |
public void check(IConstraint aConstraint) { |
29 | 1848 |
aConstraint.globalCheck(myContext, myData, myEnclosingData, myViolations); |
30 |
} |
|
31 |
|
|
32 | 60 |
public ICheckContext newNestedContext(IAnyTypeData aData) { |
33 | 60 |
GlobalCheckContext gcc = new GlobalCheckContext(myContext, aData, myViolations); |
34 | 60 |
gcc.myEnclosingData = myData; |
35 | 60 |
return gcc; |
36 |
} |
|
37 |
} |
|
38 |
|
|