|
|||||||||||||||||||
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 | |||||||||||||||
Include.java | 50% | 80% | 100% | 80% |
|
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.msg.IConstraintViolations; |
|
13 |
import org.jbind.xml.msg.XmlMessages; |
|
14 |
import org.jbind.xml.schema.instantiation.IElemValHelper; |
|
15 |
import org.jbind.xml.schema.instantiation.IHasTopLevelJobs; |
|
16 |
|
|
17 |
public class Include extends AdditionalSource implements IInclude { |
|
18 |
|
|
19 | 10 |
public Include(CreationParams aCreationParams) { |
20 | 10 |
super(aCreationParams); |
21 |
} |
|
22 |
|
|
23 | 10 |
public void createAndAddJob(IHasTopLevelJobs aSchemaJob) { |
24 | 10 |
aSchemaJob.addIncludeJob(this); |
25 |
} |
|
26 |
|
|
27 | 10 |
public void validateElement(IElemValHelper aHelper, IConstraintViolations aViolations) { |
28 | 10 |
super.validateElement(aHelper, aViolations); |
29 | 10 |
if (null == getSchemaLocation()) { |
30 | 0 |
aViolations.add(XmlMessages.missingAttribute("schemaLocation", this)); |
31 |
} |
|
32 |
} |
|
33 |
|
|
34 |
} |
|
35 |
|
|