Class NamespaceHelper
java.lang.Object
com.sun.xml.rpc.processor.modeler.j2ee.NamespaceHelper
Helper class used to convert a QName from a
xsd:QName string in an XML schema instance.
The xsd:QName string is of the form prefix:localpart, and the
mapping of prefix to a real namesapce may be defined at any level
in the traversal of the XML instance. There, this class is
intended to be used as follows:
When traversing a new child node BaseType, the push() method must be called to allow the NamespaceHelper to fetch any new prefix and namespace declaration in the child node. When done with visiting the child node, the pop() method must be called to revert back to previous settings.
When traversing a new child node BaseType, the push() method must be called to allow the NamespaceHelper to fetch any new prefix and namespace declaration in the child node. When done with visiting the child node, the pop() method must be called to revert back to previous settings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConvert a QName string with namespace prefix to a QName instance containing real namespace.pop()Pop the NamespaceHelper to signal that we're done visiting the Basetypepush(ComplexType ct) Push a BaseType during traversal of BaseType.
-
Constructor Details
-
NamespaceHelper
public NamespaceHelper()
-
-
Method Details
-
push
Push a BaseType during traversal of BaseType.- Parameters:
ct- TheComplexTypebeing visited- Returns:
- a new instance of NamespaceHelper to be used to resolve QName string to a QName instance
-
pop
Pop the NamespaceHelper to signal that we're done visiting the Basetype- Returns:
- NamespaceHelper that can be used to resolve Qname string to a QName instance with the context that was set prior to visiting the BaseType
-
getQName
Convert a QName string with namespace prefix to a QName instance containing real namespace.- Parameters:
nsString- the QName string in the XML instnace. It can be of the form "name", or "prefix:name".- Returns:
- QName derived from the QName string, or null if QName can't be determined.
-