Package com.sun.msv.generator
Class ContextProviderImpl
- java.lang.Object
-
- com.sun.msv.generator.ContextProviderImpl
-
- All Implemented Interfaces:
SerializationContext,org.relaxng.datatype.ValidationContext
public final class ContextProviderImpl extends Object implements org.relaxng.datatype.ValidationContext, SerializationContext
dummy implementation of ValidationContextProvider.- Author:
- Kohsuke KAWAGUCHI
-
-
Constructor Summary
Constructors Constructor Description ContextProviderImpl(Element parent)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static StringfindPredeclaredPrefix(Element e, String uri)finds a prefix for this URI.StringgetBaseUri()StringgetNamespacePrefix(String uri)get namespace prefix for the given namespace URI.booleanisNotation(String name)booleanisUnparsedEntity(String name)StringresolveNamespacePrefix(String prefix)protected static StringresolvePrefix(Element e, String prefix)
-
-
-
Field Detail
-
element
protected final Element element
-
XMLNS_URI
public static final String XMLNS_URI
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ContextProviderImpl
public ContextProviderImpl(Element parent)
-
-
Method Detail
-
getNamespacePrefix
public String getNamespacePrefix(String uri)
Description copied from interface:SerializationContextget namespace prefix for the given namespace URI. this method is used to convert QName. It is a responsibility of the callee to ensure that the returned prefix is properly declared.- Specified by:
getNamespacePrefixin interfaceSerializationContext- Returns:
- prefix for this namespace URI. return null to indicate that this namespace URI is the default name space. In this case, QNames are converted into unqualified names (just the local names only as NCNames).
-
resolveNamespacePrefix
public String resolveNamespacePrefix(String prefix)
- Specified by:
resolveNamespacePrefixin interfaceorg.relaxng.datatype.ValidationContext
-
isUnparsedEntity
public boolean isUnparsedEntity(String name)
- Specified by:
isUnparsedEntityin interfaceorg.relaxng.datatype.ValidationContext
-
isNotation
public boolean isNotation(String name)
- Specified by:
isNotationin interfaceorg.relaxng.datatype.ValidationContext
-
getBaseUri
public String getBaseUri()
- Specified by:
getBaseUriin interfaceorg.relaxng.datatype.ValidationContext
-
findPredeclaredPrefix
protected static String findPredeclaredPrefix(Element e, String uri)
finds a prefix for this URI. If no prefix is declared for this URI, returns null.
-
-