Class NamespaceInfo

java.lang.Object
org.eclipse.persistence.jaxb.compiler.NamespaceInfo

public class NamespaceInfo extends 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:
Author:
mmacivor
  • Constructor Details

    • NamespaceInfo

      public NamespaceInfo()
  • Method Details

    • getNamespace

      public String getNamespace()
    • setNamespace

      public void setNamespace(String ns)
    • isAttributeFormQualified

      public boolean isAttributeFormQualified()
    • setAttributeFormQualified

      public void setAttributeFormQualified(boolean b)
    • isElementFormQualified

      public boolean isElementFormQualified()
    • setElementFormQualified

      public void setElementFormQualified(boolean b)
    • getNamespaceResolver

      public NamespaceResolver getNamespaceResolver()
    • setNamespaceResolver

      public void setNamespaceResolver(NamespaceResolver resolver)
    • getLocation

      public String getLocation()
    • setLocation

      public void setLocation(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:
      NullPointerException - if contextResolver is null