|
|||||||||||||||||||
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 | |||||||||||||||
JobRef.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.reader; |
|
11 |
|
|
12 |
import org.jbind.xml.base.IHasLocation; |
|
13 |
import org.jbind.xml.base.ILocation; |
|
14 |
import org.jbind.xml.base.IRef; |
|
15 |
import org.jbind.xml.base.ISymbolspace; |
|
16 |
import org.jbind.xml.base.Ref; |
|
17 |
import org.jbind.xml.schema.instantiation.IJobRef; |
|
18 |
|
|
19 |
public class JobRef extends Ref implements IJobRef { |
|
20 |
|
|
21 |
private boolean myMustBeValidated; |
|
22 |
private IHasLocation myHasLocation = null; |
|
23 |
|
|
24 | 9060 |
public JobRef(String aNamespace, ISymbolspace aSymbolSpace, String aLocalPart, boolean aMustBeValidated, IHasLocation aHasLocation) { |
25 | 9060 |
super(aNamespace, aSymbolSpace, aLocalPart); |
26 | 9060 |
myMustBeValidated = aMustBeValidated; |
27 | 9060 |
myHasLocation = aHasLocation; |
28 |
} |
|
29 |
|
|
30 |
|
|
31 | 9060 |
public JobRef(IRef aGlobalRef, boolean aMustBeValidated, IHasLocation aHasLocation) { |
32 | 9060 |
this(aGlobalRef.getNamespace(), aGlobalRef.getSymbolSpace(), aGlobalRef.getLocalPart(), aMustBeValidated, aHasLocation); |
33 |
} |
|
34 |
|
|
35 |
|
|
36 | 18139 |
public boolean getMustBeValidated() { |
37 | 18139 |
return myMustBeValidated; |
38 |
} |
|
39 |
|
|
40 | 31 |
public String toString() { |
41 | 31 |
return myMustBeValidated ? "V:" + super.toString() : "C:" + super.toString(); |
42 |
} |
|
43 |
|
|
44 | 31 |
public ILocation getLocation() { |
45 | 31 |
return (null != myHasLocation) ? myHasLocation.getLocation() : null; |
46 |
} |
|
47 |
|
|
48 |
} |
|
49 |
|
|