KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > tools > xjc > runtime > ValidationContextAdaptor


1 package com.sun.tools.xjc.runtime;
2
3 import org.relaxng.datatype.ValidationContext;
4
5 /**
6  * Wraps {@link UnmarshallingContext} and makes it look like a
7  * {@link ValidationContext}.
8  *
9  * <p>
10  * This indirection allows the core of the runtime to be independent
11  * from the RELAX NG datatype interface.
12  *
13  * @author
14  * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
15  */

16 public final class ValidationContextAdaptor implements ValidationContext {
17     
18     private final UnmarshallingContext core;
19     
20     public ValidationContextAdaptor( UnmarshallingContext _context ) {
21         this.core = _context;
22     }
23     
24     public String JavaDoc getBaseUri() {
25         return core.getBaseUri();
26     }
27     
28     public boolean isNotation(String JavaDoc notationName) {
29         return core.isNotation(notationName);
30     }
31
32     public boolean isUnparsedEntity(String JavaDoc entityName) {
33         return core.isUnparsedEntity(entityName);
34     }
35
36     public String JavaDoc resolveNamespacePrefix(String JavaDoc prefix) {
37         return core.resolveNamespacePrefix(prefix);
38     }
39
40 }
41
Popular Tags