public class NamespaceInfo
extends java.lang.Object
Purpose:To store some information about a schema's target namespace and some additional information gathered from XmlSchema annotation at the package (namespace) level
Responsibilities:
AnnotationsProcessor
Constructor and Description |
---|
NamespaceInfo() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getLocation() |
java.lang.String |
getNamespace() |
NamespaceResolver |
getNamespaceResolver() |
NamespaceResolver |
getNamespaceResolverForDescriptor(NamespaceResolver contextResolver,
boolean canUseDefaultNamespace)
Provides a
NamespaceResolver resolver for Descriptor. |
boolean |
isAttributeFormQualified() |
boolean |
isElementFormQualified() |
void |
setAttributeFormQualified(boolean b) |
void |
setElementFormQualified(boolean b) |
void |
setLocation(java.lang.String location) |
void |
setNamespace(java.lang.String ns) |
void |
setNamespaceResolver(NamespaceResolver resolver) |
public java.lang.String getNamespace()
public void setNamespace(java.lang.String ns)
public boolean isAttributeFormQualified()
public void setAttributeFormQualified(boolean b)
public boolean isElementFormQualified()
public void setElementFormQualified(boolean b)
public NamespaceResolver getNamespaceResolver()
public void setNamespaceResolver(NamespaceResolver resolver)
public java.lang.String getLocation()
public void setLocation(java.lang.String location)
public NamespaceResolver getNamespaceResolverForDescriptor(NamespaceResolver contextResolver, boolean canUseDefaultNamespace)
NamespaceResolver
resolver for Descriptor.
The returned NamespaceResolver
is consistent with contextResolver
.
Should there be any clashes in prefix or default name-space assignments,
these will be re-mapped to another prefix in the resulting resolver.
Alongside, all new prefix or default name-space assignments are added to the contextResolver
.
IMPORTANT: The first result is cached and re-used since then,
even if later calls are with different contextResolver
.
contextResolver
- context resolvercanUseDefaultNamespace
- indicates whether default name-space can be usedNamespaceResolver
java.lang.NullPointerException
- if contextResolver
is null