jaxb
  1. jaxb
  2. JAXB-789

Allow specifying Navigator via JAXBRIContext properties

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Critical Critical
    • Resolution: Unresolved
    • Affects Version/s: 2.1.13
    • Fix Version/s: not determined
    • Component/s: runtime
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      789

      Description

      Currently I can provide my own implementation of annotation reader via JAXB
      context properties:

      final AnnotationReader<Type, Class, Field, Method> annotationReader = new
      AnnoxAnnotationReader();

      final Map<String, Object> properties = new HashMap<String, Object>();

      properties.put(JAXBRIContext.ANNOTATION_READER, annotationReader);

      final JAXBContext context = JAXBContext.newInstance(
      "org.jvnet.annox.samples.po",
      Thread.currentThread().getContextClassLoader(),
      properties);

      I need an opportunity to specify my own implementation of Navigator
      (com.sun.xml.bind.v2.model.nav.Navigator) as well.

      ModelBuilder accepts reader, navigator, subclassReplacements and
      defaultNamespaceRemap as constructor parameters:

      public ModelBuilder(
      AnnotationReader<T, C, F, M> reader,
      Navigator<T, C, F, M> navigator,
      Map<C, C> subclassReplacements,
      String defaultNamespaceRemap
      )

      From these parameters reader, subclassReplacements and defaultNamespaceRemap
      can be specified via JAXBRIContext properties:

      public static final String ANNOTATION_READER =
      RuntimeAnnotationReader.class.getName();
      public static final String SUBCLASS_REPLACEMENTS =
      "com.sun.xml.bind.subclassReplacements";
      public static final String DEFAULT_NAMESPACE_REMAP =
      "com.sun.xml.bind.defaultNamespaceRemap";

      But not navigator.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Martin Grebac
            Reporter:
            lexi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: