|
|||||||||||||||||||
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 | |||||||||||||||
OrderFacet.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.element; |
|
11 |
|
|
12 |
import org.jbind.xml.core.constraint.ConstraintType; |
|
13 |
import org.jbind.xml.core.constraint.IConstraints; |
|
14 |
import org.jbind.xml.core.data.IAnyTypeData; |
|
15 |
import org.jbind.xml.core.data.IHasOrder; |
|
16 |
import org.jbind.xml.core.type.IAnyType; |
|
17 |
import org.jbind.xml.msg.IConstraintViolations; |
|
18 |
import org.jbind.xml.msg.XmlException; |
|
19 |
|
|
20 |
public class OrderFacet extends Facet { |
|
21 |
|
|
22 |
private ConstraintType.Order myConstraintType; |
|
23 |
|
|
24 | 33 |
public OrderFacet(CreationParams aCreationParams, ConstraintType.Order aConstraintType) { |
25 | 33 |
super(aCreationParams, aConstraintType); |
26 |
} |
|
27 |
|
|
28 | 33 |
public void doAddConstraint(IAnyType aType, IConstraints aConstraints, IConstraintViolations aViolations) throws XmlException { |
29 | 33 |
IAnyTypeData anyData = createValueData(aType); |
30 | 33 |
IHasOrder threshold = (IHasOrder)anyData; |
31 | 33 |
aConstraints.add(((ConstraintType.Order)getConstraintType()).createConstraint(threshold), aViolations, this); |
32 |
} |
|
33 |
|
|
34 |
} |
|
35 |
|
|