Class NamespaceInfo


  • public class NamespaceInfo
    extends java.lang.Object
    INTERNAL:

    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:

    • Store target namespace and namespace prefix information for a specific schema
    • Store some additional Schema information (such as element/attribute form and XmlAccessType)
    See Also:
    AnnotationsProcessor
    Author:
    mmacivor
    Since:
    Oracle TopLink 11.1.1.0.0
    • Constructor Detail

      • NamespaceInfo

        public NamespaceInfo()
    • Method Detail

      • getNamespace

        public java.lang.String getNamespace()
      • setNamespace

        public void setNamespace​(java.lang.String ns)
      • isAttributeFormQualified

        public boolean isAttributeFormQualified()
      • setAttributeFormQualified

        public void setAttributeFormQualified​(boolean b)
      • isElementFormQualified

        public boolean isElementFormQualified()
      • setElementFormQualified

        public void setElementFormQualified​(boolean b)
      • setNamespaceResolver

        public void setNamespaceResolver​(NamespaceResolver resolver)
      • getLocation

        public java.lang.String getLocation()
      • setLocation

        public void setLocation​(java.lang.String location)
      • getNamespaceResolverForDescriptor

        public NamespaceResolver getNamespaceResolverForDescriptor​(NamespaceResolver contextResolver,
                                                                   boolean canUseDefaultNamespace)
        Provides a 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.

        Parameters:
        contextResolver - context resolver
        canUseDefaultNamespace - indicates whether default name-space can be used
        Returns:
        NamespaceResolver
        Throws:
        java.lang.NullPointerException - if contextResolver is null