Class SimpleNamespaceResolver
java.lang.Object
org.codehaus.mojo.jaxb2.schemageneration.postprocessing.schemaenhancement.SimpleNamespaceResolver
- All Implemented Interfaces:
NamespaceContext
Namespace resolver for XML documents, which relates XML Namespace Prefixes to XML Namespace URIs. Doubles as a JAXB NamespaceContext, if we decide to use JAXB instead of DOM to parse our generated schema files.
- Since:
- 1.4
- Author:
- Lennart Jörelid
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleNamespaceResolver(File xmlFile) Creates a new SimpleNamespaceResolver which collects namespace data from the provided XML file. -
Method Summary
Modifier and TypeMethodDescriptiongetNamespaceURI(String prefix) getPrefixes(String namespaceURI)
-
Constructor Details
-
SimpleNamespaceResolver
Creates a new SimpleNamespaceResolver which collects namespace data from the provided XML file.- Parameters:
xmlFile- The XML file from which to collect namespace data, should not be null.
-
-
Method Details
-
getNamespaceURI
- Specified by:
getNamespaceURIin interfaceNamespaceContext
-
getPrefix
- Specified by:
getPrefixin interfaceNamespaceContext
-
getPrefixes
- Specified by:
getPrefixesin interfaceNamespaceContext
-
getNamespaceURI2PrefixMap
- Returns:
- A readonly map relating namespace URIs to namespace prefixes.
-
getLocalNamespaceURI
- Returns:
- The namespace URI of the default namespace within the sourceFile of this SimpleNamespaceResolver.
-
getSourceFilename
- Returns:
- The name of the source file used for this SimpleNamespaceResolver.
-